summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-09-27 15:01:30 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-09-27 15:01:30 -0400
commita30fc912447036c77292e6e721a44624d3976644 (patch)
tree520fa2e75748e8311082d41d148939f6ff9a9c75
parentc3d8da0e89d3f2213933ff85dc0cca7d829442ed (diff)
Makefile: create directories as nescessary
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index b8971b4..b0f5cab 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
subcommands = help mvn-basename mvn-install mvn-localrepo
+dirs = $(DESTDIR)/usr/share/jh $(DESTDIR)/usr/bin
####
@@ -12,12 +13,15 @@ all: PHONY build
build: PHONY jh $(subcommand_files) $(help_files)
install: $(DESTDIR)/usr/bin/jh $(addprefix $(DESTDIR)/usr/share/jh/,$(subcommand_files) $(help_files))
-$(DESTDIR)/usr/share/jh/%: %
+$(DESTDIR)/usr/share/jh/%: % | $(DESTDIR)/usr/share/jh
cp '$<' '$@'
-$(DESTDIR)/usr/bin/jh: jh
+$(DESTDIR)/usr/bin/jh: jh | $(DESTDIR)/usr/bin
cp '$<' '$@'
+$(dirs):
+ install -d '$@'
+
####
.PHONY: PHONY FORCE