Add automated link checking script to the Maintenance script makefile.
[pub/USBasp.git] / Maintenance / makefile
index 7bc8cc1..5cce2bf 100644 (file)
@@ -6,12 +6,14 @@
 #           www.lufa-lib.org\r
 #\r
 \r
-# Maintenance scripts not required by general LUFA users, used for development.\r
+# Maintenance scripts not required by general LUFA users, used for project development purposes.\r
 \r
 LUFA_ROOT = ../\r
 \r
 all:\r
 \r
+\r
+# Update all Doxygen configuration files to the latest Doxygen version - force Markdown support to be disabled\r
 upgrade-doxygen:\r
        @echo Upgrading Doxygen.conf files...\r
        @for doxygen_conf in `find $(LUFA_ROOT) -name Doxygen.conf`; do \\r
@@ -20,8 +22,9 @@ upgrade-doxygen:
          mv -u $$doxygen_conf.new $$doxygen_conf; \\r
        done;\r
        @echo Doxygen configuration update complete.\r
-       \r
-check-release:\r
+\r
+# Check the working branch documentation, ensure no placeholder values\r
+check-documentation-placeholders:\r
        @echo Checking for release suitability...\r
        @if ( grep "XXXXXX" $(LUFA_ROOT)/LUFA/DoxygenPages/*.txt > /dev/null ;); then \\r
          echo "  ERROR: Doxygen documentation has not been updated for release!"; \\r
@@ -32,3 +35,19 @@ check-release:
          exit 1; \\r
        fi;\r
        @echo Done.\r
+\r
+# Test all generated documentation for any bad links\r
+check-documentation-links:\r
+       @for html_file in `find $(LUFA_ROOT) -name *.html`; do \\r
+               echo Checking $$html_file...; \\r
+               cat $$html_file | grep -v "doxygen.org" | grep -v "fourwalledcubicle.com" | wget -nv --referer=www.lufa-lib.org --user-agent="lufa-link-check-script" -B $(dir $$html_file) --spider --force-html --input-file=-; \\r
+       done;\r
+\r
+# Validate the working branch - compile all documentation, demos/projects/examples and run build tests\r
+validate-branch:\r
+       make -s -C $(LUFA_ROOT) doxygen\r
+       make -s -C $(LUFA_ROOT) all     \r
+       make -s -C $(LUFA_ROOT)/BuildTests all\r
+\r
+# Validate the working branch for general release, check for placeholder documentation then build and test everything\r
+validate-release: check-documentation-placeholders validate-branch\r