makefile: speed up make in "cs" build directory

Take advantage of ".d" files that are already generated to speed up a
`make` in the "cs" build dierctory when nothing needs to be done.
This commit is contained in:
Matthew Flatt 2018-11-29 09:41:49 -07:00
parent 50cb877184
commit e607ae09de
3 changed files with 53 additions and 12 deletions

View File

@ -78,12 +78,12 @@ CS_PROGS = RACKET="$(RACKET)" SCHEME="$(SCHEME)" CONVERT_RACKET="$(CONVERT_RACKE
CS_OPTS = COMPRESS_COMP=@COMPRESS_COMP@
build-racket-so:
$(MAKE) expander
$(MAKE) thread
$(MAKE) io
$(MAKE) regexp
$(MAKE) schemify
$(MAKE) known
$(MAKE) @RKTL_PRE@expander@RKTL_POST@
$(MAKE) @RKTL_PRE@thread@RKTL_POST@
$(MAKE) @RKTL_PRE@io@RKTL_POST@
$(MAKE) @RKTL_PRE@regexp@RKTL_POST@
$(MAKE) @RKTL_PRE@schemify@RKTL_POST@
$(MAKE) @RKTL_PRE@known@RKTL_POST@
cd $(srcdir)/.. && $(RACKET_SO_ENV) $(MAKE) "$(builddir)/racket.so" $(CS_PROGS) $(CS_OPTS) BUILDDIR="$(builddir)/"
bounce:
@ -99,22 +99,22 @@ bounce:
# place of `raco make` (to avoid a dependency on a package for `raco
# make`).
expander:
@RKTL_PRE@expander@RKTL_POST@:
cd $(srcdir)/../../expander && $(MAKE) expander-src-generate RACKET="$(BOOTSTRAP_RACKET)" BUILDDIR="$(builddir)/"
thread:
@RKTL_PRE@thread@RKTL_POST@:
cd $(srcdir)/../../thread && $(MAKE) thread-src-generate RACKET="$(BOOTSTRAP_RACKET)" BUILDDIR="$(builddir)/"
io:
@RKTL_PRE@io@RKTL_POST@:
cd $(srcdir)/../../io && $(MAKE) io-src-generate RACKET="$(BOOTSTRAP_RACKET)" BUILDDIR="$(builddir)/"
regexp:
@RKTL_PRE@regexp@RKTL_POST@:
cd $(srcdir)/../../regexp && $(MAKE) regexp-src-generate RACKET="$(BOOTSTRAP_RACKET)" BUILDDIR="$(builddir)/"
schemify:
@RKTL_PRE@schemify@RKTL_POST@:
cd $(srcdir)/../../schemify && $(MAKE) schemify-src-generate RACKET="$(BOOTSTRAP_RACKET)" BUILDDIR="$(builddir)/"
known:
@RKTL_PRE@known@RKTL_POST@:
cd $(srcdir)/../../schemify && $(MAKE) known-src-generate RACKET="$(BOOTSTRAP_RACKET)" BUILDDIR="$(builddir)/"
scheme:
@ -128,6 +128,13 @@ scheme-make:
racket.boot: racket.so
$(SCHEME) --script $(srcdir)/convert-to-boot.ss @COMPRESS_COMP@ racket.so racket.boot
@INCLUDEDEP@ compiled/expander.d
@INCLUDEDEP@ compiled/thread.d
@INCLUDEDEP@ compiled/io.d
@INCLUDEDEP@ compiled/regexp.d
@INCLUDEDEP@ compiled/schemify.d
@INCLUDEDEP@ compiled/known.d
# ----------------------------------------
# Unix

View File

@ -638,6 +638,8 @@ OSX
MACH
SCHEME_DIR
RACKET
RKTL_POST
RKTL_PRE
INCLUDEDEP
RKTLINKER
STRIP_LIB_DEBUG
@ -4026,6 +4028,20 @@ $as_echo "$set_strip_lib" >&6; }
fi
############## Makefile includes ################
if test "$INCLUDEDEP" = "#" ; then
is_gmake=`make -v no-such-target-we-hope 2>&1 | grep "GNU Make"`
if test "$is_gmake" = "" ; then
INCLUDEDEP="-include"
fi
fi
if test "$INCLUDEDEP" != "#" ; then
RKTL_PRE="compiled/"
RKTL_POST=".rktl"
fi
############## C flags ################
ac_ext=c
@ -4649,6 +4665,8 @@ CPPFLAGS="$CPPFLAGS $PREFLAGS"

View File

@ -289,6 +289,20 @@ fi
m4_include(../ac/strip.m4)
############## Makefile includes ################
if test "$INCLUDEDEP" = "#" ; then
is_gmake=`make -v no-such-target-we-hope 2>&1 | grep "GNU Make"`
if test "$is_gmake" = "" ; then
INCLUDEDEP="-include"
fi
fi
if test "$INCLUDEDEP" != "#" ; then
RKTL_PRE="compiled/"
RKTL_POST=".rktl"
fi
############## C flags ################
AC_LANG_C
@ -437,6 +451,8 @@ AC_SUBST(STRIP_DEBUG)
AC_SUBST(STRIP_LIB_DEBUG)
AC_SUBST(RKTLINKER)
AC_SUBST(INCLUDEDEP)
AC_SUBST(RKTL_PRE)
AC_SUBST(RKTL_POST)
AC_SUBST(RACKET)
AC_SUBST(SCHEME_DIR)
AC_SUBST(MACH)