Skip to content

Commit

Permalink
Move zfs.release generation to configure step
Browse files Browse the repository at this point in the history
Previously, the zfs.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 zfs.release.in
file.

As a result, the zfs.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 <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
  • Loading branch information
behlendorf committed Jul 12, 2012
1 parent 7535251 commit fb7eb3e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
4 changes: 1 addition & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ EXTRA_DIST = autogen.sh zfs.spec.in zfs-modules.spec.in
EXTRA_DIST += config/config.awk config/rpm.am config/deb.am config/tgz.am
EXTRA_DIST += META DISCLAIMER COPYRIGHT README.markdown
EXTRA_DIST += OPENSOLARIS.LICENSE ZFS.RELEASE

noinst_HEADERS = zfs_config.h
noinst_HEADERS = zfs_config.h zfs.release

distclean-local::
-$(RM) -R autom4te*.cache
Expand All @@ -35,7 +34,6 @@ if CONFIG_KERNEL
install-data-local:
release=$(ZFS_META_VERSION)-$(ZFS_META_RELEASE); \
instdest=$(DESTDIR)/usr/src/zfs-$$release/$(LINUX_VERSION); \
echo "$$release" >$$instdest/zfs.release; \
for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \
$(INSTALL) -D $$instfile $$instdest/$$instfile; \
done
Expand Down
17 changes: 9 additions & 8 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ DIST_COMMON = $(am__configure_deps) $(noinst_HEADERS) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/PKGBUILD-zfs-modules.in $(srcdir)/PKGBUILD-zfs.in \
$(srcdir)/zfs-modules.spec.in \
$(srcdir)/zfs-script-config.sh.in $(srcdir)/zfs.spec.in \
$(srcdir)/zfs_config.h.in $(top_srcdir)/config/arch.am \
$(top_srcdir)/config/deb.am $(top_srcdir)/config/rpm.am \
$(top_srcdir)/config/tgz.am $(top_srcdir)/configure \
$(top_srcdir)/module/Makefile.in \
$(srcdir)/zfs-script-config.sh.in $(srcdir)/zfs.release.in \
$(srcdir)/zfs.spec.in $(srcdir)/zfs_config.h.in \
$(top_srcdir)/config/arch.am $(top_srcdir)/config/deb.am \
$(top_srcdir)/config/rpm.am $(top_srcdir)/config/tgz.am \
$(top_srcdir)/configure $(top_srcdir)/module/Makefile.in \
$(top_srcdir)/module/avl/Makefile.in \
$(top_srcdir)/module/nvpair/Makefile.in \
$(top_srcdir)/module/unicode/Makefile.in \
Expand Down Expand Up @@ -129,7 +129,7 @@ CONFIG_CLEAN_FILES = module/Makefile module/avl/Makefile \
module/nvpair/Makefile module/unicode/Makefile \
module/zcommon/Makefile module/zfs/Makefile \
module/zpios/Makefile zfs.spec zfs-modules.spec PKGBUILD-zfs \
PKGBUILD-zfs-modules zfs-script-config.sh
PKGBUILD-zfs-modules zfs-script-config.sh zfs.release
CONFIG_CLEAN_VPATH_FILES =
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
Expand Down Expand Up @@ -377,7 +377,7 @@ EXTRA_DIST = autogen.sh zfs.spec.in zfs-modules.spec.in \
config/config.awk config/rpm.am config/deb.am config/tgz.am \
META DISCLAIMER COPYRIGHT README.markdown OPENSOLARIS.LICENSE \
ZFS.RELEASE
noinst_HEADERS = zfs_config.h
noinst_HEADERS = zfs_config.h zfs.release
all: zfs_config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive

Expand Down Expand Up @@ -457,6 +457,8 @@ PKGBUILD-zfs-modules: $(top_builddir)/config.status $(srcdir)/PKGBUILD-zfs-modul
cd $(top_builddir) && $(SHELL) ./config.status $@
zfs-script-config.sh: $(top_builddir)/config.status $(srcdir)/zfs-script-config.sh.in
cd $(top_builddir) && $(SHELL) ./config.status $@
zfs.release: $(top_builddir)/config.status $(srcdir)/zfs.release.in
cd $(top_builddir) && $(SHELL) ./config.status $@

mostlyclean-libtool:
-rm -f *.lo
Expand Down Expand Up @@ -1090,7 +1092,6 @@ distclean-local::
@CONFIG_KERNEL_TRUE@install-data-local:
@CONFIG_KERNEL_TRUE@ release=$(ZFS_META_VERSION)-$(ZFS_META_RELEASE); \
@CONFIG_KERNEL_TRUE@ instdest=$(DESTDIR)/usr/src/zfs-$$release/$(LINUX_VERSION); \
@CONFIG_KERNEL_TRUE@ echo "$$release" >$$instdest/zfs.release; \
@CONFIG_KERNEL_TRUE@ for instfile in $(noinst_HEADERS) module/$(LINUX_SYMBOLS); do \
@CONFIG_KERNEL_TRUE@ $(INSTALL) -D $$instfile $$instdest/$$instfile; \
@CONFIG_KERNEL_TRUE@ done
Expand Down
3 changes: 2 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -24435,7 +24435,7 @@ $as_echo_n "checking whether dmu tx validation is enabled... " >&6; }
$as_echo "$enable_debug_dmu_tx" >&6; }


