1
0
mirror of git://projects.qi-hardware.com/kicad-libs.git synced 2024-11-22 13:20:37 +02:00

modules/: "make brd" opens pcbnew for footprint examination

The profile is automatically generated from the list of modules.
This commit is contained in:
Werner Almesberger 2012-12-20 22:40:09 -03:00
parent 94f902495c
commit cce90811d9
3 changed files with 64 additions and 2 deletions

View File

@ -19,13 +19,20 @@ MODULES=8_10-card 8_10-socket-ra \
zx62-b-5pa zx62m-b-5p zx62-b-5pa zx62m-b-5p
.SUFFIXES: .fpd .mod .SUFFIXES: .fpd .mod
.PHONY: all catalog view upload missing clean spotless .PHONY: all brd catalog view upload missing clean spotless
all: $(MODULES:%=%.mod) all: $(MODULES:%=%.mod)
.fpd.mod: .fpd.mod:
fped -k $< $@ fped -k $< $@
modules.pro: Makefile
../scripts/modules-pro template.pro $(MODULES) >$@ || \
{ rm -f $@; exit 1; }
brd: all modules.pro
pcbnew `pwd`/modules.brd
catalog catalog.pdf: HIERARCHY $(MODULES:%=%.fpd) catalog catalog.pdf: HIERARCHY $(MODULES:%=%.fpd)
genkicat -F -p $(MODULES:%=-l %.fpd) HIERARCHY DESCR \ genkicat -F -p $(MODULES:%=-l %.fpd) HIERARCHY DESCR \
>catalog.pdf || \ >catalog.pdf || \
@ -45,4 +52,4 @@ clean:
spotless: clean spotless: clean
rm -f $(MODULES:%=%.mod) rm -f $(MODULES:%=%.mod)
rm -f modules.pro

22
modules/template.pro Normal file
View File

@ -0,0 +1,22 @@
update=Thu Dec 20 21:59:41 2012
last_client=pcbnew
[pcbnew]
version=1
LastNetListRead=
PadDrlX=320
PadDimH=600
PadDimV=600
BoardThickness=630
TxtPcbV=800
TxtPcbH=600
TxtModV=600
TxtModH=600
TxtModW=120
VEgarde=100
DrawLar=150
EdgeLar=150
TxtLar=120
MSegLar=150
[pcbnew/libraries]
LibDir=
LibName1=qfn

33
scripts/modules-pro Executable file
View File

@ -0,0 +1,33 @@
#!/bin/sh -e
#
# modules-pro - Merge template and list of libraries to a profile
#
# Copyright 2012 by Werner Almesberger
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
usage()
{
echo "usage: $0 template.pro module-basename ..." 1>&2
exit 1
}
scan_fped()
{
for n in "$@"; do
fped -k $n - | sed '/^\$MODULE /s///p;d' >>_tmp2
done
}
[ -r "$1" ] || usage
sed /LibName1/Q "$1"
shift
echo "$@" | tr ' ' '\012' | sort -f | awk '{ n++; print "LibName" n "=" $0 }'