Auto-generate gafrc, attribs and project files if needed
authorKeith Packard <keithp@keithp.com>
Thu, 29 Oct 2015 01:10:20 +0000 (10:10 +0900)
committerKeith Packard <keithp@keithp.com>
Thu, 29 Oct 2015 01:10:20 +0000 (10:10 +0900)
This makes sure these files exist with reasonable default content.

Signed-off-by: Keith Packard <keithp@keithp.com>
pcb.mk

diff --git a/pcb.mk b/pcb.mk
index 5d277a8a005118108d45e67c84974bf896f1c778..14d8419a97e0a6b6503c81b8babd5c0638398add 100644 (file)
--- a/pcb.mk
+++ b/pcb.mk
@@ -166,3 +166,17 @@ $(PROJECT)-big.pdf:        $(PROJECT)-big.ps
        ps2pdf $(PROJECT)-big.ps
 
 pdf:   $(PROJECT)-sch.pdf $(PROJECT)-pcb.pdf $(PROJECT)-big.pdf
+
+project:
+       (echo 'schematics $(SCHEMATICS)'; \
+        echo 'output-name $(PROJECT)'; \
+        echo 'elements-dir $(AM)/packages'; \
+        echo 'skip-m4') > $@
+
+attribs: $(AM)/attribs
+       cp $(AM)/attribs $@
+
+gafrc:
+       (echo '; empty the library path and populate it with only our own symbols'; \
+        echo '(reset-component-library)'; \
+        echo '(load "../altusmetrum/gafrc")') > $@