Date:2012-06-10 03:28:58 (7 years 5 months ago)
Author:Werner Almesberger
Commit:78640707f40f31f408f159ad88a585e47bb5b2c2
Message:components/: generate for connectors CONN_1 to CONN_40X2 (in gencon.lib)

This creates name collisions with manually created connectors in
con.lib, which we may want to resolve.
Files: components/EXPAND (1 diff)
components/Makefile (4 diffs)
components/components.pro (1 diff)
components/gencon.pl (1 diff)

Change Details

components/EXPAND
2727    Audio
2828        wm9707scft/v
2929Connector
30    Generated
31        conn_1
32        conn_2
33        conn_3
34        conn_4
35        conn_5
36        conn_6
37        conn_7
38        conn_8
39        conn_9
40        conn_10
41        conn_11
42        conn_12
43        conn_13
44        conn_14
45        conn_15
46        conn_16
47        conn_17
48        conn_18
49        conn_19
50        conn_20
51        conn_21
52        conn_22
53        conn_23
54        conn_24
55        conn_25
56        conn_26
57        conn_27
58        conn_28
59        conn_29
60        conn_30
61        conn_31
62        conn_32
63        conn_33
64        conn_34
65        conn_35
66        conn_36
67        conn_37
68        conn_38
69        conn_39
70        conn_40
71        conn_1x2
72        conn_2x2
73        conn_3x2
74        conn_4x2
75        conn_5x2
76        conn_6x2
77        conn_7x2
78        conn_8x2
79        conn_9x2
80        conn_10x2
81        conn_11x2
82        conn_12x2
83        conn_13x2
84        conn_14x2
85        conn_15x2
86        conn_16x2
87        conn_17x2
88        conn_18x2
89        conn_19x2
90        conn_20x2
91        conn_21x2
92        conn_22x2
93        conn_23x2
94        conn_24x2
95        conn_25x2
96        conn_26x2
97        conn_27x2
98        conn_28x2
99        conn_29x2
100        conn_30x2
101        conn_31x2
102        conn_32x2
103        conn_33x2
104        conn_34x2
105        conn_35x2
106        conn_36x2
107        conn_37x2
108        conn_38x2
109        conn_39x2
110        conn_40x2
30111    Generic
31112        TESTPOINT
32113        conn_2
components/Makefile
44# Note that we don't have the concept of a "library of everything" so far.
55#
66
7GEN = gencon.lib
8
79.PHONY: all sch catalog view upload missing clean spotless
810
911all: sch
...... 
1113# @echo "make what ? targets: sch loe"
1214# @exit 1
1315
14sch:
16sch: $(GEN)
1517        eeschema `pwd`/components.sch
1618
1719DESCR-dcm: *.dcm
1820        ../scripts/dcm2desc -L . >$@ || { rm -f $@; exit 1; }
1921
20catalog catalog.pdf: EXPAND DESCR-dcm *.lib
22catalog catalog.pdf: EXPAND DESCR-dcm *.lib $(GEN)
2123        genex -p -L . EXPAND DESCR-dcm >catalog.pdf || \
2224          { rm -f catalog.pdf; exit 1; }
2325
...... 
2729upload: catalog.pdf
2830        qippl catalog.pdf tmp/kicad-libs-components.pdf
2931
30missing:
32missing: $(GEN)
3133        ../scripts/missing-in-tree -L . EXPAND
3234
35%.lib: %.pl
36        ./$< >$@ || { rm -f $@; exit 1; }
37
3338#loe:
3439# ./mkloe
3540
...... 
3742        rm -f DESCR-dcm
3843
3944spotless: clean
40        rm -f catalog.pdf
45        rm -f catalog.pdf $(GEN)
components/components.pro
137137LibName66=./hole
138138LibName67=./diode
139139LibName68=./powered
140LibName69=./gencon
components/gencon.pl
1#!/usr/bin/perl
2#
3# gencon.pl - Generate generic connectors
4#
5# Copyright 2012 by Werner Almesberger
6#
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2 of the License, or
10# (at your option) any later version.
11#
12
13print "EESchema-LIBRARY Version 2.3 Date: `date`\n";
14print "#encoding utf-8\n";
15for ($x = 1; $x <= 40; $x++) {
16    for ($y = 1; $y <= 2; $y++) {
17        $name = "CONN_$x";
18        $name .= "X$y" if $y > 1;
19        print "#\n# $name\n#\n";
20        print "DEF $name CON 0 40 Y N 1 F N\n";
21        $h = $x/2*100;
22        print "F0 \"CON\" 0 ".($h+50)." 60 H V C CNN\n";
23        print "F1 \"$name\" 0 ".(-$h-50)." 60 H V C CNN\n";
24        print "DRAW\n";
25        print "S -100 -$h 100 $h 0 1 0 N\n";
26        $n = 1;
27        for ($px = 1; $px <= $x; $px++) {
28            for ($py = 1; $py <= $y; $py++) {
29                print "X $n $n ".(400*($py-1.5)*2)." ".
30                    ($h-$px*100+50)." 300 ".
31                    ("?", "R", "L")[$py]." 50 50 1 1 P\n";
32                $n++;
33            }
34        }
35        print "ENDDRAW\n";
36        print "ENDDEF\n";
37    }
38}
39print "#\n#End Library\n";

Archive Download the corresponding diff file

Branches:
master



interactive