Commits

ysulsky committed 5171ce0

build-common.sh: ignore whitespace when patching oasis files

Comments (0)

Files changed (1)

 function enable_pack_in_setup_ml {
     # if this is not the patched version of oasis, we need to patch it.
     if ! grep -q lib_pack setup.ml; then
-	patch -p1 <<EOF
+	patch -l -p1 <<EOF
 --- a/setup.ml	2012-01-26 09:04:49.000000000 +0000
 +++ b/setup.ml	2012-01-26 09:25:06.000000000 +0000
 @@ -992,6 +992,7 @@
-   type library = 
+   type library =
        {
          lib_modules:            string list;
 +        lib_pack:               bool;
          lib_findlib_parent:     findlib_name option;
          lib_findlib_name:       findlib_name option;
 @@ -1285,6 +1286,7 @@
-         source_file_exists is_native ext_lib ext_dll =  
+         source_file_exists is_native ext_lib ext_dll =
      (* The headers that should be compiled along *)
-     let headers = 
+     let headers =
 +      if lib.lib_pack then [] else
        List.fold_left
          (fun hdrs modul ->
-            try 
+            try
 @@ -1323,11 +1325,18 @@
-   
+
      (* Compute what libraries should be built *)
      let acc_nopath =
 +      (* Add the packed header file if required *)
 -        [cs.cs_name^".cmxa"] :: [cs.cs_name^(ext_lib ())] :: acc
 +        add_pack_header ([cs.cs_name^".cmxa"] :: [cs.cs_name^(ext_lib ())] :: acc)
        in
-         match bs.bs_compiled_object with 
+         match bs.bs_compiled_object with
            | Native ->
 @@ -4261,6 +4270,7 @@
                  List.rev_append lib_extra acc
                in
-               let acc = 
+               let acc =
 +                if lib.lib_pack then acc else
                  (* Add uncompiled header from the source tree *)
-                 let path = 
+                 let path =
                    BaseFilePath.of_unix bs.bs_path
 
 EOF
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.