From f594af86c8515889565bbc17d13e16d8f56eea9f Mon Sep 17 00:00:00 2001 From: chrysn Date: Tue, 23 Oct 2012 01:59:41 +0200 Subject: fixes for generated header cleanup * make target phony * don't complain about missing files --- scripts/irq2nvic_h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'scripts/irq2nvic_h') diff --git a/scripts/irq2nvic_h b/scripts/irq2nvic_h index cddbfc3..23e365d 100755 --- a/scripts/irq2nvic_h +++ b/scripts/irq2nvic_h @@ -142,8 +142,10 @@ def main(): vector_nvic_c = infile.replace('./include/libopencm3/', './lib/').replace('irq.yaml', 'vector_nvic.c') if remove: - os.unlink(nvic_h) - os.unlink(vector_nvic_c) + if os.path.exists(nvic_h): + os.unlink(nvic_h) + if os.path.exists(vector_nvic_c): + os.unlink(vector_nvic_c) sys.exit(0) if not needs_update([__file__, infile], [nvic_h, vector_nvic_c]): -- cgit v1.2.3