diff options
Diffstat (limited to 'rules')
-rw-r--r-- | rules/generic/Makefile | 10 | ||||
-rw-r--r-- | rules/guice-bootstrap/delete.list | 3 | ||||
-rw-r--r-- | rules/guice-bootstrap/subdir-deps.mk | 7 | ||||
-rw-r--r-- | rules/guice-core/sourceDirectory.mk | 1 |
4 files changed, 15 insertions, 6 deletions
diff --git a/rules/generic/Makefile b/rules/generic/Makefile index 7549439..dbadab2 100644 --- a/rules/generic/Makefile +++ b/rules/generic/Makefile @@ -22,17 +22,17 @@ TOUCH = touch XMLSTARLET = xml # Detect information from POMs -basedir = . -project.basedir = $(basedir) - artifactId := $(shell $(XMLSTARLET) sel -T -t -c /_:project/_:artifactId -n pom.xml) version := $(firstword $(shell $(XMLSTARLET) sel -T -t -c /_:project/_:version -n -c /_:project/_:parent/_:version pom.xml) $(version)) groupId := $(firstword $(shell $(XMLSTARLET) sel -T -t -c /_:project/_:groupId -n -c /_:project/_:parent/_:groupId pom.xml)) -sourceDirectory := $(firstword $(shell $(XMLSTARLET) sel -T -t -c /_:project/_:build/_:sourceDirectory -n pom.xml) $(sourceDirectory) src/main/java) +sourceDirectory := $(firstword $(shell $(XMLSTARLET) sel -T -t -c /_:project/_:build/_:sourceDirectory -n pom.xml) $(value sourceDirectory) src/main/java) +$(eval sourceDirectory = $(sourceDirectory)) resources := $(shell $(XMLSTARLET) sel -T -t -c /_:project/_:build/_:resources -n pom.xml) resources := $(if $(resources),$(resources),src/main/resources) +basedir = . +project.basedir = $(basedir) subdirs = $(patsubst %/pom.xml,%,$(wildcard */pom.xml)) targets = pom $(if $(wildcard src/main/ $(sourceDirectory) $(resources)),jar) @@ -119,7 +119,7 @@ deps2classpath = $(shell $(ECHO) $(abspath $(call deps2jars,$1)) $(CLASSPATH) | define recurse-rule $1/%: PHONY $(addsuffix /all,$($1_deps)) - CLASSPATH='$$(call deps2classpath,$$^)' sourceDirectory='$$(sourceDirectory)' version='$$(version)' $$(MAKE) -C '$1' -f '$$(abspath $$(firstword $$(MAKEFILE_LIST)))' '$$*' + CLASSPATH='$$(call deps2classpath,$$^)' sourceDirectory='$$(value sourceDirectory)' version='$$(value version)' $$(MAKE) -C '$1' -f '$$(abspath $$(firstword $$(MAKEFILE_LIST)))' '$$*' endef $(foreach subdir,$(subdirs),$(eval $(call recurse-rule,$(subdir)))) diff --git a/rules/guice-bootstrap/delete.list b/rules/guice-bootstrap/delete.list new file mode 100644 index 0000000..e86a1d8 --- /dev/null +++ b/rules/guice-bootstrap/delete.list @@ -0,0 +1,3 @@ +lib/build +lib/*.jar +extensions/*/build diff --git a/rules/guice-bootstrap/subdir-deps.mk b/rules/guice-bootstrap/subdir-deps.mk new file mode 100644 index 0000000..0058ab7 --- /dev/null +++ b/rules/guice-bootstrap/subdir-deps.mk @@ -0,0 +1,7 @@ +# top level +extensions_deps = core + +# extensions +struts2_deps = servlet +subdirs := $(filter-out struts2,$(subdirs)) # depends on struts2, which depends on Spring, TestNG +subdirs := $(filter-out spring,$(subdirs)) # depends on Spring diff --git a/rules/guice-core/sourceDirectory.mk b/rules/guice-core/sourceDirectory.mk deleted file mode 100644 index 4470673..0000000 --- a/rules/guice-core/sourceDirectory.mk +++ /dev/null @@ -1 +0,0 @@ -sourceDirectory = src |