Skip to content

Commit

Permalink
Makefile: rename GLUON_TARGETS to GLUON_TARGETLIST
Browse files Browse the repository at this point in the history
Some communities are using GLUON_TARGETS as a variable in their makefile.
This can lead to conflicts when said variable is set on the commandline
by users of these communities' makefile.
This happened because this is just a temporary variable that was never
mentioned anywhere.

PR freifunk-gluon#2934
  • Loading branch information
Djfe committed Sep 25, 2023
1 parent 46b90c1 commit 8ba43f3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ update-modules: FORCE
update-ci: FORCE
@$(GLUON_ENV) scripts/update-ci.sh

GLUON_TARGETS :=
GLUON_TARGETLIST :=

define GluonTarget
gluon_target := $(1)$$(if $(2),-$(2))
GLUON_TARGETS += $$(gluon_target)
GLUON_TARGETLIST += $$(gluon_target)
GLUON_TARGET_$$(gluon_target)_BOARD := $(1)
GLUON_TARGET_$$(gluon_target)_SUBTARGET := $(2)
endef
Expand All @@ -132,7 +132,7 @@ SUBTARGET := $(GLUON_TARGET_$(GLUON_TARGET)_SUBTARGET)
define CheckTarget
if [ -z '$(BOARD)' ]; then
echo 'Please set GLUON_TARGET to a valid target. Gluon supports the following targets:'
for target in $(GLUON_TARGETS); do
for target in $(GLUON_TARGETLIST); do
echo " * $$target"
done
exit 1
Expand All @@ -147,7 +147,7 @@ define CheckSite
endef

list-targets: FORCE
@for target in $(GLUON_TARGETS); do
@for target in $(GLUON_TARGETLIST); do
echo "$$target"
done

Expand Down Expand Up @@ -221,7 +221,7 @@ manifest: $(LUA) FORCE
echo "DATE=$$($(LUA) scripts/rfc3339date.lua)"
echo 'PRIORITY=$(GLUON_PRIORITY)'
echo
for target in $(GLUON_TARGETS); do
for target in $(GLUON_TARGETLIST); do
$(LUA) scripts/generate_manifest.lua "$$target"
done
) > 'tmp/$(GLUON_AUTOUPDATER_BRANCH).manifest.tmp'
Expand Down

0 comments on commit 8ba43f3

Please sign in to comment.