Skip to content

Commit cf70a78

Browse files
committed
Set TAR_OPTIONS to improve portability of tarballs.
Instead of setting TAR_OPTIONS, I also tried calling AC_SUBST(am__tar,[tar --hard-dereference]) but unforunately this alternate approach did not work, perhaps the AC_SUBST comes too late in the process to take effect or perhaps it is simply not possible to do this. It was an off-hand remark in a mailing list [0], not an officially sanctioned way of doing things. [0]: http://gnu-automake.7480.n7.nabble.com/bug-19616-dist-tarball-contains-hardlinks-td21667.html Refs #2046. Refs #2029.
1 parent cc116d4 commit cf70a78

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Makefile.am

+13
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,19 @@ CXXFLAGS_PROF += $(ANY_WERROR_FLAG) $(ANY_PARANOID_FLAGS)
2121
# should do no harm on other platforms.
2222
AM_LDFLAGS += -no-undefined
2323

24+
# As discussed on this thread [0], automake passes -h to tar in the
25+
# "make dist" target, and this has the effect of creating hard links
26+
# out of soft links in the resulting archives. Since not all
27+
# filesystems support hard links well (for example AFS, see libmesh
28+
# #2046) this option causes the directory links to be created as
29+
# normal files instead. The --hard-dereference option requires at least tar 1.29 to
30+
# work, but we generally completely control the systems where we run
31+
# "make dist" and therefore we don't need the most portable "make
32+
# dist" possible, but rather a "make dist" target that gives us the
33+
# most portable tarballs possible.
34+
# [0]: http://gnu-automake.7480.n7.nabble.com/bug-19616-dist-tarball-contains-hardlinks-td21667.html
35+
TAR_OPTIONS = --hard-dereference
36+
export TAR_OPTIONS
2437

2538
# AM_CPPFLAGS are method-independent cppflags that
2639
# we use when compiling libmesh proper, or its utility

0 commit comments

Comments
 (0)