#
# ~ppr/src/ppd/Makefile
# Copyright 1995, Trinity College Computing Center.
# Written by David Chappell.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted, provided
# that the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation.  This software is provided "as is" without express or
# implied warranty.
#
# This file was last modified 1 May 1995.
#

include ../include/global.mk


# Construct the patched files from the patch files.
patches-done:
	@echo "Patching PPD files."
	./dopatches.sh
	touch patches-done
	( cd ghostscript; $(MAKE) )

# Copy the files in each vendor's directory into the final
# destination PPD files directory.  Notice that the "patched"
# directory must be copied last so that the patched versions
# overwrite the origional versions.
install: patches-done
	cp adobe/* $(HOMEDIR)/PPDFiles
	cp apple/* $(HOMEDIR)/PPDFiles	
	cp trincoll/* $(HOMEDIR)/PPDFiles
	cp patched/* $(HOMEDIR)/PPDFiles
	cp hp/* $(HOMEDIR)/PPDFiles
	( cd ghostscript; $(MAKE) install )

# Construct the patch files from the patched files.
makepatches:
	@echo "Creating patches."
	./makepatches.sh

# Construct the patch files from the patche files,
# remove the patched files, and remove junk.
clean: makepatches
	@echo "Removing unnecessary files."
	rm -f patched/* patches-done
	rm -f *.bak *~
	( cd ghostscript; $(MAKE) clean )

# end of file
