Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / build / autoMakefile.am.toplevel
index 644a47e..3f4e235 100644 (file)
@@ -11,25 +11,35 @@ ctags-recursive:
 
 tags-recursive:
 
-TAGS:
+TAGS: etags
 
-tags:
-       rm -f $(top_srcdir)/TAGS
+tags: ctags etags
+
+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 $(top_srcdir) -name .pc -prune -o -name '*.[hc]' |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 $(top_srcdir) -name .pc -prune -o -name '*.[hc]' |xargs ctags $$CTAGSF -a
+
+cscope-recursive:
+
+cscope:
+       $(RM) $(top_srcdir)/cscope*.out $(top_srcdir)/cscope.files
+       find $(top_srcdir) -name .pc -prune -o -name '*.[hc]' > cscope.files
+       cscope -bRq
 
 if MODULES
 sources: all-sources
 
-all-sources:
+all-sources: $(EXTRA_SOURCES)
        for dir in $(SOURCES_SUBDIRS) ; do \
-               $(MAKE) sources -C $$dir ; \
+               $(MAKE) sources -C $$dir || exit $$? ; \
        done
 
 if LINUX
@@ -51,9 +61,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) -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
@@ -61,10 +69,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      \
@@ -89,6 +103,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
 
@@ -96,6 +111,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