This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

committed: have sim cgen stuff load guile.scm explicitly


I think this finishes off everything outside the cgen directory that
calls cgen.

cgen/ChangeLog:
2005-02-09  Jim Blandy  <jimb@redhat.com>

	* cgen-sim.scm (load-files): Don't load fixup.scm.  (See
	corresponding change in the sim/common directory.)

sim/common/ChangeLog:
2005-02-09  Jim Blandy  <jimb@redhat.com>

	* Make-common.in (CGEN): Load guile.scm, and include a trailing
	'-s' argument.
	(CGEN_FLAGS_TO_PASS): Include single quotes around the reference
	to $(CGEN), to ensure that the command substitution happens where
	the variable is referenced in the submake, not when the submake's
	arguments are expanded.
	(cgen.sh): Be prepared for the 'cgen' argument to contain spaces.
	(arch, cpu, decode, cpu-decode, defs, desc): Place the name of the
	application Scheme script directly after ${cgen}; don't precede it
	with a -s.

Index: cgen/cgen-sim.scm
===================================================================
RCS file: /cvs/src/src/cgen/cgen-sim.scm,v
retrieving revision 1.3
diff -c -p -r1.3 cgen-sim.scm
*** cgen/cgen-sim.scm	8 Sep 2003 17:17:22 -0000	1.3
--- cgen/cgen-sim.scm	9 Feb 2005 21:27:39 -0000
***************
*** 13,21 ****
  ; Load the various support routines.
  
  (define (load-files srcdir)
-   ; Fix up Scheme to be what we use (guile is always in flux).
-   (primitive-load-path (string-append srcdir "/fixup.scm"))
- 
    (load (string-append srcdir "/read.scm"))
    (load (string-append srcdir "/utils-sim.scm"))
    (load (string-append srcdir "/sim.scm"))
--- 13,18 ----
Index: cgen/guile.scm
===================================================================
RCS file: /cvs/src/src/cgen/guile.scm,v
retrieving revision 1.1
diff -c -p -r1.1 guile.scm
*** cgen/guile.scm	7 Feb 2005 18:51:31 -0000	1.1
--- cgen/guile.scm	9 Feb 2005 21:27:40 -0000
***************
*** 57,59 ****
--- 57,64 ----
  	 (symbol-bound? #f 'list-reverse!))
      (define reverse! list-reverse!)
  )
+ 
+ (define (debug-write . objs)
+   (map (lambda (o) ((if (string? o) display write) o)) objs)
+   (newline))
+ 
Index: sim/common/Make-common.in
===================================================================
RCS file: /cvs/src/src/sim/common/Make-common.in,v
retrieving revision 1.19
diff -c -p -r1.19 Make-common.in
*** sim/common/Make-common.in	7 Dec 2004 22:28:53 -0000	1.19
--- sim/common/Make-common.in	9 Feb 2005 21:27:40 -0000
*************** stamp-h: config.in config.status
*** 682,688 ****
  # CGEN support
  
  CGENDIR = @cgendir@
! CGEN = `if [ -f ../../guile/libguile/guile ]; then echo ../../guile/libguile/guile; else echo guile ; fi`
  CGENFLAGS = -v
  CGEN_CPU_DIR = $(CGENDIR)/cpu
  
--- 682,688 ----
  # CGEN support
  
  CGENDIR = @cgendir@
! CGEN = "`if [ -f ../../guile/libguile/guile ]; then echo ../../guile/libguile/guile; else echo guile ; fi` -l $(CGENDIR)/guile.scm -s"
  CGENFLAGS = -v
  CGEN_CPU_DIR = $(CGENDIR)/cpu
  
*************** CGEN_CPU_SEM = -S tmp-sem.c1
*** 700,706 ****
  CGEN_CPU_SEMSW = -X tmp-semsw.c1
  
  CGEN_FLAGS_TO_PASS = \
! 	CGEN=$(CGEN) \
  	CGENFLAGS="$(CGENFLAGS)"
  
  # We store the generated files in the source directory until we decide to
--- 700,706 ----
  CGEN_CPU_SEMSW = -X tmp-semsw.c1
  
  CGEN_FLAGS_TO_PASS = \
! 	CGEN='$(CGEN)' \
  	CGENFLAGS="$(CGENFLAGS)"
  
  # We store the generated files in the source directory until we decide to
Index: sim/common/cgen.sh
===================================================================
RCS file: /cvs/src/src/sim/common/cgen.sh,v
retrieving revision 1.6
diff -c -p -r1.6 cgen.sh
*** sim/common/cgen.sh	1 Dec 2004 02:29:30 -0000	1.6
--- sim/common/cgen.sh	9 Feb 2005 21:27:40 -0000
*************** set -e
*** 14,20 ****
  
  action=$1
  srcdir=$2
! cgen=$3
  cgendir=$4
  cgenflags=$5
  arch=$6
--- 14,20 ----
  
  action=$1
  srcdir=$2
! cgen="$3"
  cgendir=$4
  cgenflags=$5
  arch=$6
*************** arch)
*** 56,62 ****
  	rm -f tmp-arch.c1 tmp-arch.c
  	rm -f tmp-all.h1 tmp-all.h
  
! 	${cgen} -s ${cgendir}/cgen-sim.scm \
  		-s ${cgendir} \
  		${cgenflags} \
  		-f "${archflags}" \
--- 56,62 ----
  	rm -f tmp-arch.c1 tmp-arch.c
  	rm -f tmp-all.h1 tmp-all.h
  
! 	${cgen} ${cgendir}/cgen-sim.scm \
  		-s ${cgendir} \
  		${cgenflags} \
  		-f "${archflags}" \
*************** cpu | decode | cpu-decode)
*** 110,116 ****
  		;;
  	esac
  
! 	${cgen} -s ${cgendir}/cgen-sim.scm \
  		-s ${cgendir} \
  		${cgenflags} \
  		-f "${archflags}" \
--- 110,116 ----
  		;;
  	esac
  
! 	${cgen} ${cgendir}/cgen-sim.scm \
  		-s ${cgendir} \
  		${cgenflags} \
  		-f "${archflags}" \
*************** cpu | decode | cpu-decode)
*** 179,185 ****
  defs)
  	rm -f tmp-defs.h1 tmp-defs.h
  	
! 	${cgen} -s ${cgendir}/cgen-sim.scm \
  		-s ${cgendir} \
  		${cgenflags} \
  		-f "${archflags}" \
--- 179,185 ----
  defs)
  	rm -f tmp-defs.h1 tmp-defs.h
  	
! 	${cgen} ${cgendir}/cgen-sim.scm \
  		-s ${cgendir} \
  		${cgenflags} \
  		-f "${archflags}" \
*************** desc)
*** 196,202 ****
  	rm -f tmp-desc.c1 tmp-desc.c
  	rm -f tmp-opc.h1 tmp-opc.h
  
! 	${cgen} -s ${cgendir}/cgen-opc.scm \
  		-s ${cgendir} \
  		${cgenflags} \
  		-OPC ${opcfile} \
--- 196,202 ----
  	rm -f tmp-desc.c1 tmp-desc.c
  	rm -f tmp-opc.h1 tmp-opc.h
  
! 	${cgen} ${cgendir}/cgen-opc.scm \
  		-s ${cgendir} \
  		${cgenflags} \
  		-OPC ${opcfile} \


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]