Skip to content

Commit

Permalink
Makefile: Don't depend on $(SPEC)
Browse files Browse the repository at this point in the history
The spec file is always present.
  • Loading branch information
nwellnhof committed Dec 17, 2024
1 parent fcf85e7 commit 44128b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@ update-spec:
curl 'https://raw.githubusercontent.com/jgm/CommonMark/master/spec.txt'\
> $(SPEC)

test: $(SPEC) cmake_build
test: cmake_build
ctest --test-dir $(BUILDDIR) --output-on-failure || (cat $(BUILDDIR)/Testing/Temporary/LastTest.log && exit 1)

$(ALLTESTS): $(SPEC)
python3 test/spec_tests.py --spec $< --dump-tests | python3 -c 'import json; import sys; tests = json.loads(sys.stdin.read()); print("\n".join([test["markdown"] for test in tests]))' > $@
$(ALLTESTS):
python3 test/spec_tests.py --spec $(SPEC) --dump-tests | python3 -c 'import json; import sys; tests = json.loads(sys.stdin.read()); print("\n".join([test["markdown"] for test in tests]))' > $@

leakcheck: $(ALLTESTS)
for format in html man xml latex commonmark; do \
Expand Down
3 changes: 1 addition & 2 deletions Makefile.nmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ SRCDIR=src
DATADIR=data
BUILDDIR=build
INSTALLDIR=windows
SPEC=test/spec.txt
PROG=$(BUILDDIR)\src\cmark.exe
GENERATOR=NMake Makefiles

Expand All @@ -21,7 +20,7 @@ install: all
clean:
-rmdir /s /q $(BUILDDIR) $(MINGW_INSTALLDIR) 2> nul

test: $(SPEC) all
test: all
ctest --test-dir $(BUILDDIR) --output-on-failure

distclean: clean
Expand Down

0 comments on commit 44128b3

Please sign in to comment.