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

gEDA-cvs: CVS update: Makefile.am



  User: danmc   
  Date: 07/02/08 19:24:08

  Modified:    .        Makefile.am gnet-gsch2pcb.scm.in
  Log:
  1)  add a new option to gsch2pcb "use-m4" for the project file or "--use-m4" for the
  
  command line.  By default now, gsch2pcb will not try to run m4 at all.  If you want
  
  the old behaviour of running m4, you'll have to use this option.  It seems that this
  
  is what most users want (no m4 involved at run time).
  
  
  
  2) rather than hard coding a number of paths like /usr/X11R6/lib and /usr/local/share
  
  into the code for places to look for PCB footprints, use a single default directory
  
  which is based on ${datadir}.  If the user wants to, they can override that with
  
  --with-pcb-datadir=/opt/pcb-20070204/share for example.
  
  
  
  3)  when searching for newlib footprints with, for example, a name like
  
  footprint=MY1206, match either "MY1206" or "MY1206.fp" so we can start having extensions
  
  on footprint files without needing to explicitly add the ".fp" part in the footprint=
  
  attribute.  All of the footprints in the pcb distribution which came from the m4
  
  libraries have .fp extensions now.
  
  
  
  4)  add some example schematic files in the gsch2pcb example directory
  
  
  
  
  Revision  Changes    Path
  1.27      +2 -2      eda/geda/gaf/gnetlist/scheme/Makefile.am
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Makefile.am
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/scheme/Makefile.am,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -b -r1.26 -r1.27
  --- Makefile.am	25 Aug 2006 01:00:06 -0000	1.26
  +++ Makefile.am	9 Feb 2007 00:24:07 -0000	1.27
  @@ -1,4 +1,4 @@
  -## $Id: Makefile.am,v 1.26 2006/08/25 01:00:06 ahvezda Exp $
  +## $Id: Makefile.am,v 1.27 2007/02/09 00:24:07 danmc Exp $
   ##
   
   M4=		@M4@
  @@ -43,7 +43,7 @@
   		$(srcdir)/gnet-gsch2pcb.scm.in > $@
   
   MOSTLYCLEANFILES = *.log *~
  -CLEANFILES = *.log *~
  +CLEANFILES = *.log *~ gnet-PCBboard.scm gnet-gsch2pcb.scm
   DISTCLEANFILES = *.log core FILE *~ prototype.bak \
   	         gnet-PCBboard.scm gnet-gsch2pcb.scm
   MAINTAINERCLEANFILES = *.log *~ Makefile.in configure \
  
  
  
  1.4       +39 -17    eda/geda/gaf/gnetlist/scheme/gnet-gsch2pcb.scm.in
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: gnet-gsch2pcb.scm.in
  ===================================================================
  RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/scheme/gnet-gsch2pcb.scm.in,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- gnet-gsch2pcb.scm.in	7 Sep 2006 17:38:11 -0000	1.3
  +++ gnet-gsch2pcb.scm.in	9 Feb 2007 00:24:07 -0000	1.4
  @@ -1,4 +1,5 @@
  -;;; $Id: gnet-gsch2pcb.scm.in,v 1.3 2006/09/07 17:38:11 sdb Exp $
  +;;; -*-scheme-*-
  +;;; $Id: gnet-gsch2pcb.scm.in,v 1.4 2007/02/09 00:24:07 danmc Exp $
   ;;;
   
   ;;; gEDA - GNU Electronic Design Automation
  @@ -101,16 +102,20 @@
           (let* ((refdes (car ls))
                  (value (gnetlist:get-package-attribute refdes "value"))
                  (footprint (split-to-list 
  -                          (gnetlist:get-package-attribute refdes  "footprint") ) ) )
  +                          (gnetlist:get-package-attribute refdes  "footprint") ) ) 
  +	       (lquote (if gsch2pcb:use-m4 "`" ""))
  +	       (rquote (if gsch2pcb:use-m4 "'" ""))
  +
  +	       )
   
                  (display (string-append "PKG_" (car footprint)) pipe)
  -               (display (string-append "(`" (car footprint)) pipe)
  +               (display (string-append "(" lquote (car footprint)) pipe)
                  (display (list-join-with-prefixes (cdr footprint) "-") pipe)
  -               (display (string-append "',`" refdes "',`") pipe)
  +               (display (string-append rquote "," lquote refdes rquote "," lquote ) pipe)
   
                  (display value pipe)
  -               (display (list-join-with-prefixes (cdr footprint) "',`") pipe)
  -               (display "')" pipe)
  +               (display (list-join-with-prefixes (cdr footprint) (string-append rquote "," lquote)) pipe)
  +               (display (string-append rquote ")") pipe)
                  (newline pipe)
                  (gsch2pcb:write-value-footprint pipe (cdr ls))) )))
   
  @@ -121,6 +126,7 @@
   (define m4-pcbdir "@pcbm4dir@")
   (define m4-pcbconfdir "@pcbconfdir@")
   (define m4-files "")
  +(define gsch2pcb:use-m4 #f)
   
   ;; To emulate popen. Guileish again.
   ; Needed after guile ver. 1.3.2. To save 1.3a users, wrap it in.
  @@ -130,19 +136,35 @@
   (define (gsch2pcb output-filename)
     (let ((port (open-output-file output-filename)))
       (gsch2pcb:write-top-header port)
  -       (close-port port))
  +    (close-port port)
  +    )
  +
  +  ;; 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 (string-append
   			m4-command " -d -I. -I" m4-pcbdir " "
   			" -I " m4-pcbconfdir " -I$HOME/.pcb -I. "
   			m4-pcbdir "/common.m4 " m4-files " - >> "
  -			output-filename))))
  -
  +				     output-filename)))
  +	    )
   
  +	(display "Using the m4 processor for pcb footprints\n")
   		;; packages is a list with the different refdes value
   		(gsch2pcb:write-value-footprint pipe packages)
  -		(close-pipe pipe))
  +	(close-pipe pipe)
  +	)
  +      
  +      (let ((port  (open output-filename (logior O_WRONLY O_APPEND))))
  +	(display "Skipping the m4 processor for pcb footprints\n")
  +	(gsch2pcb:write-value-footprint port packages)
  +	(close-port port)
  +	)
  +      )
  +
     (let ((port (open output-filename (logior O_WRONLY O_APPEND))))
       (gsch2pcb:write-bottom-footer port)
  -       close-port port))
  +    close-port port)
  +  )
   
  
  
  


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