1
0
Quellcode durchsuchen

Small temporary fix to Makefile and some fixes to jtalkc - now compiles whole st dir.

Göran Krampe vor 13 Jahren
Ursprung
Commit
9cab8693c6
2 geänderte Dateien mit 21 neuen und 16 gelöschten Zeilen
  1. 17 12
      bin/jtalkc
  2. 4 4
      st/Makefile

+ 17 - 12
bin/jtalkc

@@ -42,8 +42,7 @@ Usage: $0 [-L level] [-l lib1,lib2...] [-i file] [-m class] [-M file]
      where level is:
      where level is:
 
 
         KERNEL    - a reasonable level for server side programs or libraries.
         KERNEL    - a reasonable level for server side programs or libraries.
-        PARSER    - if you need to parse stuff, includes PetitParser etc.
-        COMPILER  - if you need to compile Jtalk code.
+        COMPILER  - if you need to compile, import or export Jtalk code.
         CANVAS    - if you need HTML DOM manipulation, typical for client side.
         CANVAS    - if you need HTML DOM manipulation, typical for client side.
         JQUERY    - if you want JQuery stuff on top of Canvas.
         JQUERY    - if you want JQuery stuff on top of Canvas.
         IDE       - if you are extending the IDE with new tools etc.
         IDE       - if you are extending the IDE with new tools etc.
@@ -92,7 +91,7 @@ Usage: $0 [-L level] [-l lib1,lib2...] [-i file] [-m class] [-M file]
      Compile Hello.st to Hello.js and create complete program called
      Compile Hello.st to Hello.js and create complete program called
      Program.js and adding a call to class method #main in class Hello:
      Program.js and adding a call to class method #main in class Hello:
 
 
-        jtalkc -N -m Hello Hello.st Program
+        jtalkc -m Hello Hello.st Program
 
 
      Compile two .st files into corresponding .js files,
      Compile two .st files into corresponding .js files,
      and link with specific myboot.js, myKernel.js, myinit.js
      and link with specific myboot.js, myKernel.js, myinit.js
@@ -112,10 +111,9 @@ fi
 # Define our predefined library combinations
 # Define our predefined library combinations
 BOOT="boot"
 BOOT="boot"
 KERNEL="$BOOT Kernel"
 KERNEL="$BOOT Kernel"
-PARSER="$KERNEL Parser"
-COMPILER="$PARSER parser Compiler"
-CANVAS="$COMPILER Canvas"
-JQUERY="$COMPILER JQuery"
+COMPILER="$KERNEL Parser parser Compiler"
+CANVAS="$KERNEL Canvas"
+JQUERY="$CANVAS JQuery"
 IDE="$JQUERY IDE SUnit Examples"
 IDE="$JQUERY IDE SUnit Examples"
 
 
 # Predefined initializer
 # Predefined initializer
@@ -203,7 +201,6 @@ for FILE in $LOAD
 do
 do
    resolvejs $FILE
    resolvejs $FILE
    TOLOAD="$TOLOAD $RESOLVED"
    TOLOAD="$TOLOAD $RESOLVED"
-   TOADD="$TOADD $RESOLVED"
 done
 done
 
 
 # Resolve COMPILER
 # Resolve COMPILER
@@ -212,10 +209,18 @@ do
    resolvejs $FILE
    resolvejs $FILE
    TOCOMPILER="$TOCOMPILER $RESOLVED"
    TOCOMPILER="$TOCOMPILER $RESOLVED"
 done
 done
-# Add supplied libraries to load (they are already resolved)
+
+# Add supplied libraries we have not already loaded (they are already resolved)
+#for FILE in $EXTRA
+#do
+#   resolvejs $FILE
+#   TOEXTRA="$TOEXTRA $RESOLVED"
+#done
+
 TOCOMPILER="$TOCOMPILER$TOLOAD"
 TOCOMPILER="$TOCOMPILER$TOLOAD"
-THEREST="init $JTALK/bin/$NODECOMPILE"
+
 # Resolve init and nodecompile
 # Resolve init and nodecompile
+THEREST="init $JTALK/bin/$NODECOMPILE"
 for FILE in $THEREST
 for FILE in $THEREST
 do
 do
    resolvejs $FILE
    resolvejs $FILE
@@ -223,7 +228,7 @@ do
 done
 done
 
 
 # Add supplied libraries
 # Add supplied libraries
-LIBS="$TOBASE $TOADD"
+LIBS="$TOBASE $TOLOAD"
 
 
 # Get a unique tempdir and make it get auto removed on exit
 # Get a unique tempdir and make it get auto removed on exit
 TMPDIR=`mktemp -d jtalkc.XXXXXX`
 TMPDIR=`mktemp -d jtalkc.XXXXXX`
@@ -274,7 +279,7 @@ done
 cat $TOCOMPILER > $TMPDIR/compiler.js
 cat $TOCOMPILER > $TMPDIR/compiler.js
  
  
 # Compile all collected .st files to .js
 # Compile all collected .st files to .js
-echo "Loading libraries$TOOURCOMPILER and compiling ..."
+echo "Loading libraries$TOCOMPILER and compiling ..."
 node $TMPDIR/compiler.js $DEPLOY $SUFFIX $COMPILE
 node $TMPDIR/compiler.js $DEPLOY $SUFFIX $COMPILE
 
 
 # Verify all .js files corresponding to .st files were created, otherwise exit
 # Verify all .js files corresponding to .st files were created, otherwise exit

+ 4 - 4
st/Makefile

@@ -52,19 +52,19 @@ Compiler.js: Compiler.st Parser.js
 #
 #
 # JQuery uses Canvas
 # JQuery uses Canvas
 JQuery.js: JQuery.st Canvas.js
 JQuery.js: JQuery.st Canvas.js
-	$(JTALKC) $(FLAGS) -L CANVAS $<
+	$(JTALKC) $(FLAGS) -l Canvas $<
 
 
 # IDE uses JQuery
 # IDE uses JQuery
 IDE.js: IDE.st JQuery.js
 IDE.js: IDE.st JQuery.js
-	$(JTALKC) $(FLAGS) -L JQUERY $<
+	$(JTALKC) $(FLAGS) -l Canvas,JQuery $<
 
 
 # The SUnit TestRunner uses UI stuff from IDE.
 # The SUnit TestRunner uses UI stuff from IDE.
 SUnit.js: SUnit.st IDE.js
 SUnit.js: SUnit.st IDE.js
-	$(JTALKC) $(FLAGS) -L IDE $<
+	$(JTALKC) $(FLAGS) -l Canvas,JQuery,IDE $<
 
 
 # Some Examples use SUnit
 # Some Examples use SUnit
 Examples.js: Examples.st SUnit.js
 Examples.js: Examples.st SUnit.js
-	$(JTALKC) $(FLAGS) -L IDE -l SUnit $<;
+	$(JTALKC) $(FLAGS) -l Canvas,JQuery,IDE,SUnit $<;
 
 
 
 
 # Installing is simply copying all js files to js directory.
 # Installing is simply copying all js files to js directory.