Update build system to use output of new dependency generation detection

macros.  Proceedures for using alternative dependency generation
"compiler" and "flags" has changed.
    Pre-configure:
        env MKDEP=mycc MKDEP_FLAGS=myccflags ./configure
    Post-configure:
        hack top.mk and run ./config.status
This commit is contained in:
Kurt Zeilenga 1999-06-08 19:13:00 +00:00
parent 7c4fb74a19
commit deca38c9a9
4 changed files with 510 additions and 507 deletions

View file

@ -34,6 +34,10 @@ SED=cat
: ${CC=cc} # use cc by default : ${CC=cc} # use cc by default
# We generally set these via the command line options
: ${MKDEP_CC=$CC} # select default compiler to generate dependencies
: ${MKDEP_CFLAGS="-M"} # cc -M usually produces dependencies
while : while :
do case "$1" in do case "$1" in
# the -s flag removes dependencies to files that begin with / # the -s flag removes dependencies to files that begin with /
@ -51,21 +55,15 @@ while :
SRCDIR=$2 SRCDIR=$2
shift; shift ;; shift; shift ;;
# -c allows you to override the default compiler. # -c allows you to override the compiler used to generate dependencies
-c) -c)
CC=$2 MKDEP_CC=$2
shift; shift ;;
# -m allows you to override the compiler used to generate
# dependencies.
-m)
CC_MKDEP=$2
shift; shift ;; shift; shift ;;
# -m allows you to override the compiler flags used to generate # -m allows you to override the compiler flags used to generate
# dependencies. # dependencies.
-x) -m)
CC_MKDEP_FLAGS=$2 MKDEP_CFLAGS=$2
shift; shift ;; shift; shift ;;
# the -p flag produces "program: program.c" style dependencies # the -p flag produces "program: program.c" style dependencies
@ -74,7 +72,6 @@ while :
SED='sed -e s;\.o;;' SED='sed -e s;\.o;;'
shift ;; shift ;;
# the -l flag produces libtool compatible dependencies # the -l flag produces libtool compatible dependencies
-l) -l)
SED='sed -e s;\.o:;.lo:;' SED='sed -e s;\.o:;.lo:;'
@ -87,11 +84,8 @@ while :
esac esac
done done
: ${CC_MKDEP=$CC} # select default compiler to generate dependencies
: ${CC_MKDEP_FLAGS="-M"} # cc -M usually produces dependencies
if test $# = 0 ; then if test $# = 0 ; then
echo 'usage: mkdep [-p] [-s] [-c cc] [-m cc] [-x flags] [-f makefile] [-d srcdir] [cppflags] file ...' echo 'usage: mkdep [-p] [-s] [-c cc] [-m flags] [-f makefile] [-d srcdir] [cppflags] file ...'
exit 1 exit 1
fi fi
@ -136,19 +130,19 @@ else
fi fi
done done
CC_MKDEP_FLAGS="$CC_MKDEP_FLAGS -I$SRCDIR" MKDEP_CFLAGS="$MKDEP_CFLAGS -I$SRCDIR"
fi fi
cat << _EOF_ >> $TMP cat << _EOF_ >> $TMP
# #
# files: $* # files: $*
# command: $CC_MKDEP $CC_MKDEP_FLAGS $files # command: $MKDEP_CC $MKDEP_CFLAGS $files
# #
_EOF_ _EOF_
$CC_MKDEP $CC_MKDEP_FLAGS $files | \ $MKDEP_CC $MKDEP_CFLAGS $files | \
sed -e 's; \./; ;g' | \ sed -e 's; \./; ;g' | \
$SED > $TMP.sed $SED > $TMP.sed
# dont pipe to awk. SGI awk wants a filename as argument. # dont pipe to awk. SGI awk wants a filename as argument.

View file

@ -111,8 +111,8 @@ else
OL_MKDEP="${MKDEP}" OL_MKDEP="${MKDEP}"
OL_MKDEP_FLAGS="${MKDEP_FLAGS}" OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
fi fi
dnl AC_SUBST(OL_MKDEP) AC_SUBST(OL_MKDEP)
dnl AC_SUBST(OL_MKDEP_FLAGS) AC_SUBST(OL_MKDEP_FLAGS)
]) ])
dnl dnl
dnl ==================================================================== dnl ====================================================================

View file

@ -43,7 +43,12 @@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
LINT = lint LINT = lint
5LINT = 5lint 5LINT = 5lint
MKDEP = $(top_srcdir)/build/mkdep $(MKDEPFLAG) -d "$(srcdir)" -c "$(CC)"
MKDEP = $(top_srcdir)/build/mkdep $(MKDEPFLAG) \
-d "$(srcdir)" -c "$(MKDEP_CC)" -m "$(MKDEP_CFLAGS)"
MKDEP_CC = @OL_MKDEP@
MKDEP_CFLAGS = @OL_MKDEP_FLAGS@
MKVERSION = $(top_srcdir)/build/mkversion -v "$(VERSION)" MKVERSION = $(top_srcdir)/build/mkversion -v "$(VERSION)"
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@

976
configure vendored

File diff suppressed because it is too large Load diff