diff options
-rw-r--r-- | Makefile | 18 |
1 files changed, 6 insertions, 12 deletions
@@ -83,21 +83,17 @@ $(foreach package,$(packages),$(if $(filter-out svn|%,$($(package))),$(eval \ place: PHONY $(addprefix,build/compile/,$(packages)) -compile_patch =$(filter $(patsubst patches/%/,%,$(wildcard patches/*/)),$(packages)) -compile_direct=$(filter-out $(patsubst patches/%/,%,$(wildcard patches/*/)),$(packages)) - -$(addprefix build/compile/,$(compile_patch)): build/compile/%: +build/compile/%: $(call dep_optdir,patches/%) $(wild_optdir,delete/%.txt) rm -rf '$@' mkdir -p '$(@D)' cp -a '$<' '$@' cd '$@' && \ - for patch in '$(top)/patches/$*'/*; do \ + for patch in $(wildcard $(top)/patches/$*/*); do \ patch -f -Np1 -i $$patch || { rm -rf '$@'; exit 1; }; \ - done -$(addprefix build/compile/,$(compile_direct)): build/compile/%: - rm -rf '$@' - mkdir -p '$(@D)' - cp -a '$<' '$@' + done && \ + if [ -f '$(top)/delete/$*.txt' ]; then \ + rm -rf -- $$(< '$(top)/delete/$*.txt'); \ + fi # Loop over our source configuration and set up the dependencies # beteen `build/compile` and `build/extract`. @@ -132,8 +128,6 @@ build/packages/%: RECURSIVE build/compile/% makefiles/mvn-simple.mk CLASSPATH='$(call deps2classpath,$^)' mkdir -p build/packages/dest && lndir -silent '$(top)/$@' build/packages/dest -# dependencies ################################################################# - # boilerplate ################################################################## clean: PHONY |