Whamcloud - gitweb
b=20748
[fs/lustre-release.git] / build / autoMakefile.am.toplevel
1 # This file is included by each package's toplevel autoMakefile[.am],
2 # which must define SUBDIRS as a minimum.
3
4 AUTOMAKE_OPTIONS = foreign
5
6 # these empty rules are needed so that automake doesn't add its own
7 # recursive rules
8 etags-recursive:
9
10 ctags-recursive:
11
12 tags-recursive:
13
14 TAGS: etags
15
16 tags: ctags etags
17
18 etags:
19         $(RM) $(top_srcdir)/TAGS
20         ETAGSF=`etags --version | grep -iq exuberant && \
21                 echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \
22         find $(top_srcdir) -name '*.[hc]'|grep -v "\.pc"|xargs etags $$ETAGSF -a
23
24 ctags:
25         $(RM) $(top_srcdir)/tags
26         CTAGSF=`ctags --version | grep -iq exuberant && \
27                 echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \
28         find $(top_srcdir) -name '*.[hc]'|grep -v "\.pc"|xargs ctags $$CTAGSF -a
29
30 cscope-recursive:
31
32 cscope:
33         $(RM) $(top_srcdir)/cscope*.out $(top_srcdir)/cscope.files
34         find $(top_srcdir) -name '*.[hc]' | grep -v "\.pc" > cscope.files
35         cscope -bRq
36
37 doxygen:  doxygen-api doxygen-ref
38
39 doxygen-%: build/doxyfile.%
40            doxygen $<
41
42 if MODULES
43 sources: all-sources
44
45 all-sources: $(EXTRA_SOURCES)
46         for dir in $(SOURCES_SUBDIRS) ; do \
47                 $(MAKE) sources -C $$dir || exit $$? ; \
48         done
49
50 if LINUX
51 all-am: modules
52
53 if !LINUX25
54 DEP = dep
55 dep: .depend
56
57 .depend: all-sources
58         $(MAKE) $(ARCH_UM) CC="$(CC)" -C $(LINUX_OBJ)                \
59         -f $(PWD)/build/Makefile LUSTRE_LINUX_CONFIG=$(LINUX_CONFIG) \
60         -o scripts -o include/config/MARKER _sfdep_$(PWD)            \
61         _FASTDEP_ALL_SUB_DIRS="$(PWD)"
62
63 CLEANFILES = .depend
64 endif # !LINUX25
65
66 modules: $(DEP) all-sources
67         $(MAKE) $(ARCH_UM) CC="$(CC)" -C $(LINUX_OBJ)                \
68         -f $(PWD)/build/Makefile LUSTRE_LINUX_CONFIG=$(LINUX_CONFIG) \
69         LINUXINCLUDE='$(EXTRA_LNET_INCLUDE) -I$$(srctree)/arch/$$(SRCARCH)/include -Iinclude $$(if $$(KBUILD_SRC),-Iinclude2 -I$$(srctree)/include) -include include/linux/autoconf.h' \
70         $(MODULE_TARGET)=$(PWD) -o tmp_include_depends -o scripts -o \
71         include/config/MARKER $@
72 endif # LINUX
73
74 endif # MODULES
75
76 dist-hook:
77         $(RM) $(distdir)/ldiskfs/*.spec
78         $(RM) $(distdir)/lustre-iokit/*.spec
79         find $(distdir) -name .deps -o \
80                         -name CVS -o \
81                         -name .svn -o \
82                         -name .git -o \
83                         -name .#* | xargs rm -rf
84         $(MAKE) $(AM_MAKEFLAGS) \
85           top_distdir="$(top_distdir)" distdir="$(distdir)" \
86           module-dist-hook
87
88 EXTRA_DIST = @PACKAGE_TARNAME@.spec                                     \
89         build/Makefile build/autoMakefile.am.toplevel build/lbuild      \
90         build/linux-merge-config.awk build/linux-merge-modules.awk      \
91         build/linux-rhconfig.h build/lmake build/Rules.in               \
92         build/lustre-kernel-2.4.spec.in build/suse-functions.sh         \
93         build/suse-post.sh build/suse-postun.sh                         \
94         build/suse-trigger-script.sh.in build/README.kernel-source      \
95         build/sles8-post.sh build/sles8-postun.sh build/sles8-pre.sh    \
96         build/sles8-update_INITRD_MODULES.sh                            \
97         build/sles8-update_rcfile_setting.sh build/update_oldconfig     \
98         build/autoconf/lustre-build-linux.m4                            \
99         build/autoconf/lustre-build.m4
100
101 rpms-real: @PACKAGE_TARNAME@.spec dist Makefile
102         rpmbuild -ta $(distdir).tar.gz
103
104 srpm-real: @PACKAGE_TARNAME@.spec dist Makefile
105         rpmbuild -ts $(distdir).tar.gz
106
107 rpms:
108         for subdir in $(RPM_SUBDIRS) ; do                               \
109                 echo "Making rpms in $$subdir";                         \
110                 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) rpms);          \
111                 echo "Finished rpms in $$subdir";                       \
112         done;                                                           \
113         $(MAKE) $(AM_MAKEFLAGS) rpms-real
114
115 srpm:
116         for subdir in $(RPM_SUBDIRS) ; do                               \
117                 echo "Making srpm in $$subdir";                         \
118                 (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) srpm);          \
119                 echo "Finished srpms in $$subdir";                      \
120         done;                                                           \
121         $(MAKE) $(AM_MAKEFLAGS) srpm-real
122