From bb777ce120ea26ece018e16e92b013a933b2dbb0 Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Sat, 24 Jan 2015 12:07:05 -0800
Subject: Makefile:  replaced PROG with CMARK and PROG.

PROG is overridable, CMARK is not.
Slight adjustment to #297.
---
 Makefile | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

(limited to 'Makefile')

diff --git a/Makefile b/Makefile
index 59d55a9..536638e 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,8 @@ BENCHDIR=bench
 BENCHFILE=$(BENCHDIR)/benchinput.md
 ALLTESTS=alltests.md
 NUMRUNS?=10
-PROG=$(BUILDDIR)/src/cmark
+CMARK=$(BUILDDIR)/src/cmark
+PROG?=$(CMARK)
 BENCHINP?=README.md
 JSMODULES=$(wildcard js/lib/*.js)
 VERSION?=$(SPECVERSION)
@@ -24,7 +25,7 @@ INSTALL_PREFIX?=/usr/local
 
 all: cmake_build man/man3/cmark.3
 
-$(PROG): cmake_build
+$(CMARK): cmake_build
 
 cmake_build: $(BUILDDIR)
 	@make -j2 -C $(BUILDDIR)
@@ -54,7 +55,7 @@ mingw:
 	cmake .. -DCMAKE_TOOLCHAIN_FILE=../toolchain-mingw32.cmake -DCMAKE_INSTALL_PREFIX=$(MINGW_INSTALLDIR) ;\
 	make && make install
 
-man/man3/cmark.3: src/cmark.h | $(PROG)
+man/man3/cmark.3: src/cmark.h | $(CMARK)
 	python3 man/make_man_page.py $< > $@ \
 
 archive:
@@ -118,8 +119,8 @@ astyle:
 	astyle --style=linux -t -p -r  'src/*.c' --exclude=scanners.c
 	astyle --style=linux -t -p -r  'src/*.h' --exclude=html_unescape.h
 
-operf: $(PROG)
-	operf $(PROG) <$(BENCHINP) >/dev/null
+operf: $(CMARK)
+	operf $< < $(BENCHINP) > /dev/null
 
 distclean: clean
 	-rm -f js/dist/commonmark.js
@@ -160,7 +161,7 @@ dingus: js/dist/commonmark.js
 spec.md: $(SPEC)
 	python3 tools/makespec.py markdown > $@
 
-spec.html: spec.txt tools/template.html ${PROG}
+spec.html: spec.txt tools/template.html ${CMARK}
 	python3 tools/makespec.py html > $@
 
 spec.pdf: spec.md tools/template.tex tools/specfilter.hs
-- 
cgit v1.2.3