+todos:
+ -@for file in $(ALLFILES:Makefile=); do grep -H TODO $$file; done; true
+
+fixmes:
+ -@for file in $(ALLFILES:Makefile=); do grep -H FIXME $$file; done; true
+
+find:
+ @find functions/ includes/ internals/ platform/ -name "*\.[ch]" -type f | xargs grep $$FIND
+
+links: $(BUILD)
+ @echo "Linking platform/$(PLATFORM)..."
+ @for dir in $$(find functions includes internals -type d); do mkdir -p $(BUILD)/$$dir; done
+ @for file in $$(find platform/$(PLATFORM) -mindepth 2 -type f ! -path *.svn* -printf "%P\n"); do if [ ! -f $(BUILD)/$$file ]; then ln -s $$(dirname $$file | sed "s@[^/]*@..@g")/../platform/$(PLATFORM)/$$file $(BUILD)/$$file; fi; done
+ @for super in $(PROJDIRS); do for file in $$(find $$super -type f ! -path *.svn* -printf "%P\n"); do if [ ! -f $(BUILD)/$$super/$$file ]; then ln -s $$(echo $$file | sed "s@[^/]*@..@g")/../$$super/$$file $(BUILD)/$$super/$$file; fi; done; done
+ if [ -f platform/$(PLATFORM)/include-exclude ]; then for ex in `cat platform/$(PLATFORM)/include-exclude`; do echo exclude $$ex; rm -f $(BUILD)/includes/$$ex; done; fi; true
+
+unlink: $(BUILD)
+ @echo "Unlinking platform files..."
+ @for dir in $(PROJDIRS); do find $(BUILD)/$$dir -type l -exec rm {} +; done
+
+help:
+ @echo "Available make targets:"
+ @echo
+ @echo "all - build $(PDCLIB)"
+ @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))"
+ @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 [...])."
+