diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2014-12-16 13:58:34 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2014-12-16 13:58:34 -0800 |
commit | 658f01f072ae9e8a24a514f9fa64226ca6fe3a59 (patch) | |
tree | 5f889317e266cbcddbfd87dd8d9478c585eb6a44 | |
parent | 7e41d0b1eed6d90fbfe2d27399df00e670708bb8 (diff) | |
download | pandoc-658f01f072ae9e8a24a514f9fa64226ca6fe3a59.tar.gz |
Added bindist target to Makefile.
This creates a binary package with a standalone executable and
man pages.
-rw-r--r-- | Makefile | 21 |
1 files changed, 18 insertions, 3 deletions
@@ -5,6 +5,8 @@ ifeq "${makemanpages}" "" endif setup=dist/setup/setup MANPAGES=man/man1/pandoc.1 man/man5/pandoc_markdown.5 +PREFIX ?= /usr/local +BINDIST ?= pandoc-$(version)-$(shell uname -m) quick: cabal configure --enable-tests --disable-optimization @@ -39,7 +41,19 @@ dist: man cd pandoc-${version} cabal configure ${CABALARGS} && cabal build && cabal test && cd .. && rm -rf "pandoc-${version}" -man: ${MANPAGES} +bindist: $(MANPAGES) + cabal install --only-dependencies -fembed_data_files + cabal configure --prefix=/usr/local --datadir=share/data --enable-tests -fembed_data_files + cabal build + cabal test + cabal copy --destdir=$(BINDIST) + mkdir -p $(BINDIST)$(PREFIX)/share/man/man1 $(BINDIST)$(PREFIX)/share/man/man5 + for x in $(MANPAGES); do cp $$x $(BINDIST)$(PREFIX)/share/$$x; done + mkdir -p $(BINDIST)$(PREFIX)/share/doc/pandoc + cp COPYING $(BINDIST)$(PREFIX)/share/doc/pandoc/ + tar cvzf $(BINDIST).tar.gz $(BINDIST)$(PREFIX)/bin $(BINDIST)$(PREFIX)/share + +man: $(MANPAGES) osxpkg: ./make_osx_package.sh @@ -52,6 +66,7 @@ osxpkg: clean: cabal clean - -rm ${MANPAGES} + -rm $(MANPAGES) + -rm -rf $(BINDIST) $(BINDIST).tar.gz -.PHONY: deps quick full install man clean test bench haddock osxpkg dist prof +.PHONY: deps quick full install man clean test bench haddock osxpkg dist bindist prof |