ac_config_files="$ac_config_files Makefile dracut/Makefile dracut/90zfs/Makefile udev/Makefile udev/rules.d/Makefile etc/Makefile etc/init.d/Makefile etc/zfs/Makefile man/Makefile man/man5/Makefile man/man8/Makefile lib/Makefile lib/libspl/Makefile lib/libspl/asm-generic/Makefile lib/libspl/asm-i386/Makefile lib/libspl/asm-x86_64/Makefile lib/libspl/include/Makefile lib/libspl/include/ia32/Makefile lib/libspl/include/ia32/sys/Makefile lib/libspl/include/rpc/Makefile lib/libspl/include/sys/Makefile lib/libspl/include/sys/sysevent/Makefile lib/libspl/include/sys/dktp/Makefile lib/libspl/include/util/Makefile lib/libavl/Makefile lib/libefi/Makefile lib/libnvpair/Makefile lib/libunicode/Makefile lib/libuutil/Makefile lib/libzpool/Makefile lib/libzfs/Makefile lib/libshare/Makefile cmd/Makefile cmd/zdb/Makefile cmd/zfs/Makefile cmd/zinject/Makefile cmd/zpool/Makefile cmd/ztest/Makefile cmd/zpios/Makefile cmd/mount_zfs/Makefile cmd/zpool_layout/Makefile cmd/zvol_id/Makefile cmd/zpool_id/Makefile cmd/vdev_id/Makefile module/Makefile module/avl/Makefile module/nvpair/Makefile module/unicode/Makefile module/zcommon/Makefile module/zfs/Makefile module/zpios/Makefile include/Makefile include/linux/Makefile include/sys/Makefile include/sys/fs/Makefile include/sys/fm/Makefile include/sys/fm/fs/Makefile scripts/Makefile scripts/zpios-profile/Makefile scripts/zpios-test/Makefile scripts/zpool-config/Makefile scripts/zpool-layout/Makefile scripts/common.sh zfs.spec zfs-modules.spec PKGBUILD-zfs PKGBUILD-zfs-modules zfs-script-config.sh"
ac_config_files="$ac_config_files Makefile dracut/Makefile dracut/90zfs/Makefile udev/Makefile udev/rules.d/Makefile etc/Makefile etc/init.d/Makefile etc/zfs/Makefile man/Makefile man/man5/Makefile man/man8/Makefile lib/Makefile lib/libspl/Makefile lib/libspl/asm-generic/Makefile lib/libspl/asm-i386/Makefile lib/libspl/asm-x86_64/Makefile lib/libspl/include/Makefile lib/libspl/include/ia32/Makefile lib/libspl/include/ia32/sys/Makefile lib/libspl/include/rpc/Makefile lib/libspl/include/sys/Makefile lib/libspl/include/sys/sysevent/Makefile lib/libspl/include/sys/dktp/Makefile lib/libspl/include/util/Makefile lib/libavl/Makefile lib/libefi/Makefile lib/libnvpair/Makefile lib/libunicode/Makefile lib/libuutil/Makefile lib/libzpool/Makefile lib/libzfs/Makefile lib/libshare/Makefile cmd/Makefile cmd/zdb/Makefile cmd/zfs/Makefile cmd/zinject/Makefile cmd/zpool/Makefile cmd/ztest/Makefile cmd/zpios/Makefile cmd/mount_zfs/Makefile cmd/zpool_layout/Makefile cmd/zvol_id/Makefile cmd/zpool_id/Makefile cmd/vdev_id/Makefile module/Makefile module/avl/Makefile module/nvpair/Makefile module/unicode/Makefile module/zcommon/Makefile module/zfs/Makefile module/zpios/Makefile include/Makefile include/linux/Makefile include/sys/Makefile include/sys/fs/Makefile include/sys/fm/Makefile include/sys/fm/fs/Makefile scripts/Makefile scripts/zpios-profile/Makefile scripts/zpios-test/Makefile scripts/zpool-config/Makefile scripts/zpool-layout/Makefile scripts/common.sh zfs.spec zfs-modules.spec PKGBUILD-zfs PKGBUILD-zfs-modules zfs-script-config.sh zfs.release"


cat >confcache <<\_ACEOF
Expand Down Expand Up @@ -25419,6 +25419,7 @@ do
"PKGBUILD-zfs") CONFIG_FILES="$CONFIG_FILES PKGBUILD-zfs" ;;
"PKGBUILD-zfs-modules") CONFIG_FILES="$CONFIG_FILES PKGBUILD-zfs-modules" ;;
"zfs-script-config.sh") CONFIG_FILES="$CONFIG_FILES zfs-script-config.sh" ;;
"zfs.release") CONFIG_FILES="$CONFIG_FILES zfs.release" ;;

*) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ AC_CONFIG_FILES([
PKGBUILD-zfs
PKGBUILD-zfs-modules
zfs-script-config.sh
zfs.release
])

AC_OUTPUT
1 change: 1 addition & 0 deletions zfs.release.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@ZFS_META_VERSION@-@ZFS_META_RELEASE@

0 comments on commit fb7eb3e

Please sign in to comment.