On Monday 03 January 2011 07.19:46 Dan White wrote: > gnetlist: makedepend backend > SF: 3150021 > Gnetlist backend to determine a schematic's dependencies. Output > is in the form of: > > source.sch: depend1.sch depend2.sch > source.cir: source.sch depend1.cir depend2.cir other.inc > > ...written to "source.d" file for inclusion into a project's > Makefile. > > First line collects all source= attributes in the input pages. Second > line lists transformed source='s/sch/cir/' and file= attributes > (.include files). I think that the symbols should also be included in this file. I use a weird combination of grep, cut, sort, uniq, awk, tr and sed to do this, but a backend would be much nicer. I also use tragesym, so the depends on symbols relies either on *.sym (handdrawn symbol) or a *.sym generated out of a *.csv (tragesym source). A few suggestions: - There should be an attribute to set the directory which hold the symbols and subsheets. - There should be an option so that the backend includes only the symbols it founds in a directory, perhaps under another pattern and directory too, like "/.sym$/.csv/" (regex would be nice, or at least a simple extension matching), so that gEDA stock symbols aren't included. Below is the Makefile snippet I use: %.sch.d: %.sch ${ECHO} -n "$< $(<:%.sch=%.ps) $(<:%.sch=%_c.ps) $(<:%.sch=%.net): " >$@ && \ for SYM in $$(grep "C " $^ | cut -d " " -f 7 | sort | uniq | awk 'BEGIN {print}{print "${SYM_SYM_DIR}/"$$0}' | tr '\n' ' ') ; do \ if [ -f "$$(echo -n $$SYM | sed -e 's/\.sym$$/\.csv/' -e 's,^${SYM_SYM_DIR},${SYM_SRC_DIR},')" -o -f "$$SYM" ]; then \ ${ECHO} -n " $$SYM"; \ fi ; \ done >>$@ && \ ${ECHO} >>$@ && \ ${ECHO} >>$@ && \ ${ECHO} "$@: $<" >>$@ && \ ${ECHO} >>$@ -- mit freundlichem Gruss Christian Riggenbach
Attachment:
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ geda-user mailing list geda-user@xxxxxxxxxxxxxx http://www.seul.org/cgi-bin/mailman/listinfo/geda-user