################################################################
# Makefile generated by qmakefile/1
################################################################

.SUFFIXES: .pl .qlf

PL=	pl

QLF=	pce.qlf pce_manual.qlf pcedraw.qlf dialog/dialog.qlf \
	emacs/emacs.qlf trace/trace.qlf emacs/prolog_mode.qlf

all:	checkwd INDEX.pl $(QLF)

clean:
	rm -f $(QLF)

checkwd:	
		@pwd > .pwd%
		@if cmp -s .pwd% .pwd; then rm .pwd%; else mv .pwd% .pwd; fi

pce.qlf:	.pwd pce.pl ../boot/pce_expand.pl ../boot/pce_pl.pl \
		english/pce_messages.pl ../boot/pce_principal.pl \
		../boot/pce_error.pl \
		../boot/pce_global.pl ../boot/pce_expansion.pl \
		../boot/pce_realise.pl ../boot/pce_autoload.pl \
		../boot/pce_editor.pl ../boot/pce_portray.pl

pce_manual.qlf:	.pwd pce_manual.pl man/util.pl man/p_card.pl man/p_data.pl \
		man/classmap.pl man/v_manual.pl

pcedraw.qlf:	.pwd pcedraw.pl draw/draw.pl draw/gesture.pl draw/shapes.pl \
		draw/canvas.pl draw/align.pl draw/menu.pl draw/config.pl \
		draw/exportpl.pl

dialog/dialog.qlf:	.pwd dialog/dialog.pl dialog/proto.pl \
			dialog/layout.pl dialog/generate.pl \
			dialog/pretty_print.pl dialog/behaviour.pl \
			dialog/meta.pl dialog/load.pl dialog/util.pl

emacs/emacs.qlf:	.pwd emacs/emacs.pl emacs/window.pl emacs/buffer.pl \
			emacs/buffer_menu.pl emacs/server.pl \
			emacs/fundamental_mode.pl emacs/language_mode.pl \
			emacs/outline_mode.pl emacs/application.pl \
			emacs/bookmarks.pl

trace/trace.qlf:	.pwd trace/trace.pl trace/clause.pl trace/util.pl \
			trace/settings.pl trace/break.pl trace/source.pl \
			trace/stack.pl trace/pprint.pl trace/viewterm.pl \
			trace/gui.pl

emacs/prolog_mode.qlf:	.pwd emacs/prolog_mode.pl emacs/prolog_colour.pl \
			xref/common.pl


INDEX.pl:	.
	$(PL) -g "make_library_index('.')" -t halt

.pl.qlf:	
	@echo '****************'
	@echo '* QLF compilation of $*'
	@echo '****************'
	$(PL) -O -g "qcompile('$*')" -t halt -- -nopce
