summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2015-04-16 17:49:20 -0400
committerEugeniy Mikhailov <evgmik@gmail.com>2015-04-16 17:49:20 -0400
commitc09a8c12200c610321e472ad799e887f074c9b19 (patch)
tree4ce96213595380d5ca019eca7936fa4b289f37c8
parentd84da8d3edd3ed981ba20dbd19d30c7744345c7a (diff)
downloadmakefile_templates-c09a8c12200c610321e472ad799e887f074c9b19.tar.gz
makefile_templates-c09a8c12200c610321e472ad799e887f074c9b19.zip
raw makefile fixed, to check for target files
-rw-r--r--raw.mk8
1 files changed, 6 insertions, 2 deletions
diff --git a/raw.mk b/raw.mk
index 33b24e6..7ed5761 100644
--- a/raw.mk
+++ b/raw.mk
@@ -4,6 +4,8 @@
CLEAN_TARGETS += clean_raw
REAL_CLEAN_TARGETS += real_clean_raw
+raw_dest_targets = $(raw_files:%=$(dest_dir)/%)
+
clean_raw:
real_clean_raw:
@@ -11,9 +13,11 @@ real_clean_raw:
dest_dir_raw:
$(INSTALL) -d -m 0755 $(dest_dir)
-install_raw: dest_dir_raw
+install_raw: dest_dir_raw $(raw_dest_targets)
+
+$(raw_dest_targets): $(dest_dir)/% : %
ifneq ($(strip $(raw_files)),)
- $(INSTALL) -m 0644 $(raw_files) $(dest_dir)/
+ $(INSTALL) -m 0644 '$<' '$@'
endif