[tex-live] DESTDIR not working

Karl Berry karl at freefriends.org
Tue Aug 22 01:06:49 CEST 2006


    frank> Any idea where this would be documented, or of an example
    shell where this becomes a problem?

Bash follows symbolic links by default.  See `The Set Builtin' node
under -P.  I admit I did not check whether that behavior is kept even
when invoked as /bin/sh.

I installed the change (in configure and configure.in) as below.  $(...)
may or may not be ok, but I'm an old-fashioned guy when it comes to
Unix, so I prefer `...` anyway.

It belatedly occurs to me that instead of checking for "equal"
directories, it might be better to check if, after cd'ing to
utils/sam2p, whether the source files are already there.

Best,
Karl

--- configure.in	(revision 1996)
+++ configure.in	(working copy)
@@ -236,11 +236,16 @@
     if eval "test \"`echo '$with_'${pkg}|sed 's/-/_/g'`\" != no"; then
       ESUBDIRS="$ESUBDIRS utils/$pkg"
       if test $pkg = sam2p; then
-        # this is a terrible kludge, but sam2p configure actively
-        # defeats srcdir!=objdir support, and Peter S. doesn't want to
-        # fix it.  So copy the entire sam2p srcdir into objdir.
-        rm -rf utils/sam2p
-        cp -pr $srcdir/utils/sam2p utils
+        # attempt to discover if srcdir = builddir.
+        dir1=`cd $srcdir/utils/sam2p && /bin/pwd`
+        dir2=`cd utils/sam2p && /bin/pwd`
+        if test "$dir1" != "$dir2"; then
+          # this is a terrible kludge, but sam2p configure actively
+          # defeats srcdir!=objdir support, and Peter S. doesn't want to
+          # fix it.  So copy the entire sam2p srcdir into objdir.
+          rm -rf utils/sam2p
+          cp -pr $srcdir/utils/sam2p utils
+        fi
       fi
       AC_CONFIG_SUBDIRS([utils/$pkg])
     fi


More information about the tex-live mailing list