HC = ghc HC_MAKE = $(HC) --make $< -o $@ -main-is $(notdir $@) $(HC_OPTIONS) SCREENSHOT_DIR = $(CURDIR)/../../../website/ EXAMPLES = PersonTest Grep SettingsForm WxEmbedded MVCExample EmbeddedTree AlbumEditor AFWxExample RecursiveUpdates all:$(EXAMPLES) %: %.hs $(HC_MAKE) PersonTest:PersonTest.hs Grep:Grep.hs SettingsForm:SettingsForm.hs WxEmbedded:WxEmbedded.hs MVCExample:MVCExample.hs EmbeddedTree:EmbeddedTree.hs AlbumEditor:AlbumEditor.hs AFWxExample:AFWxExample.hs RecursiveUpdates:RecursiveUpdates.hs .PHONY: clean all screenshots clean: - rm *.hi *.o *~ $(EXAMPLES) $(SCREENSHOT_DIR){PersonTest,Grep,SettingsForm,WxEmbedded,MVCExample,EmbeddedTree,AlbumEditor,AFWxExample,RecursiveUpdates}.png define makeScreenshot echo "Doing $(1) screenshot" ./$(1) & sleep 2 && import -frame -window $(2) $(SCREENSHOT_DIR)$(1)Screenshot.png killall $(1) endef #The screenshots which are outcommented, are because they are not working right now. screenshots: all # $(call makeScreenshot,Grep,"Grep") # $(call makeScreenshot,GrepText,"AutoForms") # killall Grep $(call makeScreenshot,SettingsForm,"Text Editor Settings Forms") $(call makeScreenshot,WxEmbedded,"Counter") $(call makeScreenshot,MVCExample,"Alarm MVC Example") $(call makeScreenshot,EmbeddedTree,"Embedded Tree") # $(call makeScreenshot,AlbumEditor,"Album") $(call makeScreenshot,AFWxExample,"AFWx example") $(call makeScreenshot,RecursiveUpdates,"Recursive Updates")