mldonkey-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-commits] mldonkey config/Makefile.in distrib/ChangeLog t...


From: mldonkey-commits
Subject: [Mldonkey-commits] mldonkey config/Makefile.in distrib/ChangeLog t...
Date: Sun, 24 Jun 2012 08:07:08 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Changes by:     spiralvoice <spiralvoice>       12/06/24 08:07:08

Modified files:
        config         : Makefile.in 
        distrib        : ChangeLog 
        tools          : ocamlpp.ml4 

Log message:
        patch #7802

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/config/Makefile.in?cvsroot=mldonkey&r1=1.204&r2=1.205
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1557&r2=1.1558
http://cvs.savannah.gnu.org/viewcvs/mldonkey/tools/ocamlpp.ml4?cvsroot=mldonkey&r1=1.2&r2=1.3

Patches:
Index: config/Makefile.in
===================================================================
RCS file: /sources/mldonkey/mldonkey/config/Makefile.in,v
retrieving revision 1.204
retrieving revision 1.205
diff -u -b -r1.204 -r1.205
--- config/Makefile.in  24 Jun 2012 08:02:23 -0000      1.204
+++ config/Makefile.in  24 Jun 2012 08:07:07 -0000      1.205
@@ -1448,7 +1448,7 @@
 
 zogml:
        (for i in $(GUI_CODE)/gui*_base.zog ; do \
-               $(CAMLP4) pa_o.cmo pa_zog.cma pr_o.cmo -impl $$i > 
$(GUI_CODE)/`basename $$i zog`ml ;\
+               $(CAMLP4) pa_o.cmo pa_zog.cma pr_o.cmo -impl $$i -o 
$(GUI_CODE)/`basename $$i zog`ml ;\
        done)
 
 #######################################################################
@@ -1863,17 +1863,16 @@
        @$(OCAMLYACC) $<
 
 .zog.ml:
-       @$(CAMLP4) pa_o.cmo ./pa_zog.cma pr_o.cmo -impl $< > $@
+       @$(CAMLP4) pa_o.cmo ./pa_zog.cma pr_o.cmo -impl $< -o $@
 
 .ml4.ml:
-       @echo '# 1 "$<"' > $@
-       @$(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< >> $@
+       @$(CAMLP4) pa_o.cmo pa_op.cmo pr_o.cmo -impl $< -o $@
 
 .mlc4.ml:
        @$(CAMLP4OF) -I +camlp4 -impl $< -o $@
 
 .mlt.ml:
-       @$(OCAMLPP) -pp $< > $@
+       @$(OCAMLPP) -o $@ -pp $<
 
 .c.o :
        $(OCAMLC) -verbose -ccopt "-I $(OCAML_SRC)/byterun -o $*.o" -ccopt 
"$(CFLAGS)" $(LIBS_flags) -c $<

Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1557
retrieving revision 1.1558
diff -u -b -r1.1557 -r1.1558
--- distrib/ChangeLog   24 Jun 2012 08:06:11 -0000      1.1557
+++ distrib/ChangeLog   24 Jun 2012 08:07:07 -0000      1.1558
@@ -15,6 +15,7 @@
 =========
 
 2012/06/24
+7802: Do not leave empty files if code generation fails (ygrek)
 7801: HTML: Fix content-type for 401 error (ygrek)
 7800: Improve error message visibility (ygrek)
 7799: HTML: fix validation errors (ygrek)

Index: tools/ocamlpp.ml4
===================================================================
RCS file: /sources/mldonkey/mldonkey/tools/ocamlpp.ml4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- tools/ocamlpp.ml4   1 Nov 2004 11:23:04 -0000       1.2
+++ tools/ocamlpp.ml4   24 Jun 2012 08:07:08 -0000      1.3
@@ -1,5 +1,7 @@
 open Str
     
+let outch = ref stdout
+
 (*
 let gen dest_filename =
   
@@ -156,8 +158,8 @@
   let ic = open_in filename in
   
   let line_warning line =
-    Printf.fprintf stdout "(*\n\n WARNING: this file is automatically 
generated from: \n\t%s\n\n*)\n\n" filename;
-    Printf.fprintf stdout "# %d \"%s\"\n" (line+1) filename;  
+    Printf.fprintf !outch "(*\n\n WARNING: this file is automatically 
generated from: \n\t%s\n\n*)\n\n" filename;
+    Printf.fprintf !outch "# %d \"%s\"\n" (line+1) filename;  
   in
   
   let rec iter_line i env =
@@ -178,7 +180,7 @@
                   line_warning (i+1);
                   env
               | Line (line, filename) ->
-                  Printf.fprintf stdout "# %d \"%s\"\n" line filename;
+                  Printf.fprintf !outch "# %d \"%s\"\n" line filename;
                   env
               | Regexps regexps2 ->
                   line_warning (i+1);
@@ -192,8 +194,8 @@
                 exit 2
           end;
         end else begin
-          output_string stdout line;
-          output_char stdout '\n';
+          output_string !outch line;
+          output_char !outch '\n';
           env
         end
     in
@@ -217,7 +219,7 @@
 
 let add_depend  filedep filename depends =
   if not (List.mem filename !depends) then begin
-      Printf.fprintf stdout "%s: %s\n" filedep filename;
+      Printf.fprintf !outch "%s: %s\n" filedep filename;
       depends := filename :: !depends
     end
   
@@ -279,12 +281,12 @@
         exit 2
       end
       
-let _ =
+let () =
   Arg.parse 
     [
 (*    "-gen", Arg.String gen, " <filename> : generate filename"; *)
     "-pp", Arg.String pp, " <filename> : preprocess filename";
-  ] depend ""
-    
-  
+    "-o", Arg.String (fun s -> outch := open_out s), " <filename> : output 
filename (influences subsequent options)";
+  ] depend "";
+  close_out !outch
   
\ No newline at end of file



reply via email to

[Prev in Thread] Current Thread [Next in Thread]