A little cleanup of the Makefile
This commit is contained in:
14
Makefile
14
Makefile
@@ -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); \
|
||||
|
||||
Reference in New Issue
Block a user