Move spl.release generation to configure step

Previously, the spl.release file was created at 'make install' time.
This is slightly problematic when the file is needed without running
'make install'. Because of this, the step creating the file was removed
from 'make install' and replaced with a more appropriate spl.release.in
file.

As a result, the spl.release file will now be created earlier as part
of the 'configure' step as opposed to the 'make install' step.

Signed-off-by: Prakash Surya <surya1@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #135
This commit is contained in:
Prakash Surya 2012-07-11 15:47:56 -07:00 committed by Brian Behlendorf
parent 36811b4430
commit d801db1487
5 changed files with 14 additions and 11 deletions

View File

@ -14,7 +14,7 @@ SUBDIRS = $(USER_DIR) $(KERNEL_DIR)
AUTOMAKE_OPTIONS = foreign AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = autogen.sh spl.spec.in spl-modules.spec.in META DISCLAIMER EXTRA_DIST = autogen.sh spl.spec.in spl-modules.spec.in META DISCLAIMER
EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am
noinst_HEADERS = spl_config.h noinst_HEADERS = spl_config.h spl.release
distclean-local:: distclean-local::
-$(RM) -R autom4te*.cache -$(RM) -R autom4te*.cache
@ -32,7 +32,6 @@ if CONFIG_KERNEL
install-data-local: install-data-local:
release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \
instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \
echo "$$release" >$$instdest/spl.release; \
for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \
$(INSTALL) -D $$instfile $$instdest/$$instfile; \ $(INSTALL) -D $$instfile $$instdest/$$instfile; \
done done

View File

@ -80,11 +80,11 @@ target_triplet = @target@
DIST_COMMON = $(am__configure_deps) $(noinst_HEADERS) \ DIST_COMMON = $(am__configure_deps) $(noinst_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/PKGBUILD-spl-modules.in $(srcdir)/PKGBUILD-spl.in \ $(srcdir)/PKGBUILD-spl-modules.in $(srcdir)/PKGBUILD-spl.in \
$(srcdir)/spl-modules.spec.in $(srcdir)/spl.spec.in \ $(srcdir)/spl-modules.spec.in $(srcdir)/spl.release.in \
$(srcdir)/spl_config.h.in $(top_srcdir)/config/arch.am \ $(srcdir)/spl.spec.in $(srcdir)/spl_config.h.in \
$(top_srcdir)/config/deb.am $(top_srcdir)/config/rpm.am \ $(top_srcdir)/config/arch.am $(top_srcdir)/config/deb.am \
$(top_srcdir)/config/tgz.am $(top_srcdir)/configure \ $(top_srcdir)/config/rpm.am $(top_srcdir)/config/tgz.am \
$(top_srcdir)/module/Makefile.in \ $(top_srcdir)/configure $(top_srcdir)/module/Makefile.in \
$(top_srcdir)/module/spl/Makefile.in \ $(top_srcdir)/module/spl/Makefile.in \
$(top_srcdir)/module/splat/Makefile.in AUTHORS COPYING \ $(top_srcdir)/module/splat/Makefile.in AUTHORS COPYING \
ChangeLog INSTALL config/config.guess config/config.sub \ ChangeLog INSTALL config/config.guess config/config.sub \
@ -102,7 +102,7 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = spl_config.h CONFIG_HEADER = spl_config.h
CONFIG_CLEAN_FILES = module/Makefile module/spl/Makefile \ CONFIG_CLEAN_FILES = module/Makefile module/spl/Makefile \
module/splat/Makefile spl.spec spl-modules.spec PKGBUILD-spl \ module/splat/Makefile spl.spec spl-modules.spec PKGBUILD-spl \
PKGBUILD-spl-modules PKGBUILD-spl-modules spl.release
CONFIG_CLEAN_VPATH_FILES = CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V)) AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
@ -332,7 +332,7 @@ AUTOMAKE_OPTIONS = foreign
EXTRA_DIST = autogen.sh spl.spec.in spl-modules.spec.in META \ EXTRA_DIST = autogen.sh spl.spec.in spl-modules.spec.in META \
DISCLAIMER config/config.awk config/rpm.am config/deb.am \ DISCLAIMER config/config.awk config/rpm.am config/deb.am \
config/tgz.am config/tgz.am
noinst_HEADERS = spl_config.h noinst_HEADERS = spl_config.h spl.release
all: spl_config.h all: spl_config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive $(MAKE) $(AM_MAKEFLAGS) all-recursive
@ -402,6 +402,8 @@ PKGBUILD-spl: $(top_builddir)/config.status $(srcdir)/PKGBUILD-spl.in
cd $(top_builddir) && $(SHELL) ./config.status $@ cd $(top_builddir) && $(SHELL) ./config.status $@
PKGBUILD-spl-modules: $(top_builddir)/config.status $(srcdir)/PKGBUILD-spl-modules.in PKGBUILD-spl-modules: $(top_builddir)/config.status $(srcdir)/PKGBUILD-spl-modules.in
cd $(top_builddir) && $(SHELL) ./config.status $@ cd $(top_builddir) && $(SHELL) ./config.status $@
spl.release: $(top_builddir)/config.status $(srcdir)/spl.release.in
cd $(top_builddir) && $(SHELL) ./config.status $@
mostlyclean-libtool: mostlyclean-libtool:
-rm -f *.lo -rm -f *.lo
@ -1032,7 +1034,6 @@ distclean-local::
@CONFIG_KERNEL_TRUE@install-data-local: @CONFIG_KERNEL_TRUE@install-data-local:
@CONFIG_KERNEL_TRUE@ release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \ @CONFIG_KERNEL_TRUE@ release=$(SPL_META_VERSION)-$(SPL_META_RELEASE); \
@CONFIG_KERNEL_TRUE@ instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \ @CONFIG_KERNEL_TRUE@ instdest=$(DESTDIR)/usr/src/spl-$$release/$(LINUX_VERSION); \
@CONFIG_KERNEL_TRUE@ echo "$$release" >$$instdest/spl.release; \
@CONFIG_KERNEL_TRUE@ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \ @CONFIG_KERNEL_TRUE@ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \
@CONFIG_KERNEL_TRUE@ $(INSTALL) -D $$instfile $$instdest/$$instfile; \ @CONFIG_KERNEL_TRUE@ $(INSTALL) -D $$instfile $$instdest/$$instfile; \
@CONFIG_KERNEL_TRUE@ done @CONFIG_KERNEL_TRUE@ done

