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