Added bindist target to Makefile.
This creates a binary package with a standalone executable and man pages.
This commit is contained in:
parent
7e41d0b1ee
commit
658f01f072
1 changed files with 18 additions and 3 deletions
21
Makefile
21
Makefile
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue