summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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