Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / build / autoMakefile.am.toplevel
index 1084b12..4ec9b6b 100644 (file)
@@ -3,6 +3,10 @@
 
 AUTOMAKE_OPTIONS = foreign
 
+FIND_TAG_FILES_CMD = find $(top_srcdir) \
+                    -path $(top_srcdir)/ldiskfs/ldiskfs/linux-stage -prune -false -o\
+                    -type f -name '*.[hc]'
+
 # these empty rules are needed so that automake doesn't add its own
 # recursive rules
 etags-recursive:
@@ -11,18 +15,37 @@ ctags-recursive:
 
 tags-recursive:
 
-TAGS:
+TAGS: etags
+
+tags: ctags etags
 
-tags:
-       rm -f $(top_srcdir)/TAGS
+etags:
+       $(RM) $(top_srcdir)/TAGS
        ETAGSF=`etags --version | grep -iq exuberant && \
                echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \
-       find $(top_srcdir) -name '*.[hc]' |grep -v linux-stage |xargs etags $$ETAGSF -a
+       $(FIND_TAG_FILES_CMD) | xargs etags $$ETAGSF -a
 
-       rm -f $(top_srcdir)/tags
+ctags:
+       $(RM) $(top_srcdir)/tags
        CTAGSF=`ctags --version | grep -iq exuberant && \
                echo "-I __initdata,__exitdata,EXPORT_SYMBOL"`; \
-       find $(top_srcdir) -name '*.[hc]' |grep -v linux-stage |xargs ctags $$CTAGSF -a
+       $(FIND_TAG_FILES_CMD) | xargs ctags $$CTAGSF -a
+
+cscope-recursive:
+
+cscope:
+       $(RM) $(top_srcdir)/cscope*.out $(top_srcdir)/cscope.files
+       $(FIND_TAG_FILES_CMD) > cscope.files
+       cscope -bRq
+
+mkid:
+       $(FIND_TAG_FILES_CMD) | xargs mkid
+       
+
+doxygen:  doxygen-api doxygen-ref
+
+doxygen-%: build/doxyfile.%
+          doxygen $<
 
 if MODULES
 sources: all-sources
@@ -51,7 +74,7 @@ endif # !LINUX25
 modules: $(DEP) all-sources
        $(MAKE) $(ARCH_UM) CC="$(CC)" -C $(LINUX_OBJ)                \
        -f $(PWD)/build/Makefile LUSTRE_LINUX_CONFIG=$(LINUX_CONFIG) \
-        LINUXINCLUDE='$(EXTRA_LNET_INCLUDE) -Iinclude $$(if $$(KBUILD_SRC),-Iinclude2 -I$$(srctree)/include) -include include/linux/autoconf.h' \
+        LINUXINCLUDE='$(EXTRA_LNET_INCLUDE) -I$$(srctree)/arch/$$(SRCARCH)/include -Iinclude $$(if $$(KBUILD_SRC),-Iinclude2 -I$$(srctree)/include) -include include/linux/autoconf.h' \
        $(MODULE_TARGET)=$(PWD) -o tmp_include_depends -o scripts -o \
        include/config/MARKER $@
 endif # LINUX
@@ -59,10 +82,16 @@ endif # LINUX
 endif # MODULES
 
 dist-hook:
+       $(RM) $(distdir)/ldiskfs/*.spec
+       $(RM) $(distdir)/lustre-iokit/*.spec
        find $(distdir) -name .deps -o \
                        -name CVS -o \
                        -name .svn -o \
+                       -name .git -o \
                        -name .#* | xargs rm -rf
+       $(MAKE) $(AM_MAKEFLAGS) \
+         top_distdir="$(top_distdir)" distdir="$(distdir)" \
+         module-dist-hook
 
 EXTRA_DIST = @PACKAGE_TARNAME@.spec                                    \
        build/Makefile build/autoMakefile.am.toplevel build/lbuild      \
@@ -87,6 +116,7 @@ rpms:
        for subdir in $(RPM_SUBDIRS) ; do                               \
                echo "Making rpms in $$subdir";                         \
                (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) rpms);          \
+               echo "Finished rpms in $$subdir";                       \
        done;                                                           \
        $(MAKE) $(AM_MAKEFLAGS) rpms-real
 
@@ -94,6 +124,7 @@ srpm:
        for subdir in $(RPM_SUBDIRS) ; do                               \
                echo "Making srpm in $$subdir";                         \
                (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) srpm);          \
+               echo "Finished srpms in $$subdir";                      \
        done;                                                           \
        $(MAKE) $(AM_MAKEFLAGS) srpm-real