]>
Commit | Line | Data |
---|---|---|
c5f70460 BB |
1 | SUBDIRS = lib cmd module include scripts |
2 | ||
f1ca4da6 | 3 | AUTOMAKE_OPTIONS = foreign dist-zip |
0c617c9a | 4 | EXTRA_DIST = autogen.sh spl.spec.in META DISCLAIMER |
0cbaeb11 | 5 | noinst_HEADERS = spl_config.h spl_unconfig.h |
f1ca4da6 | 6 | |
c5f70460 BB |
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 'Module.symvers' \) \ | |
16 | -type f -print | xargs $(RM) | |
17 | ||
18 | install-data-local: | |
0c617c9a | 19 | $(INSTALL) -D spl_config.h $(DESTDIR)/$(LINUX)/include/spl/spl_config.h |
0cbaeb11 | 20 | $(INSTALL) -D spl_unconfig.h $(DESTDIR)/$(LINUX)/include/spl/spl_unconfig.h |
c5f70460 BB |
21 | |
22 | ctags: | |
23 | $(RM) $(top_srcdir)/tags | |
24 | find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags | |
25 | ||
26 | etags: | |
27 | $(RM) $(top_srcdir)/TAGS | |
28 | find $(top_srcdir) -name .pc -prune -o -name '*.[hc]' | xargs etags -a | |
29 | ||
30 | tags: ctags etags | |
31 | ||
32 | rpm-local: | |
33 | mkdir -p $(rpmbuild)/TMP && \ | |
34 | mkdir -p $(rpmbuild)/BUILD && \ | |
35 | mkdir -p $(rpmbuild)/RPMS && \ | |
36 | mkdir -p $(rpmbuild)/SRPMS && \ | |
37 | mkdir -p $(rpmbuild)/SPECS && cp $(PACKAGE).spec $(rpmbuild)/SPECS && \ | |
38 | mkdir -p $(rpmbuild)/SOURCES && cp $(distdir).tar.gz $(rpmbuild)/SOURCES | |
f1ca4da6 | 39 | |
c5f70460 BB |
40 | srpm: dist |
41 | rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ | |
42 | $(MAKE) $(AM_MAKEFLAGS) rpmbuild="$$rpmbuild" rpm-local || exit 1; \ | |
43 | /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; \ | |
44 | cp $$rpmbuild/SRPMS/$(distdir)-$(SPL_META_RELEASE).src.rpm . || exit 1;\ | |
45 | $(RM) -R $$rpmbuild | |
a0aadf56 | 46 | |
c5f70460 BB |
47 | # Use 'make rpm LINUX_VERSION=2.x.y-z' to rebuild the source RPM |
48 | # against any installed kernel-devel-2.x.y-z package. This will | |
49 | # override the LINUX_VERSION detected at configure time. | |
50 | rpm: srpm | |
51 | rpmbuild=`mktemp -t -d $(PACKAGE)-build-$$USER-XXXXXXXX`; \ | |
52 | $(MAKE) $(AM_MAKEFLAGS) rpmbuild="$$rpmbuild" rpm-local || exit 1; \ | |
53 | /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; \ | |
54 | cp $$rpmbuild/RPMS/*/* . || exit 1; \ | |
55 | $(RM) -R $$rpmbuild |