From 1bb870222ad7f9ecc509cab9cd85a43dd22305b5 Mon Sep 17 00:00:00 2001 From: Peter TB Brett Date: Fri, 21 Jan 2011 15:35:59 +0000 Subject: [PATCH] gsch2pcb: Warn if footprint name contains '-'. Provide a warning if a footprint name contains a '-' character, since this is a very common reason for m4 to give up and fall over. This is a stop-gap measure; a proper fix would be nice. Affects-bug: lp-698806 --- gnetlist/scheme/gnet-gsch2pcb.scm.in | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/gnetlist/scheme/gnet-gsch2pcb.scm.in b/gnetlist/scheme/gnet-gsch2pcb.scm.in index afe0251..16d6963 100644 --- a/gnetlist/scheme/gnet-gsch2pcb.scm.in +++ b/gnetlist/scheme/gnet-gsch2pcb.scm.in @@ -104,6 +104,12 @@ (string-append prefix (car the-list) (gsch2pcb:list-join-with-prefixes (cdr the-list) prefix)))) +(define (gsch2pcb:warn-bad-footprint refdes footprint) + (if (string-index footprint #\-) + (format #t +"WARNING: ~A has a footprint attribute \"~A\" containing a \"-\" character.\n" + refdes footprint))) + (define gsch2pcb:write-value-footprint (lambda (pipe ls) @@ -118,6 +124,9 @@ ) + ; Check for problematic footprint names + (gsch2pcb:warn-bad-footprint refdes (car footprint)) + (display (string-append "PKG_" (car footprint)) pipe) (display (string-append "(" lquote (car footprint)) pipe) (display (gsch2pcb:list-join-with-prefixes (cdr footprint) "-") pipe) -- 1.7.0.2