|
| 1 | +include $(top_srcdir)/config/rpm.am |
| 2 | +include ${top_srcdir}/config/deb.am |
| 3 | +include ${top_srcdir}/config/tgz.am |
| 4 | + |
| 5 | +if CONFIG_USER |
| 6 | +USER_DIR = config etc man scripts lib cmd |
| 7 | +endif |
| 8 | +if CONFIG_KERNEL |
| 9 | +KERNEL_DIR = module |
| 10 | +endif |
| 11 | +SUBDIRS = $(USER_DIR) $(KERNEL_DIR) |
| 12 | + |
| 13 | +AUTOMAKE_OPTIONS = foreign dist-zip |
| 14 | +EXTRA_DIST = autogen.sh zfs.spec.in zfs-modules.spec.in |
| 15 | +EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am |
| 16 | +EXTRA_DIST += META DISCLAIMER COPYRIGHT GIT README.markdown |
| 17 | +EXTRA_DIST += OPENSOLARIS.LICENSE ZFS.RELEASE |
| 18 | + |
| 19 | +noinst_HEADERS = zfs_config.h |
| 20 | + |
| 21 | +distclean-local:: |
| 22 | + -$(RM) -R autom4te*.cache |
| 23 | + -find . \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \ |
| 24 | + -o -name .pc -o -name .hg -o -name .git \) -prune -o \ |
| 25 | + \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ |
| 26 | + -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ |
| 27 | + -o -name '.*.rej' -o -name 'aclocal.m4' -o -size 0 \ |
| 28 | + -o -name '*%' -o -name '.*.cmd' -o -name 'core' \ |
| 29 | + -o -name 'Makefile' -o -name 'Module.symvers' \ |
| 30 | + -o -name '*.order' -o -name '*.markers' \ |
| 31 | + -o -name '.script-config' \) \ |
| 32 | + -type f -print | xargs $(RM) |
| 33 | + |
| 34 | +if CONFIG_KERNEL |
| 35 | +install-data-local: |
| 36 | + destname=zfs-$(ZFS_META_VERSION)/$(LINUX_VERSION); \ |
| 37 | + instdest=$(DESTDIR)/usr/src/$$destname; \ |
| 38 | + echo "${ZFS_META_VERSION}" >$$instdest/zfs.release; \ |
| 39 | + for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ |
| 40 | + $(INSTALL) -D $$instfile $$instdest/$$instfile; \ |
| 41 | + done |
| 42 | +endif |
| 43 | + |
| 44 | +ctags: |
| 45 | + $(RM) $(top_srcdir)/tags |
| 46 | + find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags |
| 47 | + |
| 48 | +etags: |
| 49 | + $(RM) $(top_srcdir)/TAGS |
| 50 | + find $(top_srcdir) -name .pc -prune -o -name '*.[hc]' | xargs etags -a |
| 51 | + |
| 52 | +tags: ctags etags |
| 53 | + |
| 54 | +pkg: @DEFAULT_PACKAGE@ |
| 55 | +pkg-modules: @DEFAULT_PACKAGE@-modules |
| 56 | +pkg-utils: @DEFAULT_PACKAGE@-utils |
0 commit comments