# lmkfile for building the support disk V:disk/support
#
# The process involves copying over the autodocs, fd files, link libraries,
# and includes.  The includes are processed via fixheader.

VERSION=40
INCDIRS=clib datatypes devices diskfont dos exec gadgets graphics hardware \
	 intuition libraries prefs resources rexx utility workbench

TOOLS=V$(VERSION):aug/bin/CatComp V$(VERSION):aug/doc/CatComp.doc \
	V$(VERSION):aug/bin/rekick \
	V$(VERSION):aug/src/enforcer/Enforcer.lha \
	V$(VERSION):aug/src/wack/wack.lha

# This would be for V37
# VERSION=37
# INCDIRS=clib devices dos exec graphics hardware \
#	 intuition libraries resources rexx utility workbench

# This would be for V38
# VERSION=38
# INCDIRS=clib devices diskfont dos exec graphics hardware \
#	 intuition libraries prefs resources rexx utility workbench

# This would be for V39
# VERSION=39
# INCDIRS=clib datatypes devices diskfont dos exec gadgets graphics hardware \
#	 intuition libraries prefs resources rexx utility workbench


all:
	bumprev $(VERSION) support_rev
# I'm having trouble deleting support.temp if it exists, and doing nothing
# if not.  This ugly trio of lines does the job.
	@echo "foo" >V$(VERSION):disk/supportXtemp
	@delete V$(VERSION):disk/support?temp all force quiet
	makedir V$(VERSION):disk/support.temp

	execute BuildIncludes $(VERSION) support "$(INCDIRS)"

	@echo "Copying fd files..."
	makedir V$(VERSION):disk/support.temp/fd
	copy V$(VERSION):fd/\#? V$(VERSION):disk/support.temp/fd

	@echo "Copying autodocs..."
	makedir V$(VERSION):disk/support.temp/doc
	copy V$(VERSION):doc/\#?.doc V$(VERSION):disk/support.temp/doc

	@echo "Copying linked libraries..."
	makedir V$(VERSION):disk/support.temp/linker_libs
	copy V$(VERSION):lib/amiga.lib V$(VERSION):disk/support.temp/linker_libs
	copy V$(VERSION):lib/small.lib V$(VERSION):disk/support.temp/linker_libs
	copy V$(VERSION):lib/debug.lib V$(VERSION):disk/support.temp/linker_libs
	copy V$(VERSION):lib/ddebug.lib V$(VERSION):disk/support.temp/linker_libs

	@echo "Copying example code..."
	makedir V$(VERSION):disk/support.temp/examples
	copy V$(VERSION):src/examples/\#? V$(VERSION):disk/support.temp/examples all nopro

	@echo "Copying tools..."
	copy $(TOOLS) V$(VERSION):disk/support.temp/tools all nopro
	echo "Support Materials $(VERSION).`type support_rev.rev`" >V$(VERSION):disk/support.temp/Version
	date >>V$(VERSION):disk/support.temp/Version

	rename V$(VERSION):disk/support V$(VERSION):disk/support.old
	rename V$(VERSION):disk/support.temp V$(VERSION):disk/support
	delete V$(VERSION):disk/support.old all force quiet

	@echo "*N --> Built support materials $(VERSION)." NOLINE
	@type support_rev.rev
