# Edit INSTALLDIR to indicate the location where you'd like the new Sybase
# files installed.  By default, INSTALLDIR is the same as the original Sybase
# documentation directory.
#
# If you'd like to keep the original Sybase directory intact, change the
# value of INSTALLDIR and use "make installdir" to create and populate that
# directory with the necessary files.
#
INSTALLDIR	= /dbrenner/TestSybase
#
# Don't change SYBASEDIR unless you've moved the original Sybase documentation.
#
SYBASEDIR	= /NextLibrary/Documentation/Sybase

help:
		@echo 'This Makefile is intended to help update the Sybase'
		@echo 'documentation directory so the User and Administration'
		@echo 'guides may be printed.'
		@echo ''
		@echo 'This Makefile is currently configured to install the'
		@echo 'changes into the directory:'
		@echo ''
		@echo '   '$(INSTALLDIR)
		@echo ''
		@echo 'If the above directory is not where you wish to install'
		@echo 'these changes, edit the Makefile to indicate where you'
		@echo 'would like a copy of the Sybase Documentation created.'
		@echo '"make installdir" will then copy the necessary Sybase'
		@echo 'files into that directory.'
		@echo ''
		@echo 'When the installation directory is in place (be it the'
		@echo 'the default directory or one you created with "make'
		@echo 'installdir") you will need to use "make install" to
		@echo 'move the new files into place."

installdir:	$(SYBASEDIR)
		-mkdir $(INSTALLDIR)
		cp -r $(SYBASEDIR)/SAG $(INSTALLDIR)/SAG
		cp -r $(SYBASEDIR)/SQLUG $(INSTALLDIR)/SQLUG
		cp -r $(SYBASEDIR)/Appendices $(INSTALLDIR)/Appendices
		chmod -R u+rw $(INSTALLDIR)
		@echo ''
		@echo 'Use "make install" to move the new files into place.'

install:	$(INSTALLDIR) \
		Makefile.SAG Makefile.SQLUG tmac.syb disclaimer titpage.sqlug
		cp tmac.syb $(INSTALLDIR)
		cp Makefile.SAG $(INSTALLDIR)/SAG/Makefile
		cp Makefile.SQLUG $(INSTALLDIR)/SQLUG/Makefile
		cp disclaimer $(INSTALLDIR)/SAG
		cp disclaimer $(INSTALLDIR)/SQLUG
		cp titpage.sqlug $(INSTALLDIR)/SQLUG

$(INSTALLDIR):
		@echo 'Use "make installdir" to create the directory were'
		@echo 'you''d like the new Sybase documentation installed.'
		@echo ''
		@echo 'The install directory is currently set to:'
		@echo ''
		@echo '   '$(INSTALLDIR)
