comparison ifctf-part-lib/m4-fp/common.m4 @ 0:cd92449fdb51

initial import of ueda and ifctf-part-lib from ifctfvax CVS
author Space Falcon <falcon@ivan.Harhan.ORG>
date Mon, 20 Jul 2015 00:24:37 +0000
parents
children fd5de6e22f08
comparison
equal deleted inserted replaced
-1:000000000000 0:cd92449fdb51
1 divert(-1)
2 #
3 # COPYRIGHT
4 #
5 # PCB, interactive printed circuit board design
6 # Copyright (C) 1994,1995,1996 Thomas Nau
7 #
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2 of the License, or
11 # (at your option) any later version.
12 #
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #
22 # Contact addresses for paper mail and Email:
23 # Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
24 # Thomas.Nau@rz.uni-ulm.de
25 #
26 # RCS: $Id: common.m4,v 1.9 2012/11/07 19:02:52 msokolov Exp $
27 #
28 # common defines for packages
29 #
30 # -------------------------------------------------------------------
31 # create a single object
32 # $1: mask name
33 # $2: 'value' of the new object
34 # $3: package of the circuit
35 #
36 define(`CreateObject',
37 `ifdef(`PinList_$1', `DefinePinList(PinList_$1)')'
38 `PKG_$3(`Description_$1', ,``$2'', Param1_$1, Param2_$1)'
39 )
40
41 # this one is used to show the correct value for the footprint attribute
42 # in a gschem (www.geda.seul.org) schematic. See QueryLibrary.sh
43 define(`QueryObject',
44 `ifdef(`PinList_$1', `DefinePinList(PinList_$1)')'
45 `$3 ifdef(`Param1_$1', `Param1_$1') ifdef(`Param2_$1', `Param2_$1')'
46 )
47
48 # -------------------------------------------------------------------
49 # define for-loops like the manual tells us
50 #
51 define(`forloop',
52 `define(`$1', `$2')_forloop(`$1', `$2', `$3', `$4')')
53 define(`_forloop',
54 `$4`'ifelse($1, `$3', ,
55 `define(`$1', incr($1))_forloop(`$1', `$2', `$3', `$4')')')
56
57 # version with step control added by Michael Spacefalcon
58 define(`forloop2',
59 `define(`$1', `$2')_forloop2(`$1', `$2', `$3', `$4', `$5')')
60 define(`_forloop2',
61 `$5`'ifelse($1, `$3', ,
62 `define(`$1', eval($1 + $4))_forloop2(`$1', `$2', `$3', `$4', `$5')')')
63
64 # -------------------------------------------------------------------
65 # the following definitions evaluate the list of pin-names
66 # missing names will be defined as 'P_#'
67 #
68 # the first two arguments are skipped
69 #
70 define(`PIN', `Pin($1 $2 $3 $4 ifdef(`P_$5', "P_$5", "$5") ifelse($5, 1, 0x101, 0x01))')
71 define(`PAD', `Pad($1 $2 $3 $4 $5 ifdef(`P_$6', "P_$6", "$6") ifelse($6, 1, 0x00, 0x100))')
72
73 define(`EDGECONN', `Pad($1 $2 $3 $4 $5 ifdef(`P_$6', "P_$6", "$6") "$6" $7)')
74
75 # This stuff won't work with dmr m4
76 #define(`DEFPIN', `define(`count', incr(count))' `define(`P_'count, $1)')
77 #define(`DefinePinList', `ifelse($#, 1, ,
78 # `pushdef(`count')'
79 # `define(`count', 0)'
80 # `_DEFPINLIST($@)'
81 # `popdef(`count')')')
82 #define(`_DEFPINLIST', `ifelse($#, 0, , $#, 1, `DEFPIN(`$1')',
83 # `DEFPIN(`$1')'`
84 # _DEFPINLIST(shift($@))')')
85 #
86 #define(`args',`
87 # ifelse($#, 0, , $#, 1,`define(`arg'cnt,`$1')',
88 # `define(`arg'cnt,`$1') define(`cnt',incr(cnt)) args(shift($@))')')
89
90 include(amp.inc)
91 include(amphenol.inc)
92 include(bga.inc)
93 include(bourns.inc)
94 include(bre.inc)
95 include(btb.inc)
96 include(connector.inc)
97 include(cts.inc)
98 include(dil.inc)
99 include(dpr.inc)
100 include(geda.inc)
101 include(hirose.inc)
102 include(johnstech.inc)
103 include(midcom.inc)
104 include(minicircuits.inc)
105 include(misc.inc)
106 include(panasonic.inc)
107 # pci.inc uses stuff that won't work with dmr m4
108 #include(pci.inc)
109 include(plcc.inc)
110 include(qfn.inc)
111 include(qfp.inc)
112 include(qfp2.inc)
113 include(qfpdj.inc)
114 include(resistor_adjust.inc)
115 include(rules.inc)
116 include(smt.inc)
117 include(smtosc.inc)
118 include(to.inc)
119 include(zif.inc)
120
121 # if any of these files exist, then include them.
122 # this makes it a bit easier to configure pcb without
123 # mucking with app-defaults every time you launch it
124 sinclude(site-config.inc)
125 sinclude(user-config.inc)
126 sinclude(proj-config.inc)
127
128 divert(0)dnl