/* ********************************************************************** *\
 *         Copyright IBM Corporation 1988,1991 - All Rights Reserved      *
 *        For full copyright information see:'andrew/config/COPYRITE'     *
\* ********************************************************************** */

/*
	$Disclaimer: 
*Permission to use, copy, modify, and distribute this software and its 
*documentation for any purpose is hereby granted without fee, 
*provided that the above copyright notice appear in all copies and that 
*both that copyright notice, this permission notice, and the following 
*disclaimer appear in supporting documentation, and that the names of 
*IBM, Carnegie Mellon University, and other copyright holders, not be 
*used in advertising or publicity pertaining to distribution of the software 
*without specific, written prior permission.
*
*IBM, CARNEGIE MELLON UNIVERSITY, AND THE OTHER COPYRIGHT HOLDERS 
*DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 
*ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.  IN NO EVENT 
*SHALL IBM, CARNEGIE MELLON UNIVERSITY, OR ANY OTHER COPYRIGHT HOLDER 
*BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY 
*DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 
*WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS 
*ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
*OF THIS SOFTWARE.
* $
*/

InstallFileToFile(../DISCLAIMER, $(INSTINCFLAGS), $(DESTDIR)/doc/DISCLAIMER)
InstallFileToFile(ImakeMacros.d, $(INSTINCFLAGS), $(DESTDIR)/doc/ImakeMacros.d)
InstallFileToFile(aconcat.h,${INSTINCFLAGS},${DESTDIR}/include/aconcat.h)
InstallFileToFile(andyenv.h,${INSTINCFLAGS},${DESTDIR}/include/andyenv.h)
InstallFileToFile(${SYSTEM_H_FILE},${INSTINCFLAGS},${DESTDIR}/include/system.h)
InstallFileToFile(andrewos.h,${INSTINCFLAGS},${DESTDIR}/include/andrewos.h)
InstallFileToFile(allsys.h,${INSTINCFLAGS},${DESTDIR}/include/allsys.h)
InstallFileToFile(site.h,${INSTINCFLAGS},${DESTDIR}/include/site.h)
InstallShScript(mkdirs, $(DESTDIR)/config)

install.time:: platform.tmp system.tmp
	@echo -n ''

platform.tmp: platform.tmpl
	@$(SED) -e 's;<.*/system\.mcr>;<system.mcr>;g' \
	-e 's;#define.*MacroIncludeFile.*;#define MacroIncludeFile system.mcr;g' \
	platform.tmpl > platform.tmp

system.tmp: MacroIncludeFile
	@$(SED) -e 's;<.*/system\.h>;<system.h>;g' \
	-e 's;SYSTEM_H_FILE =.*;SYSTEM_H_FILE = system.h;g' \
	MacroIncludeFile > system.tmp

install.time:: 
	(cd $(DESTDIR)/config; \
	${RM} andrewos.h andyenv.h system.h aconcat.h allsys.h site.h; \
	$(LN) ../include/andrewos.h andrewos.h; \
	$(LN) ../include/andyenv.h andyenv.h; \
	$(LN) ../include/system.h system.h; \
	$(LN) ../include/aconcat.h aconcat.h; \
	$(LN) ../include/allsys.h allsys.h; \
	$(LN) ../include/site.h site.h; )

InstallFileToFile(imake.tmpl, $(INSTINCFLAGS), $(DESTDIR)/config/imake.tmpl)
InstallFileToFile(platform.tmp, $(INSTINCFLAGS), $(DESTDIR)/config/platform.tmpl)
#if defined(hpux)
InstallFileToFile(hpx.series, $(INSTINCFLAGS), $(DESTDIR)/config/hpx.series)
#endif
InstallFileToFile(system.tmp, $(INSTINCFLAGS), $(DESTDIR)/config/system.mcr)
InstallFileToFile(allsys.mcr, $(INSTINCFLAGS), $(DESTDIR)/config/allsys.mcr)
InstallFileToFile(site.mcr, $(INSTINCFLAGS), $(DESTDIR)/config/site.mcr)
InstallFileToFile(andrew.rls, $(INSTINCFLAGS), $(DESTDIR)/config/andrew.rls)
InstallFileToFile(site.rls, $(INSTINCFLAGS), $(DESTDIR)/config/site.rls)
InstallFileToFile(depend.csh, $(INSTPROGFLAGS), $(DESTDIR)/config/depend.csh)
InstallFileToFile(loginstall, $(INSTPROGFLAGS), $(DESTDIR)/config/loginstall)
InstallFileToFile(COPYRITE, $(INSTINCFLAGS), $(DESTDIR)/config/COPYRITE)
InstallFileToFile(COPYRITE.bls, $(INSTINCFLAGS), $(DESTDIR)/config/COPYRITE.bls)
InstallFileToFile(COPYRITE.att, $(INSTINCFLAGS), $(DESTDIR)/config/COPYRITE.att)
InstallFileToFile(COPYRITE.img, $(INSTINCFLAGS), $(DESTDIR)/config/COPYRITE.img)
