5 all: for-pic panel3.pcb
7 o=>$@.new && mv -f $@.new $@
9 netlists: reversers.net detectors.net \
10 reversers.hole-rep detectors.hole-rep \
11 both.hole-rep panel3.hole-rep
13 # print from pcb(1) as follows:
14 # File / Print Layout / ...
15 # select media and offsets: A4
18 # (If `... exists, use anyway?', Sequence OK)
21 # make {reversers,detectors}.oprints{-l,-lpr}
22 # for f in *.oprint-*.ps; do gv -scale -1 -media A4 $f; done
25 OPRINTS= %.oprint-copper.ps \
27 %.pcb.output_frontsilk.ps \
30 %.hole-rep: %.pcb hole-report.pl
31 ./hole-report.pl <$< $o
33 include reversers.layers.dep
34 include detectors.layers.dep
35 include panel3.layers.dep
37 %.zip: layers.txt.tmpl Makefile
38 rm -rf $@.d; mkdir -p $@.d
39 set -e; exec <$<; cd $@.d; perl -pe ' \
40 m/^(\S+)\s+(\w+)\s+(\w+)\s+(\S.*)$$/ or die; \
41 system "cp ../$*.pcb.output_$$1.$$3 $$2.$$3"; \
43 $$_= sprintf "%-20s %s\n", "$$2.$$3", $$4; \
49 PANEL3_PCBS= reversers.pcb detectors.pcb detectors.pcb
51 panel3.pcb: pcb-panelise $(PANEL3_PCBS) Makefile
52 ./$< -g100 $(PANEL3_PCBS) $o
54 $*.zip: $*.pcb.output_$$1.$$2/ or die' \
57 GZIP=-9v tar zvcf $@.gz $*.pcb.output_*.ps
59 %.layers.dep: layers.txt.tmpl Makefile
61 's/^(\S+)\s+\w+\s+(\w+)\s.*/$*.zip: $*.pcb.output_$$1.$$2/ or die' \
64 both.hole-rep: hole-report.pl reversers.pcb detectors.pcb
70 %.oprints-l: $(OPRINTS) %.oprints Makefile
73 pcboprints: reversers.oprints-l detectors.oprints-l
75 %.oprints-lpr: %.oprints-l
76 set -ex; for f in `cat $^`; do lpr $$f; done
81 %.oprint-copper.ps: %.pcb.output_back.distilled.ps \
82 %.pcb.output_front.distilled.ps
85 pstops '2:0(-50mm,0mm)+1(50mm,0mm)' <$@-2.tmp $o
87 %.oprint-copper.ps: Makefile
89 %.oprint-assembly.ps: %.pcb.output_assembly.ps Makefile
90 pstops -pa4 '0@2(-109mm,-290mm)' <$< $o
93 sed -e '/^\#/d' <$< $o
95 %.net-info: %.net-spec netlist-expand
96 ./netlist-expand $< $o
98 %.net-spec: generate-netspec.pl
103 -rm -f *.hole-rep *.net *.net-info *.net-spec
104 -rm -f *.layers.dep panel3.pcb
106 .PRECIOUS: %.net-info %.net-spec
107 .PRECIOUS: $(OPRINTS)