Add a 'osx-pkg' target for the creation of a Mac OSX® package (using
PackageMaker.App). This target recursively uses 'install-program' target to populate OSX package directory tree. git-svn-id: https://pandoc.googlecode.com/svn/trunk@40 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
parent
fe92360ea2
commit
52f07a04b5
1 changed files with 30 additions and 2 deletions
32
Makefile
32
Makefile
|
@ -44,6 +44,7 @@ PKGPATH := $(DATAPATH)/$(THIS)
|
|||
INSTALL := install -c
|
||||
INSTALL_PROGRAM := $(INSTALL) -m 755
|
||||
INSTALL_DATA := $(INSTALL) -m 644
|
||||
STRIP := strip
|
||||
GHC := ghc
|
||||
GHC_PKG := ghc-pkg
|
||||
|
||||
|
@ -59,6 +60,16 @@ templates: $(SRCDIR)/templates
|
|||
$(SRCDIR)/templates:
|
||||
$(MAKE) -C $(SRCDIR)/templates
|
||||
|
||||
# Document process rules.
|
||||
%.html: %
|
||||
./$(THIS) -s $^ >$@ || rm -f $@
|
||||
%.tex: %
|
||||
$(THIS) -s -w latex $^ >$@ || rm -f $@
|
||||
%.rtf: %
|
||||
$(THIS) -s -w rtf $^ >$@ || rm -f $@
|
||||
%.pdf: %
|
||||
sh ./markdown2pdf $^ || rm -f $@
|
||||
|
||||
cleanup_files+=$(CABAL)
|
||||
$(CABAL): cabalize $(CABAL).in
|
||||
./cabalize <$(CABAL).in >$(CABAL)
|
||||
|
@ -153,13 +164,30 @@ uninstall-all: uninstall-exec uninstall-doc uninstall-lib-doc
|
|||
install: install-program
|
||||
uninstall: uninstall-program
|
||||
|
||||
.PHONY: osx-pkg
|
||||
osx_dest:=osx-pkg
|
||||
doc_more:=README.rtf LICENSE.rtf
|
||||
cleanup_files+=$(osx_dest) $(doc_more)
|
||||
osx-pkg: $(doc_more)
|
||||
-rm -rf $(osx_dest)
|
||||
$(INSTALL) -d $(osx_dest)
|
||||
DESTDIR=$(osx_dest) $(MAKE) install-program
|
||||
find $(osx_dest) -type f -regex ".*bin/.*" | xargs chmod +x
|
||||
find $(osx_dest) -type f -regex ".*bin/$(THIS)" | xargs $(STRIP)
|
||||
$(INSTALL) -d $(osx_dest)/Resources
|
||||
mv README.rtf $(osx_dest)/Resources/ReadMe.rtf
|
||||
mv LICENSE.rtf $(osx_dest)/Resources/License.rtf
|
||||
@echo
|
||||
@echo "You may now run PackageMaker.app. For Root, specify"
|
||||
@echo "osx-pkg/Package_Root. The ReadMe.rtf and License.rtf files"
|
||||
@echo "can be found in osx-pkg/Resources."
|
||||
@echo
|
||||
|
||||
.PHONY: test test-markdown
|
||||
test: $(BINS)
|
||||
@cd tests && perl runtests.pl -s $(PWD)/$(THIS)
|
||||
test-markdown: $(BINS)
|
||||
@cd tests/MarkdownTest_1.0.3 && perl MarkdownTest.pl -s $(PWD)/$(THIS) -tidy
|
||||
%.html: %
|
||||
./$(THIS) -s $^ >$@ || rm -f $@
|
||||
|
||||
# Stolen and slightly improved from a GPLed Makefile. Credits to John Meacham.
|
||||
src_all:=$(shell find $(SRCDIR) -type f -name '*hs' | egrep -v '^\./(_darcs|lib|test)/')
|
||||
|
|
Loading…
Reference in a new issue