3
configure vendored
View File

@ -20918,7 +20918,7 @@ fi
ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile scripts/Makefile spl.spec spl-modules.spec PKGBUILD-spl PKGBUILD-spl-modules" ac_config_files="$ac_config_files Makefile lib/Makefile cmd/Makefile module/Makefile module/spl/Makefile module/splat/Makefile include/Makefile scripts/Makefile spl.spec spl-modules.spec PKGBUILD-spl PKGBUILD-spl-modules spl.release"
cat >confcache <<\_ACEOF cat >confcache <<\_ACEOF
@ -21839,6 +21839,7 @@ do
"spl-modules.spec") CONFIG_FILES="$CONFIG_FILES spl-modules.spec" ;; "spl-modules.spec") CONFIG_FILES="$CONFIG_FILES spl-modules.spec" ;;
"PKGBUILD-spl") CONFIG_FILES="$CONFIG_FILES PKGBUILD-spl" ;; "PKGBUILD-spl") CONFIG_FILES="$CONFIG_FILES PKGBUILD-spl" ;;
"PKGBUILD-spl-modules") CONFIG_FILES="$CONFIG_FILES PKGBUILD-spl-modules" ;; "PKGBUILD-spl-modules") CONFIG_FILES="$CONFIG_FILES PKGBUILD-spl-modules" ;;
"spl.release") CONFIG_FILES="$CONFIG_FILES spl.release" ;;
*) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} $as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}

View File

@ -58,6 +58,7 @@ AC_CONFIG_FILES([
spl-modules.spec spl-modules.spec
PKGBUILD-spl PKGBUILD-spl
PKGBUILD-spl-modules PKGBUILD-spl-modules
spl.release
]) ])
AC_OUTPUT AC_OUTPUT

1
spl.release.in Normal file
View File

@ -0,0 +1 @@
@SPL_META_VERSION@-@SPL_META_RELEASE@