2009-03-05 17:08:07 +00:00
|
|
|
SUBDIRS = lib cmd module include scripts
|
|
|
|
|
2008-02-26 20:36:04 +00:00
|
|
|
AUTOMAKE_OPTIONS = foreign dist-zip
|
2009-03-10 17:57:52 +00:00
|
|
|
EXTRA_DIST = autogen.sh spl.spec.in META DISCLAIMER
|
2009-03-17 21:55:59 +00:00
|
|
|
noinst_HEADERS = spl_config.h spl_unconfig.h
|
2008-02-26 20:36:04 +00:00
|
|
|
|
2009-03-05 17:08:07 +00:00
|
|
|
distclean-local::
|
|
|
|
-$(RM) -R autom4te*.cache
|
|
|
|
-find . \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \
|
|
|
|
-o -name .pc -o -name .hg -o -name .git \) -prune -o \
|
|
|
|
\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
|
|
|
|
-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' \
|
2009-06-16 18:34:28 +00:00
|
|
|
-o -name 'Makefile' -o -name '$(LINUX_SYMBOLS)' \) \
|
2009-03-05 17:08:07 +00:00
|
|
|
-type f -print | xargs $(RM)
|
|
|
|
|
|
|
|
install-data-local:
|
2009-06-26 23:30:44 +00:00
|
|
|
destname=spl-$(SPL_META_VERSION)/$(LINUX_VERSION); \
|
|
|
|
instdest=$(DESTDIR)/${prefix}/src/$$destname; \
|
2009-06-16 18:34:28 +00:00
|
|
|
for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \
|
2009-06-16 17:44:59 +00:00
|
|
|
$(INSTALL) -D $$instfile $$instdest/$$instfile; \
|
|
|
|
done
|
2009-03-05 17:08:07 +00:00
|
|
|
|
|
|
|
ctags:
|
|
|
|
$(RM) $(top_srcdir)/tags
|
|
|
|
find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags
|
|
|
|
|
|
|
|
etags:
|
|
|
|
$(RM) $(top_srcdir)/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
|
2008-02-26 20:36:04 +00:00
|
|
|
|
2009-03-05 17:08:07 +00:00
|
|
|
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
|
2008-02-27 20:52:44 +00:00
|
|
|
|
2009-03-05 17:08:07 +00:00
|
|
|
# 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; \
|
2009-06-16 17:44:59 +00:00
|
|
|
/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; \
|
2009-03-05 17:08:07 +00:00
|
|
|
cp $$rpmbuild/RPMS/*/* . || exit 1; \
|
|
|
|
$(RM) -R $$rpmbuild
|