summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2014-05-30 14:59:21 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2014-05-30 14:59:21 -0400
commit2bbbcb63b1aa87ead4aeffc9d276ce4ac716464a (patch)
tree59c22506efbf92365c6da3bf63df3b37a642d23a /Makefile
parentaf08231d4bbc0a0122730e962723e3f9334b6957 (diff)
add mechanism to delete files during place
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 6 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 9b8f95a..72c4355 100644
--- a/Makefile
+++ b/Makefile
@@ -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