-EXTRA_DIST = @PACKAGE_TARNAME@.spec \
- build/Makefile build/lbuild* \
- build/Rules.in \
- build/update_oldconfig \
- build/autoconf/lustre-build-linux.m4 \
- build/autoconf/lustre-build-darwin.m4 \
- build/autoconf/lustre-build-ldiskfs.m4 \
- build/autoconf/lustre-build.m4 build/rdac_spec \
- 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//'); \
- 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=[^ ][^ ]*//'); \
+EXTRA_DIST = @PACKAGE_TARNAME@.spec \
+ build/Makefile \
+ build/Rules.in \
+ build/gen_filelist.sh
+
+rpms: @PACKAGE_TARNAME@.spec dist Makefile
+ @CONFIGURE_ARGS=""; \
+ for arg in $(ac_configure_args); do \
+ case $$arg in \
+ --with-release=* ) ;; \
+ --enable-tests | --disable-tests ) ;; \
+ --with-linux=* | --with-linux-obj=* ) ;; \
+ * ) CONFIGURE_ARGS="$$CONFIGURE_ARGS '$$arg'" ;; \
+ esac; \
+ done; \
+ RPMARGS="--define \"configure_args $$CONFIGURE_ARGS\""; \
+ if [ -n "@LINUX@" ]; then \
+ RPMARGS="$$RPMARGS --define \"kdir @LINUX@\""; \