Whamcloud - gitweb
b=24022 don't return NULL in lprocfs_alloc_stats to satisfy userspace error checker
[fs/lustre-release.git] / build / autoMakefile.am.toplevel
index 5ed02a7..524d9dd 100644 (file)
@@ -94,20 +94,31 @@ dist-hook:
          module-dist-hook
 
 EXTRA_DIST = @PACKAGE_TARNAME@.spec                                    \
-       build/Makefile build/autoMakefile.am.toplevel build/lbuild      \
+       build/Makefile build/autoMakefile.am.toplevel build/lbuild*     \
        build/Rules.in                                                  \
        build/update_oldconfig                                          \
        build/autoconf/lustre-build-linux.m4                            \
        build/autoconf/lustre-build-darwin.m4                           \
        build/autoconf/lustre-build.m4 build/rdac_spec                  \
-       build/mptlinux.spec.patch build/patches
+       build/mptlinux.spec.patch build/patches                         \
+       build/funcs.sh build/find_linux_rpms build/exit_traps.sh
 
 rpms-real: @PACKAGE_TARNAME@.spec dist Makefile
        CONFIGURE_ARGS=$$(echo $$(eval echo $(ac_configure_args)) | sed -re 's/--(en|dis)able-tests//'); \
-       RPMARGS="--define \"configure_args $$CONFIGURE_ARGS\""; \
+       if [ -n "@LINUX@" ]; then \
+               CONFIGURE_ARGS=$$(echo $$(eval echo $$CONFIGURE_ARGS) | sed -re 's/--with-linux=[^ ][^ ]*//'); \
+               RPMARGS="--define \"kdir @LINUX@\""; \
+               CONFIGURE_ARGS=$$(echo $$(eval echo $$CONFIGURE_ARGS) | sed -re 's/--with-linux-obj=[^ ][^ ]*//'); \
+               if [ -n "@LINUX_OBJ@" -a "@LINUX_OBJ@" != "@LINUX@" ]; then \
+                       RPMARGS="$$RPMARGS --define \"kobjdir @LINUX_OBJ@\""; \
+               fi; \
+       fi; \
+       CONFIGURE_ARGS=$$(echo $$(eval echo $$CONFIGURE_ARGS) | sed -re 's/--with-release=[^ ][^ ]*//'); \
+       RPMARGS="$$RPMARGS --define \"configure_args $$CONFIGURE_ARGS\""; \
        if ! $(BUILD_TESTS); then \
                RPMARGS="$$RPMARGS --define \"build_lustre_tests 0\""; \
        fi; \
+       echo "Building Lustre RPM with $$RPMARGS"; \
        eval rpmbuild $$RPMARGS -ta $(distdir).tar.gz
 
 srpm-real: @PACKAGE_TARNAME@.spec dist Makefile
@@ -148,7 +159,7 @@ debs:
                echo -e "1i\nlustre ($$lversion-1) unstable; urgency=low\n\n  * Automated changelog entry update\n\n -- Brian J. Murrell <brian@interlinx.bc.ca>  $$(date -R)\n\n.\nwq" | ed debian/changelog; \
        fi; \
        if [ -d .git ]; then \
-               ver=$$(git describe --match v\* --tags); \
+               ver=$$(git describe --match [0-9v]\* --tags); \
                if [[ $$ver = *-*-* ]]; then \
                        hash=$${ver##*-}; \
                        ffw=$${ver#*-}; \