- Commit
- 248841d485647bf2981712aa22f8720e89eccf73
- Parent
- 40a47312895bcc00175d4204fd3ec522199a0a84
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
Cleaned up Makefile.
My personal build of CMark ✏️
Cleaned up Makefile.
1 file changed, 14 insertions, 9 deletions
Status | File Name | N° Changes | Insertions | Deletions |
Modified | Makefile | 23 | 14 | 9 |
diff --git a/Makefile b/Makefile @@ -10,21 +10,26 @@ PROG?=$(BUILDDIR)/src/cmark .PHONY: all spec leakcheck clean fuzztest dingus upload jshint test testjs benchjs update-site upload-site check npm debug -all: check - mkdir -p $(BUILDDIR); cd build; cmake .. -DCMAKE_BUILD_TYPE=Release; make +all: $(BUILDDIR) + @cmake --build $(BUILDDIR) || (echo "You need cmake to build this program: http://www.cmake.org/download/" && exit 1) -debug: check - mkdir -p $(BUILDDIR); cd build; cmake .. -DCMAKE_BUILD_TYPE=Debug; make +install: $(BUILDDIR) man/man1/cmark.1 + cmake --build $(BUILDDIR) --target install -install: check man/man1/cmark.1 - mkdir -p $(BUILDDIR); cd build; cmake .. -DCMAKE_BUILD_TYPE=Release; make install +$(BUILDDIR): + mkdir -p $(BUILDDIR); \ + cd $(BUILDDIR); \ + cmake .. -DCMAKE_BUILD_TYPE=$(BUILD_TYPE) + +debug: + mkdir -p $(BUILDDIR); \ + cd $(BUILDDIR); \ + cmake .. -DCMAKE_BUILD_TYPE=Debug; \ + cmake --build . clean: rm -rf $(BUILDDIR) -check: - @cmake --version >/dev/null || (echo "You need cmake to build this program: http://www.cmake.org/download/" && exit 1) - $(PROG): all man/man1/cmark.1: man/cmark.1.md