Add automated link checking script to the Maintenance script makefile.
[pub/USBasp.git] / Maintenance / makefile
index d723078..5cce2bf 100644 (file)
@@ -6,7 +6,7 @@
 #           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
@@ -23,12 +23,6 @@ upgrade-doxygen:
        done;\r
        @echo Doxygen configuration update complete.\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
 # Check the working branch documentation, ensure no placeholder values\r
 check-documentation-placeholders:\r
        @echo Checking for release suitability...\r
@@ -42,5 +36,18 @@ check-documentation-placeholders:
        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
\ No newline at end of file
+validate-release: check-documentation-placeholders validate-branch\r