Skip to content
Browse files

Switched from cpp to gcc -E so that macros actually work properly acc…

…ross platforms.
  • Loading branch information...
1 parent 19bb659 commit 35159972c2753bda8670a35c6d46b178530a7673 Kelly Norton committed Feb 29, 2012
Showing with 5 additions and 3 deletions.
  1. +2 −2 src/pork/debug.js
  2. +3 −1 src/pork/pork.go
View
4 src/pork/debug.js
@@ -2,7 +2,7 @@
#define DEBUG
#if defined(DEBUG)
-#define ASSERT(c, s) console.assert(c, s);
+#define ASSERT(COND) window.console.assert(COND, #COND)
#else
-#define ASSERT(c, s)
+#define ASSERT(cond)
#endif
View
4 src/pork/pork.go
@@ -41,7 +41,7 @@ const (
sassFileExtension = ".scss"
)
-var PathToCpp = "/usr/bin/cpp"
+var PathToCpp = "/usr/bin/gcc"
var PathToJava = "/usr/bin/java"
var PathToRuby = "/usr/bin/ruby"
@@ -77,8 +77,10 @@ func waitFor(procs ...*os.Process) error {
func cpp(filename string, w *os.File) (*os.Process, error) {
cppArgs := []string{
PathToCpp,
+ "-E",
"-P",
"-CC",
+ "-xc",
fmt.Sprintf("-I%s", filepath.Join(rootDir, "src")),
filename}
return os.StartProcess(cppArgs[0],

0 comments on commit 3515997

Please sign in to comment.
Something went wrong with that request. Please try again.