aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am14
-rw-r--r--config/deb.am2
-rw-r--r--config/rpm.am8
-rw-r--r--config/tgz.am2
4 files changed, 17 insertions, 9 deletions
diff --git a/Makefile.am b/Makefile.am
index 45474daa4..4e4625794 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,9 +1,5 @@
ACLOCAL_AMFLAGS = -I config
-include config/rpm.am
-include config/deb.am
-include config/tgz.am
-
SUBDIRS = include
if BUILD_LINUX
SUBDIRS += rpm
@@ -54,6 +50,7 @@ EXTRA_DIST += module/zfs/THIRDPARTYLICENSE.cityhash.descrip
@CODE_COVERAGE_RULES@
GITREV = include/zfs_gitrev.h
+CLEANFILES = $(GITREV)
PHONY = gitrev
gitrev:
@@ -68,10 +65,7 @@ gitrev:
mv -f $(GITREV)~ $(GITREV); \
fi
-$(GITREV): gitrev
-
-BUILT_SOURCES = $(GITREV)
-CLEANFILES = $(GITREV)
+all: gitrev
# Double-colon rules are allowed; there are multiple independent definitions.
distclean-local::
@@ -252,4 +246,8 @@ pkg-dkms: @DEFAULT_PACKAGE@-dkms
pkg-kmod: @DEFAULT_PACKAGE@-kmod
pkg-utils: @DEFAULT_PACKAGE@-utils
+include config/rpm.am
+include config/deb.am
+include config/tgz.am
+
.PHONY: $(PHONY)
diff --git a/config/deb.am b/config/deb.am
index 83059a923..88679545a 100644
--- a/config/deb.am
+++ b/config/deb.am
@@ -1,3 +1,5 @@
+PHONY += deb-kmod deb-dkms deb-utils deb deb-local
+
deb-local:
@(if test "${HAVE_DPKGBUILD}" = "no"; then \
echo -e "\n" \
diff --git a/config/rpm.am b/config/rpm.am
index 51a20b3e6..9dd69ade3 100644
--- a/config/rpm.am
+++ b/config/rpm.am
@@ -6,6 +6,12 @@
# Build targets for RPM packages.
###############################################################################
+PHONY += srpm srpms srpm-kmod srpm-dkms srpm-utils
+PHONY += rpm rpms rpm-kmod rpm-dkms rpm-utils
+PHONY += srpm-common rpm-common rpm-local
+
+srpm-kmod srpm-dkms srpm-utils: dist
+
srpm-kmod:
$(MAKE) $(AM_MAKEFLAGS) pkg="${PACKAGE}-kmod" \
def='${SRPM_DEFINE_COMMON} ${SRPM_DEFINE_KMOD}' srpm-common
@@ -54,7 +60,7 @@ rpm-local:
cp $(top_srcdir)/scripts/kmodtool $(rpmbuild)/SOURCES && \
cp $(distdir).tar.gz $(rpmbuild)/SOURCES)
-srpm-common: dist
+srpm-common:
@(dist=`$(RPM) --eval %{?dist}`; \
rpmpkg=$(pkg)-$(VERSION)-$(RELEASE)$$dist*src.rpm; \
rpmspec=$(pkg).spec; \
diff --git a/config/tgz.am b/config/tgz.am
index 0657d045d..4a8491401 100644
--- a/config/tgz.am
+++ b/config/tgz.am
@@ -1,3 +1,5 @@
+PHONY += tgz tgz-kmod tgz-utils tgz-local
+
tgz-local:
@(if test "${HAVE_ALIEN}" = "no"; then \
echo -e "\n" \