From 226930e81e30508a0c17c2d2ff9a0d2bb2c7c623 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Fri, 28 Apr 2023 00:32:31 +0200 Subject: 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. --- Makefile | 14 ++++++++------ 1 file 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) -- cgit v1.2.3