- 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.
61 lines
1.2 KiB
Text
61 lines
1.2 KiB
Text
. ./redoconf.rc
|
|
rc_include _all.rc
|
|
|
|
# Tricky quoting: see _compile.od for details.
|
|
if [ "$HAVE_SHLIB" = UNIX ]; then
|
|
cat >$3 <<-EOF
|
|
#!/bin/sh -e
|
|
LINK=$(shquote "$LINK")
|
|
LDFLAGS=$(shquote "$LDFLAGS")
|
|
OPTFLAGS=$(shquote "$OPTFLAGS")
|
|
LIBS=$(shquote "$LIBS")
|
|
o="\$1"
|
|
ob="\${o#*/}"
|
|
shift
|
|
IFS="$NL"
|
|
set -f
|
|
\$LINK -shared -o "\$o" \\
|
|
-Wl,-soname,"\$ob" \\
|
|
\$LDFLAGS \$OPTFLAGS \\
|
|
"\$@" \\
|
|
\$xLIBS \$LIBS
|
|
EOF
|
|
elif [ "$HAVE_SHLIB" = MACOS ]; then
|
|
cat >$3 <<-EOF
|
|
#!/bin/sh -e
|
|
LINK=$(shquote "$LINK")
|
|
LDFLAGS=$(shquote "$LDFLAGS")
|
|
OPTFLAGS=$(shquote "$OPTFLAGS")
|
|
LIBS=$(shquote "$LIBS")
|
|
LIBDIR=$(shquote "$LIBDIR")
|
|
o="\$1"
|
|
ob="\${o#*/}"
|
|
shift
|
|
IFS="$NL"
|
|
set -f
|
|
\$LINK -dynamiclib -o "\$o" \\
|
|
-install_name "\$ob" \\
|
|
\$LDFLAGS \$OPTFLAGS \\
|
|
"\$@" \\
|
|
\$xLIBS \$LIBS
|
|
EOF
|
|
else
|
|
if [ -z "$HAVE_SHLIB" ]; then
|
|
echo "link-shlib.od: fatal:" \
|
|
"must include rc/shlib.rc to use shared libraries." >&2
|
|
exit 90
|
|
fi
|
|
|
|
# If no shared library support and we try to build one,
|
|
# compensate by building a static library instead in the
|
|
# same place.
|
|
cat >$3 <<-EOF
|
|
#!/bin/sh -e
|
|
o="\$1"
|
|
shift
|
|
rm -f "\$o"
|
|
ar q "\$o" "\$@"
|
|
EOF
|
|
fi
|
|
chmod a+x "$3"
|
|
redo-stamp <$3
|