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

Re: gEDA-user: PCB: Converting M4 to new Footprint?



The main portion of the script was taken from the
"Troubleshooting Old Style Libraries" section of 
the pcb.html that should be in the doc subdirectory
of your PCB installation.

If you change the line 

  PCB_M4_DIR=/local/pub/pcb-20040215/share/pcb/m4

to reflect your M4 path the script should run in any 
directory.

The double quotes ensure that a string is passed
to the echo command. The awk command line just removes
blank lines.

If you run this script and get a line that only
contains the string that was piped to m4 it usually
means that the package name you were looking
for was not found. If this happens look in the files
that common.m4 includes.

Check the "Library Creation" section of pcb.html for
more information.

(* jcl *)



--- Shahab Sanjari <sanjari@hrz.tu-darmstadt.de>
wrote:

> 
> I got the idea.
> I typed the second line (the one with m4) manually
> and one package
> definition out of geda.inc into STDIN and got
> perfect results. But the
> script returns to prompt without anything on the
> sreen.
> 
> In the M4 directory, the package definitions are
> written with single
> quotes, but in the script you use double quotes,
> could this be a problem?
> 
> Does the last line with AWK replace the first three
> "$" fields of the
> package definition with proper names? I am still not
> used to %$&§@%
> language!!! :-)
> 
> should I be in the M4 directory as I run the script?
> 
> Thanks,
> Shahab.
> 
> --------
> Shahab Sanjari  (sanjariathrzdottu-darmstadtdotde)
> 
> 
> 
> 
> On Wed, 22 Sep 2004, John Luciani wrote:
> 
> > I made a mistake in the cut-in-paste in my
> previous
> > email.  The following script will output the
> packages.
> > Just change PCB_M4_DIR to your m4 directory.
> >
> > #!/bin/bash
> >
> > PCB_M4_DIR=/local/pub/pcb-20040215/share/pcb/m4
> >
> > for package in $@
> > do
> > echo "PKG_$package(\"\", \"\", \"\")" | \
> >    m4 -I$PCB_M4_DIR common.m4 - | \
> >    awk '/^[ \t]*$/ {next} {print}' | \
> >    more
> > done
> >
> >
> > --- John Luciani <jcljr58@yahoo.com> wrote:
> >
> > > To retrieve a package:
> > >
> > > echo "PKG_$package(\"\", \"\", \"\")" | \
> > >    m4 -IPCB_M4_DIR  common.m4 - | \
> > >    awk '/^[ \t]*$/ {next} {print}' | \
> > >
> > > where PCB_M4_DIR is the directory containing the
> PCB
> > > M4 files.
> > >
> > > After you create the file move it to your
> > > "production"
> > > directory.
> > >
> > > To get gsch2pcb to find your "production"
> packages
> > > use
> > > the --elements-dir switch. For example:
> > >
> > > gsch2pcb --elements-dir PRODUCTION_DIR
> > > SCHEMATIC_NAME
> > >
> > > (* jcl *)
> > >
> > > --- Shahab Sanjari <sanjari@hrz.tu-darmstadt.de>
> > > wrote:
> > >
> > > >
> > > > Dear list,
> > > > In the production process, it is always good
> to
> > > know
> > > > which footprints are
> > > > tested, so that they could be used wihtout
> futher
> > > > considerations in the
> > > > future projects. This results in company
> specific
> > > > symbol and footprint
> > > > libraries, which could also represent the
> > > company's
> > > > repository managed
> > > > with a database and scripts that read special
> > > fields
> > > > out of the schematic
> > > > files and do automated booking, ordering, etc.
> of
> > > > parts.
> > > >
> > > > With gschem, I managed a small directory where
> I
> > > put
> > > > the parts that I
> > > > often use in my designs. I would like to do
> the
> > > same
> > > > thing with PCB
> > > > footprints.
> > > >
> > > > How can I extract a specific M4
> library-element
> > > from
> > > > say "~geda" library
> > > > ( e.g. 0805) and put it in a single file e.g.
> > > > my_0805 in the directory of
> > > > my designs?
> > > >
> > > > Many thanks,
> > > > Shahab.
> > > >
> > > > --------
> > > > Shahab Sanjari 
> (sanjariathrzdottu-darmstadtdotde)
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > Yahoo! Mail is new and improved - Check it out!
> > > http://promotions.yahoo.com/new_mail
> > >
> >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > New and Improved Yahoo! Mail - Send 10MB messages!
> > http://promotions.yahoo.com/new_mail
> >
> 
> 



		
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com