summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 9ff3f3036..e3129aa39 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@
# Constant names and commands in source tree
#-------------------------------------------------------------------------------
CABAL := pandoc.cabal
-SRCDIR := .
+SRCDIR := src
MANDIR := man
TESTDIR := tests
BUILDDIR := dist
@@ -91,6 +91,10 @@ all: build-program
%.1: %.1.md $(MAIN)
./$(MAIN) -s -S -w man $< >$@ || rm -f $@
+.PHONY: templates
+templates: $(SRCDIR)/templates
+ $(MAKE) -C $(SRCDIR)/templates
+
define generate-shell-script
echo >&2 "Generating $@..."; \
awk ' \
@@ -114,7 +118,7 @@ $(WRAPPERS): %: $(SRCDIR)/wrappers/%.in $(SRCDIR)/wrappers/*.sh
.PHONY: configure
cleanup_files+=Setup.hi Setup.o $(BUILDCMD) $(BUILDVARS)
-configure: $(BUILDCONF)
+configure: $(BUILDCONF) templates
$(BUILDCONF): $(CABAL)
ghc -package Cabal Setup.hs -o $(BUILDCMD)
$(BUILDCMD) configure --prefix=$(PREFIX)
@@ -279,6 +283,7 @@ cleanup_files+=$(tarball)
tarball: $(tarball)
$(tarball):
svn export . $(PKGID)
+ $(MAKE) -C $(PKGID) templates
$(MAKE) -C $(PKGID) wrappers
tar cvzf $(tarball) $(PKGID)
-rm -rf $(PKGID)
@@ -338,5 +343,6 @@ distclean: clean
fi
clean:
+ make -C $(SRCDIR)/templates clean
-if [ -f $(BUILDCONF) ]; then $(BUILDCMD) clean; fi
-rm -rf $(cleanup_files)