From: Chris Hanson Date: Sun, 1 Oct 2006 20:56:58 +0000 (+0000) Subject: Update configuration to handle COMPILED_SOURCES better. Also use X-Git-Tag: 20090517-FFI~920 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=e77b791780becd062b4aad9145c5299a8fba6182;p=mit-scheme.git Update configuration to handle COMPILED_SOURCES better. Also use AC_PATH_X rather than AC_PATH_XTRA to eliminate unnecessary dependencies in the output. --- diff --git a/v7/src/microcode/configure.ac b/v7/src/microcode/configure.ac index 73aa04459..bb75e9b51 100644 --- a/v7/src/microcode/configure.ac +++ b/v7/src/microcode/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT([MIT/GNU Scheme microcode], [14.18], [bug-mit-scheme@gnu.org], [mit-scheme]) -AC_REVISION([$Id: configure.ac,v 1.14 2006/09/25 04:40:10 cph Exp $]) +AC_REVISION([$Id: configure.ac,v 1.15 2006/10/01 20:56:45 cph Exp $]) AC_CONFIG_SRCDIR([boot.c]) AC_CONFIG_HEADERS([config.h]) AC_PROG_MAKE_SET @@ -153,9 +153,9 @@ MODULE_BASES= MODULE_CFLAGS="-DCOMPILE_AS_MODULE" MODULE_LDFLAGS= COMPILED_DEFS= -CMPAUXMDO= COMPILED_SOURCES_1= COMPILED_OBJECTS_1= +CMPAUXMDO= dnl Checks for programs. AC_PROG_CC @@ -547,7 +547,7 @@ fi dnl Checks for system characteristics. AC_CANONICAL_HOST -AC_PATH_XTRA +AC_PATH_X AC_SYS_LARGEFILE AC_SYS_LONG_FILE_NAMES AC_SYS_RESTARTABLE_SYSCALLS @@ -870,12 +870,17 @@ else [Define that the compiler outputs C code instead of binaries.]) test -f cmpauxmd.c || ${LN_S} cmpauxmd/c.c cmpauxmd.c test -f cmpintmd.h || ${LN_S} cmpintmd/c.h cmpintmd.h - COMPILED_DEFS="${COMPILED_DEFS} -DCOMPILE_FOR_STATIC_LINKING" - COMPILED_SOURCES_1="\$(COMPILED_SOURCES)" - COMPILED_OBJECTS_1="\$(COMPILED_OBJECTS)" OPTIONAL_SOURCES="${OPTIONAL_SOURCES} cmpauxmd.c unstackify.c compinit.c" OPTIONAL_OBJECTS="${OPTIONAL_OBJECTS} cmpauxmd.o unstackify.o compinit.o" GC_HEAD_FILES="${GC_HEAD_FILES} cmpintmd.h" + COMPILED_DEFS="-DCOMPILE_FOR_STATIC_LINKING" + COMPILED_SOURCES="utabmd.c" + for D in runtime sf cref star-parser compiler; do + COMPILED_SOURCES="${COMPILED_SOURCES} \$(wildcard ../${D}/*.c" + done + for D in back base fggen fgopt machines/C rtlbase rtlgen rtlopt; do + COMPILED_SOURCES="${COMPILED_SOURCES} \$(wildcard ../compiler/${D}/*.c" + done CMPAUXMDO="cmpauxmd.o" fi @@ -916,9 +921,9 @@ AC_SUBST_FILE([MODULE_RULES]) AC_SUBST([MODULE_CFLAGS]) AC_SUBST([MODULE_LDFLAGS]) AC_SUBST([COMPILED_DEFS]) +AC_SUBST([COMPILED_SOURCES]) +AC_SUBST([COMPILED_OBJECTS]) AC_SUBST([CMPAUXMDO]) -AC_SUBST([COMPILED_SOURCES_1]) -AC_SUBST([COMPILED_OBJECTS_1]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/v7/src/microcode/makegen/Makefile.in.in b/v7/src/microcode/makegen/Makefile.in.in index dd76d924b..fe505895b 100644 --- a/v7/src/microcode/makegen/Makefile.in.in +++ b/v7/src/microcode/makegen/Makefile.in.in @@ -1,6 +1,6 @@ # -*- Makefile -*- # -# $Id: Makefile.in.in,v 1.31 2006/09/29 19:28:58 cph Exp $ +# $Id: Makefile.in.in,v 1.32 2006/10/01 20:56:52 cph Exp $ # # Copyright 2000,2001,2002,2003,2005,2006 Massachusetts Institute of Technology # @@ -61,19 +61,10 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs # **** END BOILERPLATE **** # **** C back end stuff (I) **** - COMPILED_DEFS = @COMPILED_DEFS@ - -COMPILED_SOURCES = @(write-compiled "files-compiled")@ - +COMPILED_SOURCES = @COMPILED_SOURCES@ COMPILED_OBJECTS = $(COMPILED_SOURCES:.c=.o) -COMPILED_SOURCES_1 = @COMPILED_SOURCES_1@ - -COMPILED_OBJECTS_1 = @COMPILED_OBJECTS_1@ - -# **** End C back end stuff (I) *** - # **** Tool configuration **** AUXDIR = $(libdir)/mit-scheme @@ -87,14 +78,13 @@ GZIP_ENV = --best DEFS = -DMIT_SCHEME -DDEFAULT_LIBRARY_PATH=\"$(AUXDIR)\" @DEFS@ \ $(COMPILED_DEFS) @SCHEME_DEFS@ -I. -I$(srcdir) -I. CFLAGS = @CFLAGS@ -X_CFLAGS = @X_CFLAGS@ CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ M4_FLAGS = @M4_FLAGS@ AS_FLAGS = @AS_FLAGS@ -COMPILE = $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) $(X_CFLAGS) +COMPILE = $(CC) $(DEFS) $(CPPFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(CFLAGS) $(LDFLAGS) -o $@ EXPAND = $(M4) $(M4_FLAGS) @@ -103,10 +93,10 @@ ASSEMBLE = $(AS) $(AS_FLAGS) # **** Configured files **** GC_HEAD_FILES = @GC_HEAD_FILES@ -OPTIONAL_SOURCES = @OPTIONAL_SOURCES@ $(COMPILED_SOURCES_1) -OPTIONAL_OBJECTS = @OPTIONAL_OBJECTS@ $(COMPILED_OBJECTS_1) +OPTIONAL_SOURCES = @OPTIONAL_SOURCES@ $(COMPILED_SOURCES) +OPTIONAL_OBJECTS = @OPTIONAL_OBJECTS@ $(COMPILED_OBJECTS) STATIC_LIBS = @STATIC_PREFIX@ @STATIC_LIBS@ @STATIC_SUFFIX@ -X_LIBS = @X_PRE_LIBS@ @LIB_X11@ @X_EXTRA_LIBS@ +X_LIBS = @LIB_X11@ PRBFISH_LIBS = @PRBFISH_LIBS@ PRMD5_LIBS = @PRMD5_LIBS@ @@ -354,10 +344,10 @@ install-auxDATA: $(aux_DATA) # **** C back end stuff (II) **** -@CMPAUXMDO@ : cmpauxmd.c liarc.tch prims.h bignum.h bitstr.h avltree.h \ +@CMPAUXMDO@: cmpauxmd.c liarc.tch prims.h bignum.h bitstr.h avltree.h \ outf.h extern.h -compinit.o : compinit.c compinit.h liarc.tch +compinit.o: compinit.c compinit.h liarc.tch unstackify.o: unstackify.c stackops.h liarc.tch @@ -378,22 +368,20 @@ outf.h \ extern.h \ $(GC_HEAD_FILES) -#/* The following includes liarc.tch in case COMPILED_SOURCES is empty, -# to prevent fgrep from reading stdin. -# */ -compinit.h : $(COMPILED_SOURCES) liarc.tch Makefile - @echo "#*** Generating" $@ "because of" $? +# The following includes liarc.tch in case COMPILED_SOURCES is empty, +# to prevent grep from reading stdin. + +compinit.h: $(COMPILED_SOURCES) liarc.tch Makefile rm -f $@ - grep -E \^DECLARE_COMPILED_CODE liarc.tch $(COMPILED_SOURCES) | \ - sed -e 's/.*:/ /' -e 's/)/);/' > $@ - grep -E \^DECLARE_COMPILED_DATA liarc.tch $(COMPILED_SOURCES) | \ - sed -e 's/.*:/ /' -e 's/)/);/' >> $@ - grep -E \^DECLARE_DATA_OBJECT liarc.tch $(COMPILED_SOURCES) | \ - sed -e 's/.*:/ /' -e 's/)/);/' >> $@ - -foo $(COMPILED_OBJECTS) : liarc.tch + grep \^DECLARE_COMPILED_CODE liarc.tch $(COMPILED_SOURCES) \ + | sed -e 's/.*:/ /' -e 's/)/);/' > $@ + grep \^DECLARE_COMPILED_DATA liarc.tch $(COMPILED_SOURCES) \ + | sed -e 's/.*:/ /' -e 's/)/);/' >> $@ + grep \^DECLARE_DATA_OBJECT liarc.tch $(COMPILED_SOURCES) \ + | sed -e 's/.*:/ /' -e 's/)/);/' >> $@ + +foo $(COMPILED_OBJECTS): liarc.tch liarc.tch: liarc.h $(LIARC_HEAD_FILES) - @echo "#** Generating" $@ because of $? rm -f $@ echo "touch" > $@ diff --git a/v7/src/microcode/makegen/makegen.scm b/v7/src/microcode/makegen/makegen.scm index eced00d24..352166772 100644 --- a/v7/src/microcode/makegen/makegen.scm +++ b/v7/src/microcode/makegen/makegen.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: makegen.scm,v 1.11 2006/09/25 05:56:12 cph Exp $ +$Id: makegen.scm,v 1.12 2006/10/01 20:56:58 cph Exp $ Copyright 2000,2001,2003,2005,2006 Massachusetts Institute of Technology @@ -98,10 +98,6 @@ USA. ((WRITE-DEPENDENCIES) (guarantee-nargs 0) (write-dependencies file-lists deps-filename output)) - ((WRITE-COMPILED) - (map-over-entries - (lambda (entry) - (string-append "$(wildcard " entry ")")))) (else (error "Unknown command:" command))))))) @@ -109,10 +105,8 @@ USA. (maybe-update-dependencies deps-filename (sort (append-map (lambda (file-list) - (if (string=? (car file-list) "files-compiled") - '() - (map (lambda (base) (string-append base ".c")) - (cdr file-list)))) + (map (lambda (base) (string-append base ".c")) + (cdr file-list))) file-lists) string