+todos:
+ -@for file in $(ALLFILES); do grep -H TODO $$file; done; true
+
+fixmes:
+ -@for file in $(ALLFILES); do grep -H FIXME $$file; done; true
+
+find:
+ @find functions/ includes/ internals/ platform/ -name "*\.[ch]" -type f | xargs grep $$FIND
+
+links:
+ @echo "Linking platform/$(PLATFORM)..."
+ @for file in $$(find platform/$(PLATFORM) -mindepth 2 -type f ! -path *.svn* -printf "%P\n"); do ln -s $$(dirname $$file | sed "s@[^/]*@..@g")/platform/$(PLATFORM)/$$file $$file; done
+
+unlink:
+ @echo "Unlinking platform files..."
+ @for dir in $(PROJDIRS); do find $$dir -type l -exec rm {} +; done
+
+help:
+ @echo "Available make targets:"
+ @echo
+ @echo "all - build pdclib.a"
+ @echo "clean - remove all object files, dependency files and test drivers"
+ @echo "srcdist - build pdclib.tgz (source tarball)"
+ @echo "test - test a single testdriver (Usage: FILE=\"test.[rt]\" make test)"
+ @echo "tests - build and run test drivers (link pdclib.a)"
+ @echo " testdrivers - build but do not run test drivers"
+ @echo "regtests - build and run regression test drivers (link system clib)"
+ @echo " regtestdrivers - build but do not run regression test drivers"
+ @echo "todos - list all TODO comments in the sources"
+ @echo "fixmes - list all FIXME comments in the sources"
+ @echo "find - find a phrase in the sources (Usage: FIND=\"phrase\" make find)"
+ @echo "links - link platform files (development only)"
+ @echo "unlink - remove links to platform files (development only)"
+ @echo "%.o - build an individual object file"
+ @echo "%.t - build an individual test driver"
+ @echo "%.r - build an individual regression test driver"
+ @echo "help - print this list"
+ @echo
+ @echo "Any additional compiler flags you want to use can be passed as USERFLAGS"
+ @echo "(Usage: USERFLAGS=\"flags\" make [...])."
+