@@ -18,7 +18,10 @@ CONFIGURE := configure
1818#-------------------------------------------------------------------------------
1919NAME := $(shell sed -ne 's/^[Nn]ame:[[:space:]]*//p' $(CABAL).in)
2020VERSION := $(shell sed -ne 's/^version[[:space:]]*=[[:space:]]*"\([^"]*\)"/\1/p' $(SRCDIR)/Main.hs)
21−EXECS := $(shell sed -ne 's/^[Ee]xecutable:[[:space:]]*//p' $(CABAL).in)
21+EXECSBASE := $(shell sed -ne 's/^[Ee]xecutable:[[:space:]]*//p' $(CABAL).in)
22+# Add .exe extensions if we're running Windows/Cygwin.
23+EXTENSION := $(shell uname | tr '[:upper:]' '[:lower:]' | sed -ne 's/^cygwin.*$$/\.exe/p')
24+EXECS := $(patsubst %,%$(EXTENSION),$(EXECSBASE))
2225# First entry in Cabal's executable stanza is the main executable.
2326MAIN := $(firstword $(EXECS))
2427