diff --git a/Makefile b/Makefile index 5b4e82a..952963e 100644 --- a/Makefile +++ b/Makefile @@ -8,11 +8,11 @@ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -DEPENDS = +DEPENDS = glibc ARCH = x86_64 URL = https://gmplib.org/ DESC = GMP is a free library for arbitrary precision arithmetic -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') @@ -20,10 +20,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 && make html -MAKEINST = make install && make install-html -SNAPHACKS = - include /usr/share/snap/Makefile.snaplinux $(SRCDIR)/configure: $(ARCHIVE) @@ -42,9 +38,10 @@ $(SRCDIR)/configure: $(ARCHIVE) @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 -Np1 -i $$patch; \ + done @cd $(SRCDIR); \ ./configure \ --prefix=/usr \ @@ -55,8 +52,7 @@ $(SRCDIR)/config.log: $(SRCDIR)/configure --target=x86_64-snap-linux-gnu $(SRCDIR)/libgmp.la: $(SRCDIR)/config.log - @cd $(SRCDIR); \ - $(MAKE) + @cd $(SRCDIR) && make && make html $(ROOT): $(SRCDIR)/libgmp.la @if [ -d $(ROOT) ]; then \ @@ -65,14 +61,11 @@ $(ROOT): $(SRCDIR)/libgmp.la mkdir -v $(ROOT); \ fi - @cd $(SRCDIR); \ - $(MAKEINST) DESTDIR=$(ROOT) - - @$(SNAPHACKS) + @cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \ + make install-html DESTDIR=$(ROOT) test: $(ROOT) - @cd $(SRCDIR); \ - make check + @cd $(SRCDIR) && make check 2>&1 clean: @rm -rvf $(ROOT) \