
#  Dylan libraries for interfacing with the "HTML Help" of the
#  Win32 API (Microsoft Windows)
#
#  This file controls the generation of source files that are created
#  automatically by adapting information from the Microsoft header files.

WIN32-HTML-HELP=html-help.dylan library.dylan

all: $(WIN32-HTML-HELP)

html-help: $(WIN32-HTML-HELP)

COMDIR=../win32-common

include $(COMDIR)/sources.mak


library.dylan: library.src htmlhelp.exp

html-help.dylan: $(MSH)htmlhelp.h $(PATTERNS) inherited-slots.pat \
			$(COMDIR)/callback.pat
	$(GEMA) -f $(PATTERNS) \
		-f inherited-slots.pat \
		-f $(COMDIR)/callback.pat \
		-f $(COMDIR)/modcopyr.pat  -module Win32-HTML-Help \
		-p '@append{heading;define C-pointer-type \<LPHH-INFOTYPE\> \=\> \<HH-INFOTYPE\>\;\n\n}'\
		-omit ATOM_HTMLHELP_API_ANSI \
		-omit ATOM_HTMLHELP_API_UNICODE \
		-in $(MSH)htmlhelp.h  -out $@

# This notes which slot accessors should not be exported here because the
# name is inherited from another module:
inherited-slots.pat: library.src
	$(GEMA) -match -idchars '_-$$<>@%&*+=/?' \
	  -p '\Iexport\:\W\{<exports>\}=$$1' \
	  -p 'exports:<I>-value-setter\I=export-slot\:\\C$$1\=\$$0-value\@end\n;<I>=;?=' \
	  -in library.src -out $@

TAGS: $(WIN32-HTML-HELP)
	dtags $(WIN32-HTML-HELP)

tags: TAGS

clean:
	rm -f $(WIN32-HTML-HELP) *.bak *.exp inherited-slots.pat TAGS
