HC = ghc HC_MAKE = $(HC) --make $< -o $@ -main-is $(notdir $@) $(HC_OPTIONS) -package ghc SCREENSHOT_DIR = $(CURDIR)/../../../website/ EXAMPLES = GhciGui GhcProcess %: %.hs $(HC_MAKE) GhciGui:GhciGui.hs Options.hs Protocol.hs ECOptions.hs GhcProcess:GhcProcess.hs Options.hs Protocol.hs .PHONY: clean all no_screenshots all:$(EXAMPLES) clean: - rm *.hi *.o *~ $(EXAMPLES) define makeScreenshot echo "Doing $(1) screenshot" ./$(1) & sleep 2 && import -frame -window $(2) $(SCREENSHOT_DIR)$(1)Screenshot.png killall $(1) endef no_screenshots: all $(call makeScreenshot,Grep,"Grep") $(call makeScreenshot,GrepText,"AutoForms") killall Grep $(call makeScreenshot,SettingsForm,"Settings") $(call makeScreenshot,WxEmbedded,"Counter") $(call makeScreenshot,ExtendedCounter,"My Extended Counter") $(call makeScreenshot,MVCExample,"Alarm") $(call makeScreenshot,EmbeddedTree,"Embedded Tree") $(call makeScreenshot,AlbumEditor,"Album") # -iExamples/GhciGui -fglasgow-exts -fth