]> git.proxmox.com Git - mirror_spl-debian.git/blob - Makefile.am
Packaging improvements for RHEL and SLES (part 2)
[mirror_spl-debian.git] / Makefile.am
1 SUBDIRS = lib cmd module include scripts
2
3 AUTOMAKE_OPTIONS = foreign dist-zip
4 EXTRA_DIST = autogen.sh spl.spec.in META DISCLAIMER
5 noinst_HEADERS = spl_config.h spl_unconfig.h
6
7 distclean-local::
8 -$(RM) -R autom4te*.cache
9 -find . \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \
10 -o -name .pc -o -name .hg -o -name .git \) -prune -o \
11 \( -name '*.orig' -o -name '*.rej' -o -name '*~' \
12 -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
13 -o -name '.*.rej' -o -name 'aclocal.m4' -o -size 0 \
14 -o -name '*%' -o -name '.*.cmd' -o -name 'core' \
15 -o -name 'Makefile' -o -name '$(LINUX_SYMBOLS)' \) \
16 -type f -print | xargs $(RM)
17
18 install-data-local:
19 instdest=$(DESTDIR)/${prefix}/src/spl-$(SPL_META_VERSION); \
20 for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \
21 $(INSTALL) -D $$instfile $$instdest/$$instfile; \
22 done
23 (cd $(DESTDIR)/${prefix}/src && ln -f -s spl-$(SPL_META_VERSION) spl)
24
25 ctags:
26 $(RM) $(top_srcdir)/tags
27 find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags
28
29 etags:
30 $(RM) $(top_srcdir)/TAGS
31 find $(top_srcdir) -name .pc -prune -o -name '*.[hc]' | xargs etags -a
32
33 tags: ctags etags
34
35 rpm-local:
36 mkdir -p $(rpmbuild)/TMP && \
37 mkdir -p $(rpmbuild)/BUILD && \
38 mkdir -p $(rpmbuild)/RPMS && \
39 mkdir -p $(rpmbuild)/SRPMS && \
40 mkdir -p $(rpmbuild)/SPECS && cp $(PACKAGE).spec $(rpmbuild)/SPECS && \
41 mkdir -p $(rpmbuild)/SOURCES && cp $(distdir).tar.gz $(rpmbuild)/SOURCES
42
43 srpm: dist
44 rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \
45 $(MAKE) $(AM_MAKEFLAGS) rpmbuild="$$rpmbuild" rpm-local || exit 1; \
46 /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; \
47 cp $$rpmbuild/SRPMS/$(distdir)-$(SPL_META_RELEASE).src.rpm . || exit 1;\
48 $(RM) -R $$rpmbuild
49
50 # Use 'make rpm LINUX_VERSION=2.x.y-z' to rebuild the source RPM
51 # against any installed kernel-devel-2.x.y-z package. This will
52 # override the LINUX_VERSION detected at configure time.
53 rpm: srpm
54 rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \
55 $(MAKE) $(AM_MAKEFLAGS) rpmbuild="$$rpmbuild" rpm-local || exit 1; \
56 /usr/bin/rpmbuild --define "_tmppath $$rpmbuild/TMP" --define "_topdir $$rpmbuild" --define "dist %{nil}" --define "require_kdir $(LINUX)" --define "require_kobj $(LINUX_OBJ)" --define "require_kver $(LINUX_VERSION)" --nodeps --rebuild $(distdir)-$(SPL_META_RELEASE).src.rpm || exit 1; \
57 cp $$rpmbuild/RPMS/*/* . || exit 1; \
58 $(RM) -R $$rpmbuild