]> git.proxmox.com Git - mirror_spl-debian.git/blobdiff - Makefile.am
dch: close a bug and refresh timestamp.
[mirror_spl-debian.git] / Makefile.am
index 37182fe7f510d819230627a81fa60a5c75925db5..05107cb19e1c5c79d200f0bef29220fb6fce44ca 100644 (file)
@@ -1,8 +1,27 @@
-SUBDIRS = lib cmd module include scripts
 
-AUTOMAKE_OPTIONS = foreign dist-zip
-EXTRA_DIST = autogen.sh spl.spec.in META DISCLAIMER
-noinst_HEADERS = spl_config.h
+ACLOCAL_AMFLAGS = -I config
+
+include config/rpm.am
+include config/deb.am
+include config/tgz.am
+
+SUBDIRS = include rpm
+if CONFIG_USER
+SUBDIRS += lib cmd man scripts
+endif
+if CONFIG_KERNEL
+SUBDIRS += module
+
+extradir = @prefix@/src/spl-$(VERSION)
+extra_HEADERS = spl.release.in spl_config.h.in
+
+kerneldir = @prefix@/src/spl-$(VERSION)/$(LINUX_VERSION)
+nodist_kernel_HEADERS = spl.release spl_config.h module/$(LINUX_SYMBOLS)
+endif
+
+AUTOMAKE_OPTIONS = foreign
+EXTRA_DIST  = autogen.sh META DISCLAIMER copy-builtin
+EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am
 
 distclean-local::
        -$(RM) -R autom4te*.cache
@@ -12,43 +31,25 @@ distclean-local::
                -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
                -o -name '.*.rej' -o -name 'aclocal.m4' -o -size 0 \
                -o -name '*%' -o -name '.*.cmd' -o -name 'core' \
-               -o -name 'Makefile' -o -name 'Module.symvers' \) \
+               -o -name 'Makefile' -o -name '$(LINUX_SYMBOLS)' \
+               -o -name '*.order' -o -name '*.markers' \) \
                -type f -print | xargs $(RM)
 
-install-data-local:
-       $(INSTALL) -D spl_config.h $(DESTDIR)/$(LINUX)/include/spl/spl_config.h
+dist-hook:
+       sed -i 's/Release:[[:print:]]*/Release:      $(RELEASE)/' \
+               $(distdir)/META
 
 ctags:
-       $(RM) $(top_srcdir)/tags
+       $(RM) tags
        find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags
 
 etags:
-       $(RM) $(top_srcdir)/TAGS
+       $(RM) TAGS
        find $(top_srcdir) -name .pc -prune -o -name '*.[hc]' | xargs etags -a
 
 tags: ctags etags
 
-rpm-local:
-       mkdir -p $(rpmbuild)/TMP && \
-       mkdir -p $(rpmbuild)/BUILD && \
-       mkdir -p $(rpmbuild)/RPMS && \
-       mkdir -p $(rpmbuild)/SRPMS && \
-       mkdir -p $(rpmbuild)/SPECS && cp $(PACKAGE).spec $(rpmbuild)/SPECS && \
-       mkdir -p $(rpmbuild)/SOURCES && cp $(distdir).tar.gz $(rpmbuild)/SOURCES
-
-srpm: dist
-       rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \
-       $(MAKE) $(AM_MAKEFLAGS) rpmbuild="$$rpmbuild" rpm-local || exit 1; \
-       /usr/bin/rpmbuild --define "_tmppath $$rpmbuild/TMP" --define "_topdir $$rpmbuild" --define "build_src_rpm 1" --define "dist %{nil}" --nodeps -bs $$rpmbuild/SPECS/$(PACKAGE).spec || exit 1; \
-       cp $$rpmbuild/SRPMS/$(distdir)-$(SPL_META_RELEASE).src.rpm . || exit 1;\
-       $(RM) -R $$rpmbuild
-
-# Use 'make rpm LINUX_VERSION=2.x.y-z' to rebuild the source RPM
-# against any installed kernel-devel-2.x.y-z package.  This will
-# override the LINUX_VERSION detected at configure time.
-rpm: srpm
-       rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \
-       $(MAKE) $(AM_MAKEFLAGS) rpmbuild="$$rpmbuild" rpm-local || exit 1; \
-       /usr/bin/rpmbuild --define "_tmppath $$rpmbuild/TMP" --define "_topdir $$rpmbuild" --define "dist %{nil}" --define "require_kver $(LINUX_VERSION)" --nodeps --rebuild $(distdir)-$(SPL_META_RELEASE).src.rpm || exit 1; \
-       cp $$rpmbuild/RPMS/*/* . || exit 1; \
-       $(RM) -R $$rpmbuild
+pkg: @DEFAULT_PACKAGE@
+pkg-dkms: @DEFAULT_PACKAGE@-dkms
+pkg-kmod: @DEFAULT_PACKAGE@-kmod
+pkg-utils: @DEFAULT_PACKAGE@-utils