diff options
author | Theodore Ts'o <tytso@mit.edu> | 2010-05-17 19:21:42 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2010-05-17 19:21:42 -0400 |
commit | 5aa6c3f61c0559f03b68bdeef886f34ece106757 (patch) | |
tree | 2f1bb396fad8c89a087702aab1de42dff4876a0d | |
parent | 822c10e84e5f57394bcad921adc560f5b032c03e (diff) | |
download | e2fsprogs-5aa6c3f61c0559f03b68bdeef886f34ece106757.tar.gz |
Add configure options --enable-symlink-build and --enable-symlink-install
These options allow e2fsprogs to be built using symlinks instead of
hard links, and to be installed using symlinks instead of hard links,
respectively.
Addresses-Sourceforge-Bug: #1436294
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
-rw-r--r-- | MCONFIG.in | 5 | ||||
-rwxr-xr-x | configure | 50 | ||||
-rw-r--r-- | configure.in | 38 | ||||
-rw-r--r-- | e2fsck/Makefile.in | 34 | ||||
-rw-r--r-- | lib/Makefile.bsd-lib | 3 | ||||
-rw-r--r-- | lib/Makefile.checker | 3 | ||||
-rw-r--r-- | lib/Makefile.darwin-lib | 5 | ||||
-rw-r--r-- | lib/Makefile.elf-lib | 7 | ||||
-rw-r--r-- | lib/Makefile.library | 3 | ||||
-rw-r--r-- | lib/Makefile.profile | 3 | ||||
-rw-r--r-- | lib/Makefile.solaris-lib | 7 | ||||
-rw-r--r-- | lib/uuid/Makefile.in | 6 | ||||
-rw-r--r-- | misc/Makefile.in | 45 |
13 files changed, 138 insertions, 71 deletions
@@ -59,6 +59,8 @@ ALL_LDFLAGS = $(LDFLAGS) @LDFLAG_DYNAMIC@ LDFLAGS_STATIC = $(LDFLAGS) @LDFLAG_STATIC@ BUILD_CFLAGS = @BUILD_CFLAGS@ BUILD_LDFLAGS = @BUILD_LDFLAGS@ +LINK_BUILD_FLAGS = @LINK_BUILD_FLAGS@ +LINK_INSTALL_FLAGS = @LINK_INSTALL_FLAGS@ RM = @RM@ LN = @LN@ LN_S = @LN_S@ @@ -176,7 +178,8 @@ MANMODE= 444 # Autoconf magic... # -DEP_LIB_MAKEFILES = $(top_srcdir)/lib/Makefile.elf-lib \ +DEP_LIB_MAKEFILES = $(top_srcdir)/lib/Makefile.library \ + $(top_srcdir)/lib/Makefile.elf-lib \ $(top_srcdir)/lib/Makefile.bsd-lib $(top_srcdir)/lib/Makefile.darwin-lib \ $(top_srcdir)/lib/Makefile.solaris-lib $(top_srcdir)/lib/Makefile.checker \ $(top_srcdir)/lib/Makefile.profile @@ -700,6 +700,8 @@ ELF_CMT HTREE_CMT Q E +LINK_BUILD_FLAGS +LINK_INSTALL_FLAGS MAINTAINER_CMT LINUX_INCLUDE EGREP @@ -780,6 +782,8 @@ with_ccopts with_ldopts with_root_prefix enable_maintainer_mode +enable_symlink_install +enable_symlink_build enable_verbose_makecmds enable_compression enable_htree @@ -1429,7 +1433,9 @@ Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable makefile rules useful for maintainers - --enable-verbose-makecmds enable verbose make command output + --enable-symlink-install use symlinks when installing instead of hard links + --enable-symlink-build use symlinks while building instead of hard links + --enable-verbose-makecmds enable verbose make command output --enable-compression enable EXPERIMENTAL compression support --enable-htree enable EXPERIMENTAL htree directory support --enable-elf-shlibs select ELF shared libraries @@ -4575,6 +4581,48 @@ $as_echo "Disabling maintainer mode by default" >&6; } fi +# Check whether --enable-symlink-install was given. +if test "${enable_symlink_install+set}" = set; then : + enableval=$enable_symlink_install; if test "$enableval" = "no" +then + LINK_INSTALL_FLAGS=-f + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling symlinks for install" >&5 +$as_echo "Disabling symlinks for install" >&6; } +else + LINK_INSTALL_FLAGS=-sf + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling symlinks for install" >&5 +$as_echo "Enabling symlinks for install" >&6; } +fi + +else + LINK_INSTALL_FLAGS=-f +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling symlinks for install" >&5 +$as_echo "Disabling symlinks for install" >&6; } + +fi + + +# Check whether --enable-symlink-build was given. +if test "${enable_symlink_build+set}" = set; then : + enableval=$enable_symlink_build; if test "$enableval" = "no" +then + LINK_BUILD_FLAGS= + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling symlinks for build" >&5 +$as_echo "Disabling symlinks for build" >&6; } +else + LINK_BUILD_FLAGS=-s + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Enabling symlinks for build" >&5 +$as_echo "Enabling symlinks for build" >&6; } +fi + +else + LINK_BUILD_FLAGS= +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: Disabling symlinks for build" >&5 +$as_echo "Disabling symlinks for build" >&6; } + +fi + + # Check whether --enable-verbose-makecmds was given. if test "${enable_verbose_makecmds+set}" = set; then : enableval=$enable_verbose_makecmds; if test "$enableval" = "no" diff --git a/configure.in b/configure.in index 5077a97b..3441bee6 100644 --- a/configure.in +++ b/configure.in @@ -154,10 +154,46 @@ AC_MSG_RESULT([Disabling maintainer mode by default]) ) AC_SUBST(MAINTAINER_CMT) dnl +dnl handle --enable-symlink-install +dnl +AC_ARG_ENABLE([symlink-install], +[ --enable-symlink-install use symlinks when installing instead of hard links], +if test "$enableval" = "no" +then + LINK_INSTALL_FLAGS=-f + AC_MSG_RESULT([Disabling symlinks for install]) +else + LINK_INSTALL_FLAGS=-sf + AC_MSG_RESULT([Enabling symlinks for install]) +fi +, +LINK_INSTALL_FLAGS=-f +AC_MSG_RESULT([Disabling symlinks for install]) +) +AC_SUBST(LINK_INSTALL_FLAGS) +dnl +dnl handle --enable-symlink-build +dnl +AC_ARG_ENABLE([symlink-build], +[ --enable-symlink-build use symlinks while building instead of hard links], +if test "$enableval" = "no" +then + LINK_BUILD_FLAGS= + AC_MSG_RESULT([Disabling symlinks for build]) +else + LINK_BUILD_FLAGS=-s + AC_MSG_RESULT([Enabling symlinks for build]) +fi +, +LINK_BUILD_FLAGS= +AC_MSG_RESULT([Disabling symlinks for build]) +) +AC_SUBST(LINK_BUILD_FLAGS) +dnl dnl handle --enable-verbose-makecmds dnl AC_ARG_ENABLE([verbose-makecmds], -[ --enable-verbose-makecmds enable verbose make command output], +[ --enable-verbose-makecmds enable verbose make command output], if test "$enableval" = "no" then AC_MSG_RESULT([Disabling verbose make commands]) diff --git a/e2fsck/Makefile.in b/e2fsck/Makefile.in index 8296e725..91f3ddf2 100644 --- a/e2fsck/Makefile.in +++ b/e2fsck/Makefile.in @@ -201,18 +201,11 @@ install: $(PROGS) $(MANPAGES) $(FMANPAGES) installdirs echo " INSTALL $(root_sbindir)/$$i"; \ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(root_sbindir)/$$i; \ done - $(E) " LINK $(root_sbindir)/fsck.ext2" - $(Q) $(LN) -f $(DESTDIR)$(root_sbindir)/e2fsck \ - $(DESTDIR)$(root_sbindir)/fsck.ext2 - $(E) " LINK $(root_sbindir)/fsck.ext3" - $(Q) $(LN) -f $(DESTDIR)$(root_sbindir)/e2fsck \ - $(DESTDIR)$(root_sbindir)/fsck.ext3 - $(E) " LINK $(root_sbindir)/fsck.ext4" - $(Q) $(LN) -f $(DESTDIR)$(root_sbindir)/e2fsck \ - $(DESTDIR)$(root_sbindir)/fsck.ext4 - $(E) " LINK $(root_sbindir)/fsck.ext4dev" - $(Q) $(LN) -f $(DESTDIR)$(root_sbindir)/e2fsck \ - $(DESTDIR)$(root_sbindir)/fsck.ext4dev + $(Q) for i in ext2 ext3 ext4 ext4dev; do \ + echo " LINK $(root_sbindir)/fsck.$$i"; \ + (cd $(DESTDIR)$(root_sbindir); \ + $(LN) $(LINK_INSTALL_FLAGS) e2fsck fsck.$$i); \ + done $(Q) for i in $(MANPAGES); do \ for j in $(COMPRESS_EXT); do \ $(RM) -f $(DESTDIR)$(man8dir)/$$i.$$j; \ @@ -227,18 +220,11 @@ install: $(PROGS) $(MANPAGES) $(FMANPAGES) installdirs echo " INSTALL_DATA $(man5dir)/$$i"; \ $(INSTALL_DATA) $$i $(DESTDIR)$(man5dir)/$$i; \ done - $(E) " LINK $(man8dir)/fsck.ext2.8" - $(Q) $(LN) -f $(DESTDIR)$(man8dir)/e2fsck.8 \ - $(DESTDIR)$(man8dir)/fsck.ext2.8 - $(E) " LINK $(man8dir)/fsck.ext3.8" - $(Q) $(LN) -f $(DESTDIR)$(man8dir)/e2fsck.8 \ - $(DESTDIR)$(man8dir)/fsck.ext3.8 - $(E) " LINK $(man8dir)/fsck.ext4.8" - $(Q) $(LN) -f $(DESTDIR)$(man8dir)/e2fsck.8 \ - $(DESTDIR)$(man8dir)/fsck.ext4.8 - $(E) " LINK $(man8dir)/fsck.ext4.8" - $(Q) $(LN) -f $(DESTDIR)$(man8dir)/e2fsck.8 \ - $(DESTDIR)$(man8dir)/fsck.ext4dev.8 + $(Q) for i in ext2 ext3 ext4 ext4dev; do \ + echo " LINK $(man8dir)/fsck.$$i.8"; \ + (cd $(DESTDIR)$(man8dir); \ + $(LN) $(LINK_INSTALL_FLAGS) e2fsck.8 fsck.$$i.8); \ + done install-strip: install $(Q) for i in $(PROGS); do \ diff --git a/lib/Makefile.bsd-lib b/lib/Makefile.bsd-lib index ec7cae44..51e9dc77 100644 --- a/lib/Makefile.bsd-lib +++ b/lib/Makefile.bsd-lib @@ -25,7 +25,8 @@ $(BSD_LIB): $(OBJS) (cd pic; ld -Bshareable -o $(BSD_LIB) $(OBJS)) $(MV) pic/$(BSD_LIB) . $(RM) -f ../$(BSD_LIB) - $(LN) $(BSD_LIB) ../$(BSD_LIB) + (cd ..; $(LN) $(LINK_BUILD_FLAGS) \ + `echo $(my_dir) | sed -e 's;lib/;;'`/$(BSD_LIB) $(BSD_LIB)) install-shlibs install:: $(BSD_LIB) @echo " INSTALL_PROGRAM $(BSDLIB_INSTALL_DIR)/$(BSD_LIB)" diff --git a/lib/Makefile.checker b/lib/Makefile.checker index cdc1d7b6..7bff0f42 100644 --- a/lib/Makefile.checker +++ b/lib/Makefile.checker @@ -13,4 +13,5 @@ $(LIBRARY)_chk.a: $(OBJS) $(Q) (cd checker; $(ARGEN) $@ $(OBJS)) -$(Q) $(RANLIB) $@ $(Q) $(RM) -f ../$@ - $(Q) $(LN) $@ ../$@ + $(Q) (cd .. ; $(LN) $(LINK_BUILD_FLAGS) \ + `echo $(my_dir) | sed -e 's;lib/;;'`/$@ $@) diff --git a/lib/Makefile.darwin-lib b/lib/Makefile.darwin-lib index a26200b9..c94a5e72 100644 --- a/lib/Makefile.darwin-lib +++ b/lib/Makefile.darwin-lib @@ -27,8 +27,9 @@ $(BSD_LIB): $(OBJS) -flat_namespace -undefined warning -o $(BSD_LIB) $(OBJS)) $(Q) $(MV) pic/$(BSD_LIB) . $(Q) $(RM) -f ../$(BSD_LIB) - $(Q) $(LN) $(BSD_LIB) ../$(BSD_LIB) - $(Q) $(LN) ../$(BSD_LIB) ../$(BSDLIB_IMAGE).dylib + $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) \ + `echo $(my_dir) | sed -e 's;lib/;;'`/$(BSD_LIB) $(BSD_LIB)) + $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) $(BSD_LIB) $(BSDLIB_IMAGE).dylib) install-shlibs install:: $(BSD_LIB) $(E) " INSTALL_PROGRAM $(BSDLIB_INSTALL_DIR)/$(BSD_LIB)" diff --git a/lib/Makefile.elf-lib b/lib/Makefile.elf-lib index c0202f43..ea600c7a 100644 --- a/lib/Makefile.elf-lib +++ b/lib/Makefile.elf-lib @@ -28,9 +28,10 @@ $(ELF_LIB): $(OBJS) -Wl,-soname,$(ELF_SONAME) $(OBJS) $(ELF_OTHER_LIBS)) $(Q) $(MV) elfshared/$(ELF_LIB) . $(Q) $(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).so ../$(ELF_SONAME) - $(Q) $(LN) $(ELF_LIB) ../$(ELF_LIB) - $(Q) $(LN) ../$(ELF_LIB) ../$(ELF_IMAGE).so - $(Q) $(LN) ../$(ELF_LIB) ../$(ELF_SONAME) + $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) \ + `echo $(my_dir) | sed -e 's;lib/;;'`/$(ELF_LIB) $(ELF_LIB)) + $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) $(ELF_LIB) $(ELF_IMAGE).so) + $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) $(ELF_LIB) $(ELF_SONAME)) installdirs-elf-lib:: $(E) " MKINSTALLDIRS $(ELF_INSTALL_DIR) $(libdir)" diff --git a/lib/Makefile.library b/lib/Makefile.library index f3b12f7a..1b86b023 100644 --- a/lib/Makefile.library +++ b/lib/Makefile.library @@ -19,6 +19,7 @@ $(LIBRARY).a: $(OBJS) $(Q) $(ARGEN) $@ $(OBJS) -@$(RANLIB) $@ $(Q) $(RM) -f ../$@ - $(Q) $(LN) $@ ../$@ + $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) \ + `echo $(my_dir) | sed -e 's;lib/;;'`/$@ $@) $(LIB)/$(LIBRARY).a: $(LIBRARY).a diff --git a/lib/Makefile.profile b/lib/Makefile.profile index 1e07b351..180f5bcf 100644 --- a/lib/Makefile.profile +++ b/lib/Makefile.profile @@ -14,7 +14,8 @@ $(LIBRARY)_p.a: $(OBJS) $(Q) (cd profiled; $(ARUPD) ../$@ $(OBJS)) -$(Q) $(RANLIB) $@ $(Q) $(RM) -f ../$@ - $(Q) $(LN) $@ ../$@ + $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) \ + `echo $(my_dir) | sed -e 's;lib/;;'`/$@ $@) install:: $(LIBRARY)_p.a installdirs $(E) " INSTALL_DATA $(libdir)/$(LIBRARY)_p.a" diff --git a/lib/Makefile.solaris-lib b/lib/Makefile.solaris-lib index f90d714e..92bdbe28 100644 --- a/lib/Makefile.solaris-lib +++ b/lib/Makefile.solaris-lib @@ -28,9 +28,10 @@ $(ELF_LIB): $(OBJS) -Wl,-h,$(ELF_SONAME) $(OBJS) $(ELF_OTHER_LIBS)) $(Q) $(MV) elfshared/$(ELF_LIB) . $(Q) $(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).so ../$(ELF_SONAME) - $(Q) $(LN) $(ELF_LIB) ../$(ELF_LIB) - $(Q) $(LN) ../$(ELF_LIB) ../$(ELF_IMAGE).so - $(Q) $(LN) ../$(ELF_LIB) ../$(ELF_SONAME) + $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) \ + `echo $(my_dir) | sed -e 's;lib/;;'`/$(ELF_LIB) $(ELF_LIB)) + $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) $(ELF_LIB) $(ELF_IMAGE).so) + $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) $(ELF_LIB) $(ELF_SONAME)) installdirs-elf-lib:: $(MKINSTALLDIRS) $(DESTDIR)$(ELF_INSTALL_DIR) \ diff --git a/lib/uuid/Makefile.in b/lib/uuid/Makefile.in index 10e5277c..141b8dca 100644 --- a/lib/uuid/Makefile.in +++ b/lib/uuid/Makefile.in @@ -150,9 +150,11 @@ install:: all installdirs $(Q) $(RM) -f $(DESTDIR)$(man3dir)/uuid_generate_random.3.gz \ $(DESTDIR)$(man3dir)/uuid_generate_time.3.gz $(E) " LINK $(man3dir)/uuid_generate_random.3" - $(Q) $(LN) -f $(DESTDIR)$(man3dir)/uuid_generate.3 $(DESTDIR)$(man3dir)/uuid_generate_random.3 + $(Q) (cd $(DESTDIR)$(man3dir); \ + $(LN) $(LINK_INSTALL_FLAGS) uuid_generate.3 uuid_generate_random.3) $(E) " LINK $(man3dir)/uuid_generate_time.3" - $(Q) $(LN) -f $(DESTDIR)$(man3dir)/uuid_generate.3 $(DESTDIR)$(man3dir)/uuid_generate_time.3 + $(Q) (cd $(DESTDIR)$(man3dir); \ + $(LN) $(LINK_INSTALL_FLAGS) uuid_generate.3 uuid_generate_time.3) $(E) " INSTALL_DATA $(libdir)/pkgconfig/uuid.pc" $(Q) $(INSTALL_DATA) uuid.pc $(DESTDIR)$(libdir)/pkgconfig/uuid.pc diff --git a/misc/Makefile.in b/misc/Makefile.in index 09c6d6ac..def66f0e 100644 --- a/misc/Makefile.in +++ b/misc/Makefile.in @@ -403,25 +403,17 @@ install: all $(SMANPAGES) $(UMANPAGES) installdirs echo " INSTALL $(sbindir)/$$i"; \ $(INSTALL_PROGRAM) $$i $(DESTDIR)$(sbindir)/$$i; \ done - $(E) " LINK $(root_sbindir)/mkfs.ext2" - $(Q) $(LN) -f $(DESTDIR)$(root_sbindir)/mke2fs \ - $(DESTDIR)$(root_sbindir)/mkfs.ext2 - $(E) " LINK $(root_sbindir)/mkfs.ext3" - $(Q) $(LN) -f $(DESTDIR)$(root_sbindir)/mke2fs \ - $(DESTDIR)$(root_sbindir)/mkfs.ext3 - $(E) " LINK $(root_sbindir)/mkfs.ext4" - $(Q) $(LN) -f $(DESTDIR)$(root_sbindir)/mke2fs \ - $(DESTDIR)$(root_sbindir)/mkfs.ext4 - $(E) " LINK $(root_sbindir)/mkfs.ext4dev" - $(Q) $(LN) -f $(DESTDIR)$(root_sbindir)/mke2fs \ - $(DESTDIR)$(root_sbindir)/mkfs.ext4dev - $(E) " LINK $(root_sbindir)/e2label" - $(Q) $(LN) -f $(DESTDIR)$(root_sbindir)/tune2fs \ - $(DESTDIR)$(root_sbindir)/e2label + $(Q) for i in ext2 ext3 ext4 ext4dev; do \ + echo " LINK $(root_sbindir)/mkfs.$$i"; \ + (cd $(DESTDIR)$(root_sbindir); \ + $(LN) $(LINK_INSTALL_FLAGS) mke2fs mkfs.$$i); \ + done + $(Q) (cd $(DESTDIR)$(root_sbindir); \ + $(LN) $(LINK_INSTALL_FLAGS) tune2fs e2label) $(Q) if test -n "$(FINDFS_LINK)"; then \ - echo " LINK $(root_sbindir)/findfs"; \ - $(LN) -f $(DESTDIR)$(root_sbindir)/tune2fs \ - $(DESTDIR)$(root_sbindir)/$(FINDFS_LINK); \ + echo " LINK $(root_sbindir)/findfs"; \ + (cd $(DESTDIR)$(root_sbindir); \ + $(LN) $(LINK_INSTALL_FLAGS) tune2fs $(FINDFS_LINK)); \ fi $(Q) for i in $(UPROGS); do \ echo " INSTALL $(bindir)/$$i"; \ @@ -440,18 +432,11 @@ install: all $(SMANPAGES) $(UMANPAGES) installdirs done $(Q) $(RM) -f $(DESTDIR)$(man8dir)/mkfs.ext2.8.gz \ $(DESTDIR)$(man8dir)/mkfs.ext3.8.gz - $(E) " LINK mkfs.ext2.8" - $(Q) $(LN) -f $(DESTDIR)$(man8dir)/mke2fs.8 \ - $(DESTDIR)$(man8dir)/mkfs.ext2.8 - $(E) " LINK mkfs.ext3.8" - $(Q) $(LN) -f $(DESTDIR)$(man8dir)/mke2fs.8 \ - $(DESTDIR)$(man8dir)/mkfs.ext3.8 - $(E) " LINK mkfs.ext4.8" - $(Q) $(LN) -f $(DESTDIR)$(man8dir)/mke2fs.8 \ - $(DESTDIR)$(man8dir)/mkfs.ext4.8 - $(E) " LINK mkfs.ext4dev.8" - $(Q) $(LN) -f $(DESTDIR)$(man8dir)/mke2fs.8 \ - $(DESTDIR)$(man8dir)/mkfs.ext4dev.8 + $(Q) for i in ext2 ext3 ext4 ext4dev; do \ + echo " LINK mkfs.$$i.8"; \ + (cd $(DESTDIR)$(man8dir); \ + $(LN) $(LINK_INSTALL_FLAGS) mke2fs.8 mkfs.$$i.8); \ + done $(Q) for i in $(UMANPAGES); do \ for j in $(COMPRESS_EXT); do \ $(RM) -f $(DESTDIR)$(man1dir)/$$i.$$j; \ |