--- /dev/null
+#!/bin/bash\r
+\r
+# Run astyle on the code base ready for release\r
+\r
+# If astyle doesn't exist, exit the script and do nothing\r
+which astyle > /dev/null\r
+RET=$?\r
+if [ $RET -ne 0 ]; then\r
+ echo "Could not find astyle - aborting."\r
+ exit\r
+fi\r
+\r
+\r
+RET=`astyle --version 2>&1`\r
+if [ "$RET" != "Artistic Style Version 1.23" ]; then\r
+ echo "Only 1.23 astyle version is 'allowed'"\r
+ exit\r
+fi\r
+\r
+# Find all "pure" C files in the codebase\r
+# - not .in.c used for .sql generation\r
+# - not lex.yy.c or wktparse.tab.c as these are generated files\r
+CFILES=`find . -name '*.c' -not \( -name '*_parse.c' -o -name '*_lex.c' \)`\r
+\r
+# Run the standard format on the files, and do not\r
+# leave .orig files around for altered files.\r
+astyle --style=ansi --indent=tab --suffix=none $CFILES\r
-P figure.warning="${PWD}/html/images/warning" \
-P figure.caution="${PWD}/html/images/caution" \
-P latex.output.revhistory=0 \
+ -s texstyle \
-o postgis-${POSTGIS_MAJOR_VERSION}.${POSTGIS_MINOR_VERSION}.${POSTGIS_MICRO_VERSION}$(DOCSUFFIX).pdf $<; \
fi