summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Theodore <tonyt@logyst.com>2017-04-02 02:08:04 (GMT)
committerTony Theodore <tonyt@logyst.com>2017-04-02 02:08:04 (GMT)
commitd0aa402fe63865615b280110d2d889f5cee9b54b (patch)
tree866327d69ebf405784b70b516d121b06b354ef12
parentf07c3f01225531b351b8f79fafb175f94965c027 (diff)
downloadmxe-d0aa402fe63865615b280110d2d889f5cee9b54b.zip
mxe-d0aa402fe63865615b280110d2d889f5cee9b54b.tar.gz
mxe-d0aa402fe63865615b280110d2d889f5cee9b54b.tar.bz2
Makefile: explicitly set .DEFAULT_GOAL for LOCAL_PKG_LIST
Use `.DEFAULT_GOAL` [special variable] instead of `.DEFAULT` [built-in target] as the latter depends on include order and can cause confusing behaviour. `LOCAL_PKG_LIST` was [broken] in #1729 and this allows for any current `settings.mk` to work correctly. Should also fix #1264 and #1267 since MXE isn't going to include any other files that set this variable in a surprising way. [special variable]:https://www.gnu.org/software/make/manual/make.html#Special-Variables [built-in target]:https://www.gnu.org/software/make/manual/make.html#Special-Targets [broken]:https://github.com/mxe/mxe/commit/1cf2afb5d3afb1dda0d7a5322be758ec2befd2a1
-rw-r--r--Makefile7
-rw-r--r--docs/index.html2
2 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 9c26d65..a255c6e 100644
--- a/Makefile
+++ b/Makefile
@@ -326,11 +326,16 @@ else
echo '# The three lines below makes `make` build these "local'; \
echo '# packages" instead of all packages.'; \
echo '#LOCAL_PKG_LIST := boost curl file flac lzo pthreads vorbis wxwidgets'; \
- echo '#.DEFAULT local-pkg-list:'; \
+ echo '#.DEFAULT_GOAL := local-pkg-list'; \
echo '#local-pkg-list: $$(LOCAL_PKG_LIST)'; \
} >'$(PWD)/settings.mk')
endif
+ifneq ($(LOCAL_PKG_LIST),)
+ .DEFAULT_GOAL := local-pkg-list
+ $(info [pkg-list] $(LOCAL_PKG_LIST))
+endif
+
# Numeric min and max list functions
LIST_NMAX = $(shell echo '$(strip $(1))' | tr ' ' '\n' | sort -n | tail -1)
LIST_NMIN = $(shell echo '$(strip $(1))' | tr ' ' '\n' | sort -n | head -1)
diff --git a/docs/index.html b/docs/index.html
index 23e8800..3d48bac 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -934,7 +934,7 @@ USE_OSGPLUGIN(&lt;plugin2&gt;)
the package list can also be set in
<code>settings.mk</code>
<pre>LOCAL_PKG_LIST := foo bar
-.DEFAULT local-pkg-list:
+.DEFAULT_GOAL := local-pkg-list
local-pkg-list: $(LOCAL_PKG_LIST)</pre>
</dd>
<dd>