A little cleanup of the Makefile

This commit is contained in:
2016-10-28 09:46:01 -05:00
parent f5654b966e
commit 66ba37e2a2

View File

@@ -12,7 +12,7 @@ DEPENDS = glibc
ARCH = x86_64
URL = http://zfsonlinux.org/
DESC = A shim layer which adds the core interfaces required for OpenZFS
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
MAKEINST = make install
SNAPHACKS =
include /usr/share/snap/Makefile.snaplinux
$(SRCDIR)/configure: $(ARCHIVE)
@@ -58,8 +54,7 @@ $(SRCDIR)/config.log: $(SRCDIR)/configure
--target=x86_64-snap-linux-gnu
$(SRCDIR)/module/spl/spl.ko: $(SRCDIR)/config.log
@cd $(SRCDIR); \
$(MAKE)
@cd $(SRCDIR) && make
$(ROOT): $(SRCDIR)/module/spl/spl.ko
@if [ -d $(ROOT) ]; then \
@@ -68,10 +63,7 @@ $(ROOT): $(SRCDIR)/module/spl/spl.ko
mkdir -v $(ROOT); \
fi
@cd $(SRCDIR); \
$(MAKEINST) DESTDIR=$(ROOT)
@$(SNAPHACKS)
@cd $(SRCDIR) && make install DESTDIR=$(ROOT)
test: $(ROOT)
@cd $(SRCDIR); \