TARGETTYPE=NONE
#PLACE=$(TARGET)

TARGET=leash32.chm
TARGETDIR=$(PISMERE)\target\bin\$(T)
ALWAYS=whatisthechancesomeonewouldmakethisfilename
HHK=$(TARGET:.chm=.hhk)
HHP=$(TARGET:.chm=.hhp)
ERR=$(TARGET:.chm=.log)

all:: $(O)\$(TARGET) rename

clean::
	@if exist $(O)\$(TARGET) del $(O)\$(TARGET)
	@if exist $(ERR) del $(ERR)

rename:
	@if exist $(TARGET) ren $(TARGET) $(TARGET)
	@if exist $(ERR) ren $(ERR) $(ERR)

# We rename the file to get a lower-case file.
# It looks like the silly help compiler gives us uppercase.
$(O)\$(TARGET): $(HHK) $(HHP) $(ALWAYS)
   @set guiwrap=$(TARGETDIR)\guiwrap.exe
   @if not exist $(O) mkdir $(O)
   $(PISMERE)\scripts\hhcwrap $(HHP) $(O)\$(TARGET)
   copy $(O)\$(TARGET) $(TARGETDIR)

$(ALWAYS):
