From 789217535044590e3b6058c6740fab60b8e677a9 Mon Sep 17 00:00:00 2001 From: Christian Rinderknecht Date: Thu, 2 May 2019 16:26:35 +0200 Subject: [PATCH] Removed the option "-o" when calling CPP (now ">"). This should fix the bug report from Jun about running ligo-compile on MacOS, as "cpp" in XCode does not seem to support the "-o" option. --- src/ligo/parser/camligo/user.ml | 2 +- src/ligo/parser/parser.ml | 2 +- src/ligo/parser/pascaligo/LexerMain.ml | 4 ++-- src/ligo/parser/pascaligo/ParserMain.ml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ligo/parser/camligo/user.ml b/src/ligo/parser/camligo/user.ml index 964b4635a..3c00ae6dd 100644 --- a/src/ligo/parser/camligo/user.ml +++ b/src/ligo/parser/camligo/user.ml @@ -6,7 +6,7 @@ let parse_file (source: string) : Ast.entry_point result = * and suffix = ".pp.ligo" * in prefix ^ suffix in * - * let cpp_cmd = Printf.sprintf "cpp -traditional-cpp %s -o %s" + * let cpp_cmd = Printf.sprintf "cpp -traditional-cpp %s > %s" * source pp_input in * let%bind () = sys_command cpp_cmd in * diff --git a/src/ligo/parser/parser.ml b/src/ligo/parser/parser.ml index dda8e599c..f3057c843 100644 --- a/src/ligo/parser/parser.ml +++ b/src/ligo/parser/parser.ml @@ -13,7 +13,7 @@ let parse_file (source: string) : AST_Raw.t result = and suffix = ".pp.ligo" in prefix ^ suffix in - let cpp_cmd = Printf.sprintf "cpp -traditional-cpp %s -o %s" + let cpp_cmd = Printf.sprintf "cpp -traditional-cpp %s > %s" source pp_input in let%bind () = sys_command cpp_cmd in diff --git a/src/ligo/parser/pascaligo/LexerMain.ml b/src/ligo/parser/pascaligo/LexerMain.ml index 621008d98..7657db900 100644 --- a/src/ligo/parser/pascaligo/LexerMain.ml +++ b/src/ligo/parser/pascaligo/LexerMain.ml @@ -35,10 +35,10 @@ let pp_input = let cpp_cmd = match EvalOpt.input with None | Some "-" -> - Printf.sprintf "cpp -traditional-cpp%s - -o %s" + Printf.sprintf "cpp -traditional-cpp%s - > %s" lib_path pp_input | Some file -> - Printf.sprintf "cpp -traditional-cpp%s %s -o %s" + Printf.sprintf "cpp -traditional-cpp%s %s > %s" lib_path file pp_input let () = diff --git a/src/ligo/parser/pascaligo/ParserMain.ml b/src/ligo/parser/pascaligo/ParserMain.ml index 6259c0a86..20f9a3912 100644 --- a/src/ligo/parser/pascaligo/ParserMain.ml +++ b/src/ligo/parser/pascaligo/ParserMain.ml @@ -53,10 +53,10 @@ let pp_input = let cpp_cmd = match EvalOpt.input with None | Some "-" -> - Printf.sprintf "cpp -traditional-cpp%s - -o %s" + Printf.sprintf "cpp -traditional-cpp%s - > %s" lib_path pp_input | Some file -> - Printf.sprintf "cpp -traditional-cpp%s %s -o %s" + Printf.sprintf "cpp -traditional-cpp%s %s > %s" lib_path file pp_input let () =