From a833d13a5dc204a3c780f9914e50373ace4aac01 Mon Sep 17 00:00:00 2001 From: Jay Larson Date: Fri, 28 Oct 2016 15:46:19 -0500 Subject: [PATCH] Added dependencies, removed usr/share/info/dir, and cleaned up Makefile --- Makefile | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index a37e2ae..cf42c61 100644 --- a/Makefile +++ b/Makefile @@ -8,13 +8,13 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -DEPENDS = +DEPENDS = glibc,gmp,mpfr,readline ARCH = x86_64 URL = https://www.gnu.org/software/gawk/ DESC = The awk utility interprets a special-purpose programming language that \ makes it possible to handle simple data-reformatting jobs with just a few \ lines of code. -SNAPVER = sr0 +SNAPVER = sr1 ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1) TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n') @@ -22,10 +22,6 @@ SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//') PATCHDIR := $(PWD)/SRC/patches VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')$(SNAPVER) -MAKE = make -MAKEINST = make install -SNAPHACKS = - include /usr/share/snap/Makefile.snaplinux $(SRCDIR)/configure: $(ARCHIVE) @@ -41,11 +37,13 @@ $(SRCDIR)/configure: $(ARCHIVE) echo 'Unable to determine archive type'; \ exit 1; \ fi + @touch $(SRCDIR)/configure $(SRCDIR)/config.log: $(SRCDIR)/configure - @if [ -f $(PATCHDIR)/*.patch ]; then \ - cd $(SRCDIR) && cat $(PATCHDIR)/*.patch|patch --verbose -Np1; \ - fi + @cd $(SRCDIR) && \ + for patch in `find $(PATCHDIR) -name \*.patch|sort`; do \ + patch --verbose -Np0 -i $$patch; \ + done @cd $(SRCDIR); \ ./configure \ --prefix=/usr \ @@ -54,8 +52,7 @@ $(SRCDIR)/config.log: $(SRCDIR)/configure --target=x86_64-snap-linux-gnu $(SRCDIR)/gawk: $(SRCDIR)/config.log - @cd $(SRCDIR); \ - $(MAKE) + @cd $(SRCDIR) && make $(ROOT): $(SRCDIR)/gawk @if [ -d $(ROOT) ]; then \ @@ -64,10 +61,8 @@ $(ROOT): $(SRCDIR)/gawk mkdir -v $(ROOT); \ fi - @cd $(SRCDIR); \ - $(MAKEINST) DESTDIR=$(ROOT) - - @$(SNAPHACKS) + @cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \ + rm -v $(ROOT)/usr/share/info/dir test: $(ROOT) @cd $(SRCDIR); \