Small improvements in Makefile:

+ Added $(BUILDCMD) target, so setup doesn't get compiled every time.
+ Removed (now circular) dependency of templates on ./templates.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@1107 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2007-11-29 02:03:07 +00:00
parent b2fa8c7dd2
commit ae5697e3b4

View file

@ -93,7 +93,7 @@ all: build-program
./$(MAIN) -s -S -w man $< >$@ || rm -f $@
.PHONY: templates
templates: $(SRCDIR)/templates
templates:
$(MAKE) -C $(SRCDIR)/templates
define generate-shell-script
@ -128,10 +128,11 @@ $(CABAL_BACKUP):
.PHONY: configure
cleanup_files+=Setup.hi Setup.o $(BUILDCMD) $(BUILDVARS)
configure: $(BUILDCONF) templates
$(BUILDCONF): $(CABAL) $(CABAL_BACKUP)
$(BUILDCMD): Setup.hs
$(GHC) -package Cabal Setup.hs -o $(BUILDCMD)
$(BUILDCONF): $(CABAL) $(CABAL_BACKUP) $(BUILDCMD)
$(BUILDCMD) configure --prefix=$(PREFIX) --with-compiler=$(GHC) --with-hc-pkg=$(GHC_PKG)
# Make configuration time settings persistent (definitely a hack).
@# Make configuration time settings persistent (definitely a hack).
@echo "PREFIX?=$(PREFIX)" >$(BUILDVARS)
@echo "DESTDIR?=$(DESTDIR)" >>$(BUILDVARS)