Move zfs.release generation to configure step
[zfs.git] / Makefile.am
1 include $(top_srcdir)/config/rpm.am
2 include $(top_srcdir)/config/deb.am
3 include $(top_srcdir)/config/tgz.am
4 include $(top_srcdir)/config/arch.am
5
6 if CONFIG_USER
7 USER_DIR = dracut udev etc man scripts lib cmd
8 endif
9 if CONFIG_KERNEL
10 KERNEL_DIR = module
11 endif
12 SUBDIRS = $(USER_DIR) $(KERNEL_DIR) include
13
14 AUTOMAKE_OPTIONS = foreign
15 EXTRA_DIST  = autogen.sh zfs.spec.in zfs-modules.spec.in
16 EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am
17 EXTRA_DIST += META DISCLAIMER COPYRIGHT README.markdown
18 EXTRA_DIST += OPENSOLARIS.LICENSE ZFS.RELEASE
19 noinst_HEADERS = zfs_config.h zfs.release
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 '.script-config' -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                 -type f -print | xargs $(RM)
32
33 if CONFIG_KERNEL
34 install-data-local:
35         release=$(ZFS_META_VERSION)-$(ZFS_META_RELEASE); \
36         instdest=$(DESTDIR)/usr/src/zfs-$$release/$(LINUX_VERSION); \
37         for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \
38                 $(INSTALL) -D $$instfile $$instdest/$$instfile; \
39         done
40 endif
41
42 ctags:
43         $(RM) $(top_srcdir)/tags
44         find $(top_srcdir) -name .git -prune -o -name '*.[hc]' | xargs ctags
45
46 etags:
47         $(RM) $(top_srcdir)/TAGS
48         find $(top_srcdir) -name .pc -prune -o -name '*.[hc]' | xargs etags -a
49
50 tags: ctags etags
51
52 pkg: @DEFAULT_PACKAGE@
53 pkg-modules: @DEFAULT_PACKAGE@-modules
54 pkg-utils: @DEFAULT_PACKAGE@-utils