Add docs and check rules to build infrastructure.
[bertos.git] / rules.mk
index e395f053c31cabed468674357d1b3458f57b0d1a..9ffcfa7a59a88bba2a5f93d724665b8a040dfcea 100644 (file)
--- a/rules.mk
+++ b/rules.mk
@@ -61,6 +61,14 @@ endif
 docs:
        $Q $(DOXYGEN)
 
+# Generate ctags
+tags:
+       ctags -R --exclude=doc
+
+# Run testsuite
+check:
+       ./run_tests.sh
+
 define build_target
 
 ifneq ($$(strip $$($(1)_MCU)),)
@@ -217,8 +225,8 @@ $(foreach t,$(TRG),$(eval $(call build_target,$(t))))
 #       leading to puzzling linker errors.  Kill 'em and abort build.
 %_moc.cpp: %.h
        $(MOC) -o $@ $<
-       if [ -s $< ]; then \
-               rm $@; \
+       if [ -s $< ]; then \
+               rm -f $@; \
                exit 1; \
        fi