From 52f07a04b579e7c3a35d8cf9d27593d38f83d182 Mon Sep 17 00:00:00 2001 From: roktas Date: Mon, 30 Oct 2006 06:41:26 +0000 Subject: 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. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://pandoc.googlecode.com/svn/trunk@40 788f1e2b-df1e-0410-8736-df70ead52e1b --- Makefile | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b3b68bc45..58fef824c 100644 --- a/Makefile +++ b/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)/') -- cgit v1.2.3