Permalink
Browse files

Replace gsc-boot.c by shell scripts to avoid problems when cross-comp…

…iling.
  • Loading branch information...
feeley committed May 8, 2012
1 parent a32b3ab commit fbb1e789cab2abec95262bfb595168afd60839bd
Showing with 47 additions and 30 deletions.
  1. +17 −0 gsc-boot.bat.windows
  2. +0 −24 gsc-boot.c
  3. +17 −0 gsc-boot.unix
  4. +2 −1 gsc/makefile.in
  5. +2 −2 include/stamp.h
  6. +9 −3 makefile.in
View
@@ -0,0 +1,17 @@
+@echo off
+
+rem Copyright (c) 2012 by Marc Feeley, All Rights Reserved.
+
+rem Due to the meta-circular nature of the system, an executable
+rem version of the Gambit compiler (gsc-boot) is necessary to compile
+rem the .scm source files that are part of the Gambit runtime library
+rem into .c files. The Gambit git repository contains precompiled
+rem versions of these files. When Gambit is initially built, it is
+rem necessary to avoid generating these .c files (since an executable
+rem Gambit compiler is not yet available to generate them). This
+rem circular dependence is resolved by using a dummy gsc-boot script
+rem which does not touch the .c files obtained from the repository.
+
+rem echo "***DUMMY*** compilation (this is normal when bootstrapping)"
+
+exit 0
View
@@ -1,24 +0,0 @@
-/* File: "gsc-boot.c" */
-
-/* Copyright (c) 2012 by Marc Feeley, All Rights Reserved. */
-
-/*
- * Due to the meta-circular nature of the system, an executable
- * version of the Gambit compiler (gsc-boot) is necessary to compile
- * the .scm source files that are part of the Gambit runtime library
- * into .c files. The Gambit git repository contains precompiled
- * versions of these files. When Gambit is initially built, it is
- * necessary to avoid generating these .c files (since an executable
- * Gambit compiler is not yet available to generate them). This
- * circular dependence is resolved by using a dummy gsc-boot program
- * which does not touch the .c files obtained from the repository.
- */
-
-int main(int argc, char *argv[])
-{
- /*
- printf("***DUMMY*** compilation (this is normal when bootstrapping)\n");
- */
-
- return 0;
-}
View
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+# Copyright (c) 2012 by Marc Feeley, All Rights Reserved.
+
+# Due to the meta-circular nature of the system, an executable
+# version of the Gambit compiler (gsc-boot) is necessary to compile
+# the .scm source files that are part of the Gambit runtime library
+# into .c files. The Gambit git repository contains precompiled
+# versions of these files. When Gambit is initially built, it is
+# necessary to avoid generating these .c files (since an executable
+# Gambit compiler is not yet available to generate them). This
+# circular dependence is resolved by using a dummy gsc-boot script
+# which does not touch the .c files obtained from the repository.
+
+# echo "***DUMMY*** compilation (this is normal when bootstrapping)"
+
+exit 0
View
@@ -228,8 +228,9 @@ $(MODULES_O): $(srcdirpfx)$(rootfromhere)/include/gambit.h
bootstrap-pre:
bootstrap-post:
- cp $(LIBRARY) $(rootfromhere)/$(LIBRARY)
+ rm -f $(rootfromhere)/gsc-boot@bat@
cp $(EXECUTABLE) $(rootfromhere)/gsc-boot@exe@
+ cp $(LIBRARY) $(rootfromhere)/$(LIBRARY)
install-pre:
View
@@ -2,5 +2,5 @@
* Time stamp of last source code repository commit.
*/
-#define ___STAMP_YMD 20120429
-#define ___STAMP_HMS 14027
+#define ___STAMP_YMD 20120508
+#define ___STAMP_HMS 130234
View
@@ -74,7 +74,7 @@ SUBDIRS = include lib gsi gsc bin misc doc tests examples contrib prebuilt
RCFILES = README INSTALL.txt LICENSE-2.0.txt LGPL.txt \
makefile.in configure configure.ac config.guess config.sub install-sh mkidirs \
-relpath gsc-boot.c
+relpath gsc-boot.unix gsc-boot.bat.windows
GITRCFILES = .gitignore .gitattributes
HGRCFILES = .hgignore .hgtags
@@ -99,8 +99,14 @@ all-pre: gsc-boot@exe@
all-post:
-gsc-boot@exe@: gsc-boot.c
- @C_COMPILER@ -o gsc-boot@exe@ gsc-boot.c
+gsc-boot@exe@:
+ rm -f gsc-boot@bat@
+ if test "@bat@" = ""; then \
+ cp gsc-boot.unix gsc-boot@bat@; \
+ chmod +x gsc-boot@bat@; \
+ else \
+ cp gsc-boot.bat.windows gsc-boot@bat@; \
+ fi
fake_target:

0 comments on commit fbb1e78

Please sign in to comment.