summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-09-11 15:22:37 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-09-11 15:22:37 -0400
commit908fb92baa18dde39115ed880fc7a57c2ad72995 (patch)
tree9e97933c113ee79cf12133b522aa8f4695ccc0ca /Makefile
parent42f606f4fe3c2df5db876098cda9eba9d0e7f1c7 (diff)
Makefile: don't have directory-targets share namespace with project-targets
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile43
1 files changed, 24 insertions, 19 deletions
diff --git a/Makefile b/Makefile
index 0403498..75d1771 100644
--- a/Makefile
+++ b/Makefile
@@ -4,35 +4,40 @@ include config.mk
################################################################################
# these are the resulting packages
-packages=libretools libretools-mips64el librelib
+packages=doc libretools libretools-mips64el librelib
# and which directories they contain
-libretools=abslibre-tools chroot-tools devtools fullpkg librefetch misc toru
-libretools-mips64el=mips64el-tools
-librelib=lib
+doc=doc
+libretools=\
+ src \
+ src/abslibre-tools \
+ src/chroot-tools \
+ src/devtools \
+ src/fullpkg \
+ src/librefetch \
+ src/toru
+libretools-mips64el=src/mips64el-tools
+librelib=src/lib
################################################################################
all: PHONY build
-build: PHONY build-libretools build-doc
-install: PHONY install-libretools install-doc
+copy: PHONY $(addprefix copy-, $(packages))
+build: PHONY $(addprefix build-, $(packages))
+install: PHONY $(addprefix install-,$(packages))
check:
@cd test && ./testenv $(TESTENVFLAGS) roundup
-%-doc: PHONY doc
- $(MAKE) -C doc $*
-%-misc: PHONY src
- $(MAKE) -C src $*
-
-copy-%: PHONY src/%
- $(MAKE) -C src/$* copy
-build-%: PHONY src/%
- $(MAKE) -C src/$*
-install-%: PHONY src/%
- $(MAKE) -C src/$* install
+%/copy: PHONY %
+ $(MAKE) -C $* copy
+%/build: PHONY %
+ $(MAKE) -C $*
+%/install: PHONY %
+ $(MAKE) -C $* install
.SECONDEXPANSION:
-$(addprefix build-, $(packages)): build-%: PHONY $$(addprefix build-, $$($$*))
-$(addprefix install-,$(packages)): install-%: PHONY $$(addprefix install-,$$($$*))
+$(addprefix copy-, $(packages)): copy-%: PHONY $$(addsuffix /copy, $$($$*))
+$(addprefix build-, $(packages)): build-%: PHONY $$(addsuffix /build, $$($$*))
+$(addprefix install-,$(packages)): install-%: PHONY $$(addsuffix /install,$$($$*))
################################################################################