#
# makefile for copying all of the help docs into this folder for 
# inclusion into the externals packages
#

DOC_DIR = .

all:
#----------------------------------------------------------------------------
# all standard objs' help files
	cp ../../OSCx/doc/*.pd \
			../../control/*/*.pd \
			../../signal/*/*.pd \
			../../aenv~/*.pd \
			../../ann/examples/*.* \
			../../arraysize/*.pd \
			../../beatpipe/*.pd \
			../../build/*.pd \
			../../bbogart/chaos/tools/*.pd \
			../../bbogart/*/*.pd \
			../../creb/doc/*.pd \
			../../creb/doc/examples/*.pd \
			../../cxc/reference/*.pd \
			../../dfx/*/*.pd \
			../../ext13/doc/*.pd \
			../../ggee/*/*.pd \
			../../gem2pdp/*.pd \
			../../ff/*.pd \
			../../hcs/*.pd \
			../../hcs/hid/*-help.pd \
			../../hcs/hid/ev*-list.pd \
			../../markex/*.pd \
			../../maxlib/help/*.* \
			../../mjlib/doc/*.pd \
			../../motex/*.pd \
			../../pdogg/*/*.pd \
			../../plugin~/*.pd \
			../../rhythm_estimator/*.p? \
			../../susloop~/*.pd \
			../../svf~/*.pd \
			../../vbap/*.pd \
			../../vst/*.pd \
			../../zhzxh~/*.pd \
			$(DOC_DIR)
#----------------------------------------------------------------------------
# [sprinkler]'s help file is generated by ./configure
	cd ../../sprinkler && autoconf && ./configure
	cp ../../sprinkler/sprinkler-help.pd $(DOC_DIR)
#----------------------------------------------------------------------------
# IEMlib uses its own dir and since its not maintained in CVS
# its best not to change the objects
	install -d -m0755 $(DOC_DIR)/iemhelp
	cp ../../iemlib/iemhelp/*.* $(DOC_DIR)/iemhelp
#----------------------------------------------------------------------------
# remove help files for objects that are not included due to conflicts, etc.
#
#  mjlib [prob] conflicts with cyclone's [prob]
	rm prob-help.pd
#  maxlib conflicts with cyclone
	rm help-split.pd
#----------------------------------------------------------------------------
# no need to have pd patches executable
	chmod a-x *.pd


#----------------------------------------------------------------------------
# this is mildly dangerous, since it just deletes everything
clean:
	rm -f *.pd *.ps *.txt test.som *~
	rm -Rf iemhelp