diff --git a/Makefile b/Makefile index a64f9e3c..32ff6660 100644 --- a/Makefile +++ b/Makefile @@ -72,19 +72,25 @@ pmix-standard.pdf: $(CHAPTERS) $(SOURCES) pmix.sty pmix-standard.tex figs/pmix-l FORCECHECK: -check: check-attr-ref check-openpmix check-decl +check: check-doc check-openpmix + +# Includes +# - make check-decl +# - make check-attr-ref +check-doc: pmix-standard.pdf FORCECHECK + @./bin/check-doc.sh check-attr-ref: pmix-standard.pdf FORCECHECK @echo "====> Checking for Attributes Declared, but not referenced" @./bin/check-attr-refs.py -check-openpmix: pmix-standard.pdf FORCECHECK - @echo "====> Checking cross-reference with OpenPMIx" - @./bin/check-openpmix.py - check-decl: pmix-standard.pdf FORCECHECK @echo "====> Checking for Multi-declared items" @./bin/check-multi-declare.py +check-openpmix: pmix-standard.pdf FORCECHECK + @echo "====> Checking cross-reference with OpenPMIx" + @./bin/check-openpmix.py + clean: rm -f $(INTERMEDIATE_FILES) pmix-standard-*.pdf diff --git a/bin/check-doc.sh b/bin/check-doc.sh index 036aa826..403de401 100755 --- a/bin/check-doc.sh +++ b/bin/check-doc.sh @@ -18,7 +18,7 @@ else fi # -# Check for Acronym used but not defined +# Check for missing cross references # echo "====> Checking Cross References" grep "Warning: Reference" pmix-standard.log | grep "undefined" @@ -41,6 +41,31 @@ else echo "====> Passed" fi +# +# Check for multiple declarations +# +echo "====> Checking Multiple Declarations" +./bin/check-multi-declare.py 2>/dev/null 1>/dev/null +if [ $? == 0 ] ; then + echo "====> Passed" +else + ./bin/check-multi-declare.py + echo "====> Error check references (above)" + FINAL_STATUS=$((FINAL_STATUS+1)) +fi + +# +# Check for attribute references +# +echo "====> Checking Attributes are both declared and referenced" +./bin/check-attr-refs.py 2>/dev/null 1>/dev/null +if [ $? == 0 ] ; then + echo "====> Passed" +else + ./bin/check-attr-refs.py + echo "====> Error check references (above)" + FINAL_STATUS=$((FINAL_STATUS+1)) +fi # # All done diff --git a/bin/check-multi-declare.py b/bin/check-multi-declare.py index eb777920..149c1dc0 100755 --- a/bin/check-multi-declare.py +++ b/bin/check-multi-declare.py @@ -34,9 +34,9 @@ all_ref_strs = ["attr", "const", "struct", "macro", "apifn"] for ref_str in all_ref_strs: if args.verbose is True: - print "-"*50 - print "Extracting Standard: \""+ref_str+"\"" - print "-"*50 + print("-"*50) + print("Extracting Standard: \""+ref_str+"\"") + print("-"*50) # subsection.A is Appendix A: Python Bindings p = subprocess.Popen("grep \"newlabel{"+ref_str+"\" pmix-standard.aux | grep -v subsection.A", @@ -133,8 +133,8 @@ print("Error: " + val + " declared " + str(std_apis[val]) + " times") return_count += 1 - print("-"*50) if return_count > 0: + print("-"*50) print("Found %d number of multiple declares" % (return_count)) else: print("Success. No multiple declares detected!")