summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile14
1 files changed, 9 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index e1de0a3..33307fe 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,9 @@
-subcommands = help list-commands mvn-basename mvn-install mvn-localrepo mksource checksource
-dirs = $(DESTDIR)/usr/share/jh $(DESTDIR)/usr/bin
+prefix = /usr
+bindir = $(prefix)/bin
+pkgdatadir = /usr/share/jh # hardcoded into jh.sh
+
+subcommands = help list-commands mvn-basename mvn-install mvn-localrepo checksource
+dirs = $(DESTDIR)$(bindir) $(DESTDIR)$(pkgdatadir)
####
@@ -11,14 +15,14 @@ all: PHONY build
####
build: PHONY jh $(subcommand_files)
-install: PHONY $(DESTDIR)/usr/bin/jh $(addprefix $(DESTDIR)/usr/share/jh/,$(subcommand_files) $(help_files))
+install: PHONY $(DESTDIR)$(bindir)/jh $(addprefix $(DESTDIR)$(pkgdatadir)/,$(subcommand_files) $(help_files))
clean: PHONY
rm -f jh $(subcommand_files)
-$(DESTDIR)/usr/share/jh/%: % | $(DESTDIR)/usr/share/jh
+$(DESTDIR)$(pkgdaradir)/%: % | $(DESTDIR)$(pkgdatadir)
cp '$<' '$@'
-$(DESTDIR)/usr/bin/jh: jh | $(DESTDIR)/usr/bin
+$(DESTDIR)$(bindir)/jh: jh | $(DESTDIR)$(bindir)
cp '$<' '$@'
$(dirs):