[comp.databases] Useful Makefile for Oracle forms

jalsop@seachg.uucp (John Alsop) (04/02/91)

Oracle forms users might find the attached Makefile useful. 

If you have a source directory containing '.inp' files, it will generate 
the '.frm' files whenever the '.inp' has been changed, for example if
you've edited the .inp source directly.

You can also use 'make install' to copy updated .frm files to wherever you
keep production copies.

Tested only on an NCR Tower but should be portable.

------------------------- cut here ----------------------------------

#-----------------------------------------------------------------------------
# Makefile for Oracle forms
#
# Usage:	make		- to generate .frm from .inp
#		make install	- to install in $(DEST)
#		make rebuild	- to rebuild this Makefile
#-----------------------------------------------------------------------------

#--------------- Stuff you shouldn't change ----------------------------------
.SUFFIXES : .inp .frm

.inp.frm :
	iag -to $<

MK=Makefile
FORMNAMES=*.frm
#--------------- Stuff you might change --------------------------------------

DEST=/local/forms

all:        $(FORMNAMES)
	@echo Done.

install:	$(FORMNAMES)
	@echo Install done.

rebuild:
	@echo Rebuilding Makefile ...
	@mv Makefile Makefile.OLD
	@echo "/DO NOT\ REMOVE/+1,\$$ d\nw $(MK)\nq" | ed Makefile.OLD
	@echo "" >> $(MK)
	@for i in *.frm ; do \
		echo "install:	$$(DEST)/$$i" >> $(MK); \
		echo "$$(DEST)/$$i : $$i" >> $(MK); \
		echo '\tcp $$? $$(DEST)' >> $(MK); \
		done
	@echo Done.

#----------- Stuff after next line is generated by 'make rebuild' --------
############ DO NOT REMOVE THIS LINE #####################################

install:	$(DEST)/test.frm
$(DEST)/test.frm : test.frm
	cp $? $(DEST)

--------------- the end -----------------------------
-- 
John Alsop

Sea Change Corporation
6695 Millcreek Drive, Unit 8
Mississauga, Ontario, Canada L5N 5R8
Tel: 416-542-9484 Fax: 416-542-9479
UUCP: ...!uunet!attcan!seachg!jalsop