aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2023-04-28 00:32:31 +0200
committerTeddy Wing2023-04-28 00:32:31 +0200
commit226930e81e30508a0c17c2d2ff9a0d2bb2c7c623 (patch)
tree3957be5c5ddf386375571c1bd993005db351881c
parentcc5263057b2fbad3729a959ff6f5d233c09693ac (diff)
downloadpdf-form-replace-font2-226930e81e30508a0c17c2d2ff9a0d2bb2c7c623.tar.bz2
Makefile: Move shell script wrapper template exec to a new target
When I tried packaging with MacPorts, the path written to the shell wrapper was the temporary MacPorts build path, not the final install path. My plan is to extract the shell wrapper build to the `package` stage, and do something with the variables to give it the correct install path. Not sure what that something is yet, but that's the idea.
-rw-r--r--Makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 5521640..bc9bd73 100644
--- a/Makefile
+++ b/Makefile
@@ -50,11 +50,17 @@ run: compile
.PHONY: package
-package: $(RELEASE_PRODUCT)
+package: $(RELEASE_PRODUCT) pdf-form-replace-font2
$(RELEASE_PRODUCT): $(SOURCES)
mvn package $(MVNFLAGS)
+pdf-form-replace-font2: pdf-form-replace-font2.in
+ m4 \
+ --define="JAR_PATH=$(DESTDIR)$(datarootdir)/java/pdf-form-replace-font2-$(VERSION).jar" \
+ $< \
+ > $@
+
.PHONY: release
release:
@@ -63,15 +69,11 @@ release:
.PHONY: install
-install: $(RELEASE_PRODUCT) $(MAN_PAGE)
+install: $(RELEASE_PRODUCT) pdf-form-replace-font2 $(MAN_PAGE)
install -d $(DESTDIR)$(datarootdir)/java
install -m 644 $(RELEASE_PRODUCT) $(DESTDIR)$(datarootdir)/java
install -d $(DESTDIR)$(bindir)
- m4 \
- --define="JAR_PATH=$(DESTDIR)$(datarootdir)/java/pdf-form-replace-font2-$(VERSION).jar" \
- pdf-form-replace-font2.in \
- > pdf-form-replace-font2
install -m 755 pdf-form-replace-font2 \
$(DESTDIR)$(bindir)