aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchrysn2012-10-23 01:59:41 +0200
committerchrysn2012-10-23 01:59:41 +0200
commitf594af86c8515889565bbc17d13e16d8f56eea9f (patch)
tree62eb125171663043053897bde2fc01a0ad837f45
parentefce73f815ddbfb5f06fc45d34e6fe62b014d8e4 (diff)
fixes for generated header cleanup
* make target phony * don't complain about missing files
-rw-r--r--Makefile2
-rwxr-xr-xscripts/irq2nvic_h6
2 files changed, 5 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index e68f4f5..a455a37 100644
--- a/Makefile
+++ b/Makefile
@@ -94,5 +94,5 @@ clean: cleanheaders
@printf " CLEAN doxygen\n"
$(Q)$(MAKE) -C doc clean
-.PHONY: build lib examples install doc clean generatedheaders
+.PHONY: build lib examples install doc clean generatedheaders cleanheaders
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]):