aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-06-17 16:20:50 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-06-17 16:20:50 +0000
commit3c46f8a6000326f8d7d2e4b417dd78c04c3890fc (patch)
tree9e15c6a1db1829cd9e5f4622d2f1a7196d20c632
parentc841becc84e451c5696bca8aa7040efb484106fd (diff)
downloadpandoc-3c46f8a6000326f8d7d2e4b417dd78c04c3890fc.tar.gz
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
-rw-r--r--Makefile17
1 files 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)