Whamcloud - gitweb
030d30b0d1bdf6c45eabc31688d9a1aa3633a1ef
[fs/lustre-release.git] / build / autoMakefile.am.toplevel
1 AUTOMAKE_OPTIONS = foreign
2
3 SUBDIRS := . build @LIBSYSIO_SUBDIR@ portals lustre
4 DIST_SUBDIRS := build libsysio portals lustre
5
6 EXTRA_DIST := config.h.in
7
8 # these empty rules are needed so that automake doesn't add its own
9 # recursive rules
10 etags-recursive:
11
12 ctags-recursive:
13
14 tags-recursive:
15
16 TAGS:
17
18 tags:
19         rm -f $(top_srcdir)/TAGS
20         ETAGSF=`etags --version | grep -iq exuberant && \
21                 echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \
22         find $(top_srcdir) -name '*.[hc]' | xargs etags $$ETAGSF -a
23
24         rm -f $(top_srcdir)/tags
25         CTAGSF=`ctags --version | grep -iq exuberant && \
26                 echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \
27         find $(top_srcdir) -name '*.[hc]' | xargs ctags $$CTAGSF -a
28
29 if MODULES
30 all-sources:
31         $(MAKE) sources -C portals
32         $(MAKE) sources -C lustre
33
34 if LINUX
35 all-am: modules
36
37 if !LINUX25
38 DEP = dep
39 dep: .depend
40
41 .depend: all-sources
42         $(MAKE) $(ARCH_UM) CC="$(CC)" -C $(LINUX_OBJ)                \
43         -f $(PWD)/build/Makefile LUSTRE_LINUX_CONFIG=$(LINUX_CONFIG) \
44         -o scripts -o include/config/MARKER _sfdep_$(PWD)            \
45         _FASTDEP_ALL_SUB_DIRS="$(PWD)"
46
47 CLEANFILES = .depend
48 endif # !LINUX25
49
50 modules: $(DEP) all-sources
51         $(MAKE) $(ARCH_UM) CC="$(CC)" -C $(LINUX_OBJ)                \
52         -f $(PWD)/build/Makefile LUSTRE_LINUX_CONFIG=$(LINUX_CONFIG) \
53         $(MODULE_TARGET)=$(PWD) -o tmp_include_depends -o scripts -o \
54         include/config/MARKER $@
55 endif # LINUX
56
57 endif # MODULES
58
59 dist-hook:
60         find $(distdir) -name .deps | xargs rm -rf
61         find $(distdir) -name CVS | xargs rm -rf
62
63 rpms: dist Makefile
64         rpmbuild -ta $(distdir).tar.gz