From 3c46f8a6000326f8d7d2e4b417dd78c04c3890fc Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sun, 17 Jun 2007 16:20:50 +0000 Subject: Makefile changes: + Include files built from templates in the distribution tarball, so it can be built using Cabal and included in Hackage. + Remove unnecessary 'cabalize' step. We no longer build Pandoc.cabal from a template. git-svn-id: https://pandoc.googlecode.com/svn/trunk@605 788f1e2b-df1e-0410-8736-df70ead52e1b --- Makefile | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 3734c80e0..657a0c4ff 100644 --- a/Makefile +++ b/Makefile @@ -16,11 +16,11 @@ CONFIGURE := configure #------------------------------------------------------------------------------- # Cabal constants #------------------------------------------------------------------------------- -NAME := $(shell sed -ne 's/^[Nn]ame:[[:space:]]*//p' $(CABAL).in) +NAME := $(shell sed -ne 's/^[Nn]ame:[[:space:]]*//p' $(CABAL)) THIS := $(shell echo $(NAME) | tr A-Z a-z) VERSION := $(shell sed -ne 's/^version[[:space:]]*=[[:space:]]*"\([^"]*\)"/\1/p' $(SRCDIR)/Main.hs) RELNAME := $(THIS)-$(VERSION) -EXECSBASE := $(shell sed -ne 's/^[Ee]xecutable:[[:space:]]*//p' $(CABAL).in) +EXECSBASE := $(shell sed -ne 's/^[Ee]xecutable:[[:space:]]*//p' $(CABAL)) #------------------------------------------------------------------------------- # Install targets @@ -31,7 +31,6 @@ EXTENSION := $(shell uname | tr '[:upper:]' '[:lower:]' | \ sed -ne 's/^cygwin.*$$/\.exe/p') EXECS := $(addsuffix $(EXTENSION),$(EXECSBASE)) PROGS := $(EXECS) $(WRAPPERS) -# First entry in Cabal's executable stanza is the main executable. MAIN := $(firstword $(EXECS)) DOCS := README.html README BUGS @@ -115,10 +114,6 @@ cleanup_files+=$(WRAPPERS) $(WRAPPERS): %: $(SRCDIR)/wrappers/%.in $(SRCDIR)/wrappers/*.sh @$(generate-shell-script) -cleanup_files+=$(CABAL) -$(CABAL): cabalize $(CABAL).in $(SRCDIR)/Main.hs - ./cabalize <$(CABAL).in >$(CABAL) - .PHONY: configure cleanup_files+=$(BUILDDIR) $(BUILDCONF) $(BUILDVARS) configure: $(BUILDCONF) templates @@ -138,10 +133,10 @@ cleanup_files+=$(EXECS) $(EXECS): build for f in $@; do \ [ -f $$f ] || { \ - find $(BUILDDIR) -type f -name "$$f" \ - -perm +a=x -exec ln -s {} . \; ; \ + find $(BUILDDIR) -type f -name "$$f" \ + -perm +a=x -exec ln -s {} . \; ; \ } \ - done + done .PHONY: build-doc cleanup_files+=README.html @@ -331,6 +326,8 @@ cleanup_files+=$(tarball_name) tarball: $(tarball_name) $(tarball_name): svn export . $(RELNAME) + $(MAKE) -C $(RELNAME) templates + $(MAKE) -C $(RELNAME) wrappers tar cvzf $(tarball_name) $(RELNAME) -rm -rf $(fullname) -- cgit v1.2.3