From 908fb92baa18dde39115ed880fc7a57c2ad72995 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 11 Sep 2013 15:22:37 -0400 Subject: Makefile: don't have directory-targets share namespace with project-targets --- Makefile | 43 ++++++++++++++++++++++++------------------- 1 file changed, 24 insertions(+), 19 deletions(-) (limited to 'Makefile') 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,$$($$*)) ################################################################################ -- cgit v1.2.2