[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: gaf.git: branch: master updated (1.7.1-20110619-244-gc5b4733)



The branch, master has been updated
       via  c5b473354b2340b42d1a48436fb4da113b34657f (commit)
      from  182110f690c51eb53ea1799fd022e87322d742e3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 gnetlist/scheme/gnet-gsch2pcb.scm.in |   96 +++++++++++++++------------------
 utils/src/gsch2pcb.c                 |    8 ++--
 2 files changed, 48 insertions(+), 56 deletions(-)


=================
 Commit Messages
=================

commit c5b473354b2340b42d1a48436fb4da113b34657f
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    gsch2pcb: Make --m4-file and -m4-pcbdir arguments work again.
    
    These options were broken in commit 6d935086d299, and haven't worked
    since before 1.6.x.  Since no-one had reported it a bug in all that
    time, it's obvious that no-one was actually using them, and we could
    probably get away with just deleting them.  But making them work again
    will work as well.
    
    Closes-bug: lp-897661

:100644 100644 c38be99... 4e0d6b0... M	gnetlist/scheme/gnet-gsch2pcb.scm.in
:100644 100644 e543027... 9f8dc42... M	utils/src/gsch2pcb.c

=========
 Changes
=========

commit c5b473354b2340b42d1a48436fb4da113b34657f
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    gsch2pcb: Make --m4-file and -m4-pcbdir arguments work again.
    
    These options were broken in commit 6d935086d299, and haven't worked
    since before 1.6.x.  Since no-one had reported it a bug in all that
    time, it's obvious that no-one was actually using them, and we could
    probably get away with just deleting them.  But making them work again
    will work as well.
    
    Closes-bug: lp-897661

diff --git a/gnetlist/scheme/gnet-gsch2pcb.scm.in b/gnetlist/scheme/gnet-gsch2pcb.scm.in
index c38be99..4e0d6b0 100644
--- a/gnetlist/scheme/gnet-gsch2pcb.scm.in
+++ b/gnetlist/scheme/gnet-gsch2pcb.scm.in
@@ -132,74 +132,66 @@
 ;; where pcb stores its m4 files and the pcb config directory.
 (define-undefined gsch2pcb:pcb-m4-command "@m4@")
 (define-undefined gsch2pcb:pcb-m4-dir "@pcbm4dir@")
+(define-undefined gsch2pcb:m4-files "")
 
 ;; Let the user override the m4 search path
-(define-undefined gsch2pcb:pcb-m4-path (list gsch2pcb:pcb-m4-dir "$HOME/.pcb" "."))
+(define-undefined gsch2pcb:pcb-m4-path '("$HOME/.pcb" "."))
 
 ;; Build up the m4 command line
-
-(define gsch2pcb:m4-command-line (string-append
-				  gsch2pcb:pcb-m4-command " -d ") )
-(define gsch2pcb:pcb-m4-path-str #f)
-(for-each (lambda (d)
-            (set! gsch2pcb:m4-command-line (string-append
-                                            gsch2pcb:m4-command-line
-                                            " -I" d))
-	    (if gsch2pcb:pcb-m4-path-str
-		(set! gsch2pcb:pcb-m4-path-str (string-append
-						gsch2pcb:pcb-m4-path-str
-						"  " d) )
-		(set! gsch2pcb:pcb-m4-path-str d)
-		)
-	    )
-	  gsch2pcb:pcb-m4-path
-	  )
-
-
-
-(set! gsch2pcb:m4-command-line
-      ( string-append gsch2pcb:m4-command-line
-		      " " gsch2pcb:pcb-m4-dir "/common.m4 - >> "
-		      )
-      )
-
-(define-undefined gsch2pcb:pcb-m4-command-line gsch2pcb:m4-command-line)
+(define (gsch2pcb:build-m4-command-line output-filename)
+  (string-append gsch2pcb:pcb-m4-command
+                 " -d"
+                 (string-join (cons gsch2pcb:pcb-m4-dir
+                                    gsch2pcb:pcb-m4-path)
+                              " -I" 'prefix)
+                 " " gsch2pcb:pcb-m4-dir "/common.m4"
+                 " " gsch2pcb:m4-files
+                 " - >> " output-filename))
 
 (define (gsch2pcb output-filename)
+  (define command-line (gsch2pcb:build-m4-command-line output-filename))
+
   (let ((port (open-output-file output-filename)))
     (gsch2pcb:write-top-header port)
     (close-port port)
     )
 
-  (set! gsch2pcb:pcb-m4-command-line (string-append
-				  gsch2pcb:pcb-m4-command-line
-				  output-filename))
-  (display (string-append
-	    "=====================================================\n"
-	    "gsch2pcb backend configuration:\n"
-	    "\n"
-	    "   ----------------------------------------\n"
-	    "   Variables which may be changed in gafrc:\n"
-	    "   ----------------------------------------\n"
-	    "   gsch2pcb:pcb-m4-command:    " gsch2pcb:pcb-m4-command "\n"
-	    "   gsch2pcb:pcb-m4-dir:        " gsch2pcb:pcb-m4-dir "\n"
-	    "   gsch2pcb:pcb-m4-path:       " gsch2pcb:pcb-m4-path-str "\n"
-	    "   gsch2pcb:m4-command-line:   " gsch2pcb:pcb-m4-command-line  "\n"
-	    "\n"
-	    "   ---------------------------------------------------\n"
-	    "   Variables which may be changed in the project file:\n"
-	    "   ---------------------------------------------------\n"
-	    "   gsch2pcb:use-m4:            " (if gsch2pcb:use-m4 "yes" "no") "\n"
-	    "\n"
-	    "=====================================================\n"
-	    )
-	   )
+  (format #t
+"=====================================================
+gsch2pcb backend configuration:
+
+   ----------------------------------------
+   Variables which may be changed in gafrc:
+   ----------------------------------------
+   gsch2pcb:pcb-m4-command:    ~S
+   gsch2pcb:pcb-m4-dir:        ~S
+   gsch2pcb:pcb-m4-path:       ~S
+   gsch2pcb:m4-files:          ~S
+
+   ---------------------------------------------------
+   Variables which may be changed in the project file:
+   ---------------------------------------------------
+   gsch2pcb:use-m4:            ~A
+
+   ----------------
+   M4 command line:
+   ----------------
+   ~A
+
+=====================================================
+"
+   gsch2pcb:pcb-m4-command
+   gsch2pcb:pcb-m4-dir
+   gsch2pcb:pcb-m4-path
+   gsch2pcb:m4-files
+   (if gsch2pcb:use-m4 "yes" "no")
+   command-line)
 
   ;; If we have defined gsch2pcb:use-m4 then run the footprints
   ;; through the pcb m4 setup.  Otherwise skip m4 entirely
   (if gsch2pcb:use-m4
       ;; pipe with the macro define in pcb program
-      (let ((pipe (open-output-pipe gsch2pcb:pcb-m4-command-line))
+      (let ((pipe (open-output-pipe command-line))
 	    )
 	
 	(display "Using the m4 processor for pcb footprints\n")
diff --git a/utils/src/gsch2pcb.c b/utils/src/gsch2pcb.c
index e543027..9f8dc42 100644
--- a/utils/src/gsch2pcb.c
+++ b/utils/src/gsch2pcb.c
@@ -99,9 +99,9 @@ create_m4_override_file ()
     return;
   }
   if (m4_pcbdir)
-    fprintf (f, "(define m4-pcbdir \"%s\")\n", m4_pcbdir);
+    fprintf (f, "(define gsch2pcb:pcb-m4-dir \"%s\")\n", m4_pcbdir);
   if (m4_files)
-    fprintf (f, "(define m4-files \"%s\")\n", m4_files);
+    fprintf (f, "(define gsch2pcb:m4-files \"%s\")\n", m4_files);
   fprintf (f, "(define gsch2pcb:use-m4 %s)\n", use_m4 == TRUE ? "#t" : "#f");
 
   fclose (f);
@@ -109,9 +109,9 @@ create_m4_override_file ()
     printf ("Default m4-pcbdir: %s\n", default_m4_pcbdir);
     printf ("--------\ngnet-gsch2pcb-tmp.scm override file:\n");
     if (m4_pcbdir)
-      printf ("    (define m4-pcbdir \"%s\")\n", m4_pcbdir);
+      printf ("    (define gsch2pcb:pcb-m4-dir \"%s\")\n", m4_pcbdir);
     if (m4_files)
-      printf ("    (define m4-files \"%s\")\n", m4_files);
+      printf ("    (define gsch2pcb:m4-files \"%s\")\n", m4_files);
     printf ("    (define gsch2pcb:use-m4 %s)\n", use_m4 == TRUE ? "#t" : "#f");
   }
 }




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs