apenwarr-redo/redoconf/link.od
Avery Pennarun 49f85f2156 redoconf: assorted minor fixes.
- libqt4.rc: add detection of the 'moc' command in $MOC.
- libssl.rc: add detection script for openssl.
- default.do.sh: provide a die() function to all .od files.  It's just
  too useful to not have it (I haven't converted everything to it yet).
- When building out/x/y.z, match against $S/default.z.od and
  $S/default.od if they exist.
- *.list files (lists of source/object files to include in a binary)
  can now contain *.o files in addition to *.c, *.cc, etc.
- rename compile() to _compile() to avoid polluting the namespace for
  scripts called from default.do.sh.
- When building a .so file in the top level directory, no need to
  make a symlink of it into the top level directory.
- link.od and link-shlib.od forgot to make use of the $xLIBS variable.
2019-03-02 04:12:25 -05:00

21 lines
372 B
Text

. ./redoconf.rc
rc_include _all.rc
# Tricky quoting: see _compile.od for details.
cat >$3 <<-EOF
#!/bin/sh -e
LINK=$(shquote "$LINK")
LDFLAGS=$(shquote "$LDFLAGS")
OPTFLAGS=$(shquote "$OPTFLAGS")
LIBS=$(shquote "$LIBS")
o="\$1"
shift
IFS="$NL"
set -f
\$LINK -o "\$o" \\
\$LDFLAGS \$OPTFLAGS \\
"\$@" \\
\$xLIBS \$LIBS
EOF
chmod a+x "$3"
redo-stamp <$3