From edb25e49ddab3ea1af272b091a653333c42152b8 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Fri, 5 Dec 2025 15:50:52 +0100 Subject: [PATCH] change makefile formatting --- Makefile | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index b04dddf..e22799f 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ VERSION = $(VERSIONNR)$(EXTRA) PACKAGENAME = scantopdf-$(VERSION)-$(BUILDVERSION)-$(ARCHITECTURE) BUILDDIR = build -PACKAGEDIR = build/$(PACKAGENAME) +PACKAGEDIR = $(BUILDDIR)/$(PACKAGENAME) SRCDIR = src BINDIR = usr/local/bin SHAREDIR = usr/local/share @@ -23,7 +23,7 @@ build: $(PACKAGEDIR)/$(BINDIR)/scantopdf \ $(PACKAGEDIR)/$(BINDIR)/scantopdfgray \ $(PACKAGEDIR)/$(BINDIR)/scantopdfbw -package: build $(BUILDDIR)/$(PACKAGENAME).deb +package: $(BUILDDIR)/$(PACKAGENAME).deb clean: rm -rf $(BUILDDIR) @@ -31,8 +31,9 @@ clean: ################################################################################ $(PACKAGEDIR)/$(BINDIR)/scantopdf: \ - $(SRCDIR)/scantopdf \ - $(SRCDIR)/scanbasic.sh + $(SRCDIR)/scanbasic.sh \ + $(SRCDIR)/scantopdf + mkdir -p $(@D) cat $(SRCDIR)/scantopdf \ | sed "/@scanbasic.sh@/r $(SRCDIR)/scanbasic.sh" \ @@ -42,8 +43,9 @@ $(PACKAGEDIR)/$(BINDIR)/scantopdf: \ chmod 755 $(PACKAGEDIR)/$(BINDIR)/scantopdf $(PACKAGEDIR)/$(BINDIR)/scantopdfgray: \ - $(SRCDIR)/scantopdfgray \ - $(SRCDIR)/scanbasic.sh + $(SRCDIR)/scanbasic.sh \ + $(SRCDIR)/scantopdfgray + mkdir -p $(@D) cat $(SRCDIR)/scantopdfgray \ | sed "/@scanbasic.sh@/r $(SRCDIR)/scanbasic.sh" \ @@ -53,10 +55,11 @@ $(PACKAGEDIR)/$(BINDIR)/scantopdfgray: \ chmod 755 $(PACKAGEDIR)/$(BINDIR)/scantopdfgray $(PACKAGEDIR)/$(BINDIR)/scantopdfbw: \ - $(SRCDIR)/scantopdfbw \ - $(SRCDIR)/scanbasic.sh + $(SRCDIR)/scanbasic.sh \ + $(SRCDIR)/scantopdfbw + mkdir -p $(@D) - cat src/scantopdfbw \ + cat $(SRCDIR)/scantopdfbw \ | sed "/@scanbasic.sh@/r $(SRCDIR)/scanbasic.sh" \ | sed "/@scanbasic.sh@/d" \ | sed "s/@VERSION@/$(VERSION)/" \ @@ -67,6 +70,7 @@ $(PACKAGEDIR)/$(BINDIR)/scantopdfbw: \ $(PACKAGEDIR)/$(SHAREDIR)/scantopdf/cutpage.html: \ $(SRCDIR)/cutpage.html + mkdir -p $(@D) cp $(SRCDIR)/cutpage.html $(PACKAGEDIR)/$(SHAREDIR)/scantopdf/cutpage.html @@ -74,6 +78,7 @@ $(PACKAGEDIR)/$(SHAREDIR)/scantopdf/cutpage.html: \ $(PACKAGEDIR)/DEBIAN/control: \ $(SRCDIR)/control + mkdir -p $(@D) cat $(SRCDIR)/control \ | sed "s/@VERSION@/$(VERSION)/" \ @@ -85,5 +90,6 @@ $(BUILDDIR)/$(PACKAGENAME).deb: \ $(PACKAGEDIR)/$(BINDIR)/scantopdfbw \ $(PACKAGEDIR)/$(SHAREDIR)/scantopdf/cutpage.html \ $(PACKAGEDIR)/DEBIAN/control + mkdir -p $(@D) cd build && dpkg-deb --build --root-owner-group $(PACKAGENAME) \ No newline at end of file -- 2.47.3