Added dependencies, removed usr/share/info/dir and cleaned up Makefile

This commit is contained in:
2016-10-28 16:11:38 -05:00
parent 7aa732e26f
commit 8131c52e63

View File

@@ -8,12 +8,12 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details. # GNU General Public License for more details.
DEPENDS = DEPENDS = glibc,gmp
ARCH = x86_64 ARCH = x86_64
URL = http://www.mpfr.org/ URL = http://www.mpfr.org/
DESC = The MPFR library is a C library for multiple-precision floating-point \ DESC = The MPFR library is a C library for multiple-precision floating-point \
computations with correct rounding. computations with correct rounding.
SNAPVER = sr0 SNAPVER = sr1
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1) ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n') TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
@@ -21,10 +21,6 @@ SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//')
PATCHDIR := $(PWD)/SRC/patches PATCHDIR := $(PWD)/SRC/patches
VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')$(SNAPVER) VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')$(SNAPVER)
MAKE = make && make html
MAKEINST = make install DESTDIR=$(ROOT) && make install-html DESTDIR=$(ROOT)
SNAPHACKS =
include /usr/share/snap/Makefile.snaplinux include /usr/share/snap/Makefile.snaplinux
$(SRCDIR)/configure: $(ARCHIVE) $(SRCDIR)/configure: $(ARCHIVE)
@@ -43,8 +39,9 @@ $(SRCDIR)/configure: $(ARCHIVE)
@touch $(SRCDIR)/configure @touch $(SRCDIR)/configure
$(SRCDIR)/config.log: $(SRCDIR)/configure $(SRCDIR)/config.log: $(SRCDIR)/configure
@cd $(SRCDIR) && for patch in `find $(PATCHDIR) -name \*.patch`; do \ @cd $(SRCDIR) && \
patch --verbose -Np1 -i $$patch; \ for patch in `find $(PATCHDIR) -name \*.patch|sort`; do \
patch --verbose -Np0 -i $$patch; \
done done
@cd $(SRCDIR); \ @cd $(SRCDIR); \
./configure \ ./configure \
@@ -56,8 +53,7 @@ $(SRCDIR)/config.log: $(SRCDIR)/configure
--target=x86_64-snap-linux-gnu --target=x86_64-snap-linux-gnu
$(SRCDIR)/src/grandom.o: $(SRCDIR)/config.log $(SRCDIR)/src/grandom.o: $(SRCDIR)/config.log
@cd $(SRCDIR); \ @cd $(SRCDIR) && make && make html
$(MAKE)
$(ROOT): $(SRCDIR)/src/grandom.o $(ROOT): $(SRCDIR)/src/grandom.o
@if [ -d $(ROOT) ]; then \ @if [ -d $(ROOT) ]; then \
@@ -66,14 +62,12 @@ $(ROOT): $(SRCDIR)/src/grandom.o
mkdir -v $(ROOT); \ mkdir -v $(ROOT); \
fi fi
@cd $(SRCDIR); \ @cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \
$(MAKEINST) make install-html DESTDIR=$(ROOT) && \
rm -v $(ROOT)/usr/share/info/dir
@$(SNAPHACKS)
test: $(ROOT) test: $(ROOT)
@cd $(SRCDIR); \ @cd $(SRCDIR) && make check
make check
clean: clean:
@rm -rvf $(ROOT) \ @rm -rvf $(ROOT) \