cmark

My personal build of CMark ✏️

Commit
bb777ce120ea26ece018e16e92b013a933b2dbb0
Parent
e1c590d3de3e519ef38d5abf48cef069e07a72a2
Author
John MacFarlane <jgm@berkeley.edu>
Date

Makefile: replaced PROG with CMARK and PROG.

PROG is overridable, CMARK is not. Slight adjustment to #297.

Diffstat

1 file changed, 7 insertions, 6 deletions

Status File Name N° Changes Insertions Deletions
Modified Makefile 13 7 6
diff --git 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