git.iko.soy/typeable/pandoc
on master help sign in
+ Small changes to Makefile for better handling of Windows executable.
4ab3eb3fiddlosopher
Makefile+16−6
@@ -19,16 +19,18 @@ CONFIGURE := configure
19NAME := $(shell sed -ne 's/^[Nn]ame:[[:space:]]*//p' $(CABAL).in)
19NAME := $(shell sed -ne 's/^[Nn]ame:[[:space:]]*//p' $(CABAL).in)
20VERSION := $(shell sed -ne 's/^version[[:space:]]*=[[:space:]]*"\([^"]*\)"/\1/p' $(SRCDIR)/Main.hs)
20VERSION := $(shell sed -ne 's/^version[[:space:]]*=[[:space:]]*"\([^"]*\)"/\1/p' $(SRCDIR)/Main.hs)
21EXECSBASE := $(shell sed -ne 's/^[Ee]xecutable:[[:space:]]*//p' $(CABAL).in)
21EXECSBASE := $(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))
25−# First entry in Cabal's executable stanza is the main executable.
26−MAIN := $(firstword $(EXECS))
27
22
28#-------------------------------------------------------------------------------
23#-------------------------------------------------------------------------------
29# Install targets
24# Install targets
30#-------------------------------------------------------------------------------
25#-------------------------------------------------------------------------------
26+# Add .exe extensions if we're running Windows/Cygwin.
27+EXTENSION := $(shell uname | tr '[:upper:]' '[:lower:]' | \
28+ sed -ne 's/^cygwin.*$$/\.exe/p')
29+EXECS := $(addsuffix $(EXTENSION),$(EXECSBASE))
30+# First entry in Cabal's executable stanza is the main executable.
31+MAIN := $(firstword $(EXECS))
31−WRAPPERS := html2markdown latex2markdown markdown2html markdown2latex markdown2pdf
32+WRAPPERS := html2markdown latex2markdown markdown2html \
33+ markdown2latex markdown2pdf
32PROGS := $(EXECS) $(WRAPPERS)
34PROGS := $(EXECS) $(WRAPPERS)
33DOCS := README.html README BUGS TODO
35DOCS := README.html README BUGS TODO
34
36
@@ -331,6 +333,7 @@ web_dest:=web/pandoc
331make_page:=./$(MAIN) -s -B $(web_src)/header.html \
333make_page:=./$(MAIN) -s -B $(web_src)/header.html \
332 -A $(web_src)/footer.html \
334 -A $(web_src)/footer.html \
333 -H $(web_src)/css
335 -H $(web_src)/css
336+win_main:=$(basename $(MAIN)).exe
334cleanup_files+=$(web_dest)
337cleanup_files+=$(web_dest)
335website: $(web_dest)
338website: $(web_dest)
336$(web_dest)/: $(MAIN) html $(tarball_name)
339$(web_dest)/: $(MAIN) html $(tarball_name)
@@ -342,12 +345,17 @@ $(web_dest)/: $(MAIN) html $(tarball_name)
342 echo "*** Missing ../$(deb_main). ***"; \
345 echo "*** Missing ../$(deb_main). ***"; \
343 exit 1; \
346 exit 1; \
344 }
347 }
348+ @[ -f $(win_main) ] || { \
349+ echo "*** Missing $(win_main). ***"; \
350+ exit 1; \
351+ }
345 -rm -rf $(web_dest)
352 -rm -rf $(web_dest)
346 ( \
353 ( \
347 mkdir $(web_dest); \
354 mkdir $(web_dest); \
348 cp -r html $(web_dest)/doc; \
355 cp -r html $(web_dest)/doc; \
349 cp ../$(osx_dmg_name) $(web_dest)/; \
356 cp ../$(osx_dmg_name) $(web_dest)/; \
350 cp ../$(deb_main) $(web_dest)/; \
357 cp ../$(deb_main) $(web_dest)/; \
358+ cp $(win_main) $(web_dest)/; \
351 cp $(tarball_name) $(web_dest)/; \
359 cp $(tarball_name) $(web_dest)/; \
352 cp $(web_src)/*.css $(web_dest)/; \
360 cp $(web_src)/*.css $(web_dest)/; \
353 sed -e 's#@PREFIX@#$(PREFIX)#g' $(osx_src)/Welcome | \
361 sed -e 's#@PREFIX@#$(PREFIX)#g' $(osx_src)/Welcome | \
@@ -361,6 +369,8 @@ $(web_dest)/: $(MAIN) html $(tarball_name)
361 sed -e 's/@TARBALL_NAME@/$(tarball_name)/g' $(web_src)/index.txt | \
369 sed -e 's/@TARBALL_NAME@/$(tarball_name)/g' $(web_src)/index.txt | \
362 sed -e 's/@DEB_NAME@/$(deb_main)/g' | \
370 sed -e 's/@DEB_NAME@/$(deb_main)/g' | \
363 sed -e 's/@OSX_DMG_NAME@/$(osx_dmg_name)/g' | \
371 sed -e 's/@OSX_DMG_NAME@/$(osx_dmg_name)/g' | \
372+ sed -e 's/@WINDOWS_EXE_NAME@/$(win_main)/g' | \
373+ sed -e 's/@VERSION@/$(VERSION)/g' | \
364 $(make_page) > $(web_dest)/index.html; \
374 $(make_page) > $(web_dest)/index.html; \
365 ) || { rm -rf $(web_dest); exit 1; }
375 ) || { rm -rf $(web_dest); exit 1; }
366
376
web/index.txt+5−2
@@ -18,19 +18,22 @@ For more information, see the [README](README.html) file.
18
18
19**Source distribution:** [`@TARBALL_NAME@`](@TARBALL_NAME@).
19**Source distribution:** [`@TARBALL_NAME@`](@TARBALL_NAME@).
20To install, unpack the archive and follow the instructions in the
20To install, unpack the archive and follow the instructions in the
21−[INSTALL](INSTALL.html) file. You'll need the [GHC] Haskell compiler.
21+[INSTALL](INSTALL.html) file. You'll need the [GHC] Haskell compiler,
22+version 6.4 or higher.
22
23
23**MacOS X binary package:** [`@OSX_DMG_NAME@`](@OSX_DMG_NAME@).
24**MacOS X binary package:** [`@OSX_DMG_NAME@`](@OSX_DMG_NAME@).
24To install, just double-click the package icon in the disk
25To install, just double-click the package icon in the disk
25image. See the [installation notes](osx-notes.html) for important
26image. See the [installation notes](osx-notes.html) for important
26information about setting your `PATH`. Note: This package was
27information about setting your `PATH`. Note: This package was
27−compiled on a G4 Mac; it will work on an Intel Mac via emulation.
28+compiled on a G4 Mac; it will also work on an Intel Mac via emulation.
28
29
29**Debian binary package:** [`@DEB_NAME@`](@DEB_NAME@).
30**Debian binary package:** [`@DEB_NAME@`](@DEB_NAME@).
30To install (on x86 Debian-based linux systems only):
31To install (on x86 Debian-based linux systems only):
31
32
32 sudo dpkg -i @DEB_NAME@
33 sudo dpkg -i @DEB_NAME@
33
34
35+**Windows executable:** [`@WINDOWS_EXE_NAME@`](@WINDOWS_EXE_NAME@).
36+
34**Repository:** Pandoc has a publicly accesible subversion repository
37**Repository:** Pandoc has a publicly accesible subversion repository
35at Google Code (<http://code.google.com/p/pandoc>). To check out the
38at Google Code (<http://code.google.com/p/pandoc>). To check out the
36latest, bleeding-edge source code:
39latest, bleeding-edge source code: