@@ -21,7 +21,7 @@ cpplint-all \
21
21
check-badchars
22
22
23
23
$(BUILD_DIR ) :
24
- mkdir -p $(BUILD_DIR )
24
+ @ mkdir -p $(BUILD_DIR )
25
25
26
26
# ### clean: remove all files generated by the productive rules
27
27
.PHONY : clean
@@ -36,16 +36,16 @@ distclean:
36
36
37
37
# ### check markdown
38
38
39
- # # run remark markdown checker based on configuration in .remarkrc
39
+ # # run remark markdown checker based on configuration in package.json
40
40
.PHONY : check-markdown
41
- check-markdown : nodejs/node_modules/remark nodejs/remark/.remarkrc $(SOURCEPATH ) $(BUILD_DIR ) Makefile
41
+ check-markdown : nodejs/node_modules/remark nodejs/package.json $(SOURCEPATH ) $(BUILD_DIR ) Makefile
42
42
# # run remark, paste output to temporary file
43
- cd nodejs; ./node_modules/.bin/remark ../$(SOURCEPATH) --no-color -q --config-path ./remark/.remarkrc 1> ../$(BUILD_DIR)/$(SOURCEFILE).fixed --frail
43
+ cd nodejs; ./node_modules/.bin/remark ../$(SOURCEPATH) --no-color -q 1> ../$(BUILD_DIR)/$(SOURCEFILE).fixed --frail
44
44
45
45
# # show a diff with changes remark suggests
46
46
.PHONY : show-diff
47
- show-diff : nodejs/node_modules/remark nodejs/remark/.remarkrc $(SOURCEPATH ) $(BUILD_DIR ) Makefile
48
- cd nodejs; ./node_modules/.bin/remark ../$(SOURCEPATH ) --no-color -q --config-path ./remark/.remarkrc 1> ../$(BUILD_DIR ) /$(SOURCEFILE ) .fixed
47
+ show-diff : nodejs/node_modules/remark nodejs/package.json $(SOURCEPATH ) $(BUILD_DIR ) Makefile
48
+ cd nodejs; ./node_modules/.bin/remark ../$(SOURCEPATH ) --no-color -q 1> ../$(BUILD_DIR ) /$(SOURCEFILE ) .fixed
49
49
# # compare temporary file to original, error and fail with message if differences exist
50
50
diff $(SOURCEPATH) $(BUILD_DIR)/$(SOURCEFILE).fixed -u3 || \
51
51
(echo "Error: remark found bad markdown syntax, see output above" && false)
@@ -54,28 +54,28 @@ show-diff: nodejs/node_modules/remark nodejs/remark/.remarkrc $(SOURCEPATH) $(BU
54
54
.PHONY : check-references
55
55
check-references : $(SOURCEPATH ) $(BUILD_DIR ) Makefile
56
56
# # check references unique
57
- rm -f $(BUILD_DIR)/$(SOURCEFILE).uniq
58
- grep -oP '(?<=<a name=")[^\"]+' $(SOURCEPATH) | uniq -d > $(BUILD_DIR)/$(SOURCEFILE).uniq
57
+ @ rm -f $(BUILD_DIR)/$(SOURCEFILE).uniq
58
+ @ grep -oP '(?<=<a name=")[^\"]+' $(SOURCEPATH) | uniq -d > $(BUILD_DIR)/$(SOURCEFILE).uniq
59
59
# # check if output has data
60
- if [ -s "build/CppCoreGuidelines.md.uniq" ]; then echo 'Found duplicate anchors:'; cat $(BUILD_DIR)/$(SOURCEFILE).uniq; false; fi
60
+ @ if [ -s "build/CppCoreGuidelines.md.uniq" ]; then echo 'Found duplicate anchors:'; cat $(BUILD_DIR)/$(SOURCEFILE).uniq; false; fi
61
61
62
62
.PHONY : check-notabs
63
63
check-notabs : $(SOURCEPATH ) $(BUILD_DIR ) Makefile
64
64
# find lines with tabs
65
65
# old file still might be around
66
- rm -f $(BUILD_DIR)/CppCoreGuidelines.md.tabs
66
+ @ rm -f $(BUILD_DIR)/CppCoreGuidelines.md.tabs
67
67
# print file, add line numbers, remove tabs from nl tool, grep for remaining tabs, replace with stars
68
- cat ../CppCoreGuidelines.md | nl -ba | sed -s 's/\(^[^\t]*\)\t/\1--/g' | grep -P '\t' | sed -s 's/\t/\*\*\*\*/g' > $(BUILD_DIR)/CppCoreGuidelines.md.tabs
69
- if [ -s $(BUILD_DIR)/CppCoreGuidelines.md.tabs ]; then echo 'Warning: Tabs found:'; cat $(BUILD_DIR)/CppCoreGuidelines.md.tabs; false; fi;
68
+ @ cat ../CppCoreGuidelines.md | nl -ba | sed -s 's/\(^[^\t]*\)\t/\1--/g' | grep -P '\t' | sed -s 's/\t/\*\*\*\*/g' > $(BUILD_DIR)/CppCoreGuidelines.md.tabs
69
+ @ if [ -s $(BUILD_DIR)/CppCoreGuidelines.md.tabs ]; then echo 'Warning: Tabs found:'; cat $(BUILD_DIR)/CppCoreGuidelines.md.tabs; false; fi;
70
70
71
71
.PHONY : check-badchars
72
72
check-badchars : $(SOURCEPATH ) $(BUILD_DIR ) Makefile
73
73
# find lines with tabs
74
74
# old file still might be around
75
- rm -f $(BUILD_DIR)/CppCoreGuidelines.md.badchars
75
+ @ rm -f $(BUILD_DIR)/CppCoreGuidelines.md.badchars
76
76
# print file, add line numbers, grep for bad chars
77
- cat ../CppCoreGuidelines.md | nl -ba | grep -P '’|‘|”|“|¸|–|…|¦' > $(BUILD_DIR)/CppCoreGuidelines.md.badchars || true
78
- if [ -s $(BUILD_DIR)/CppCoreGuidelines.md.badchars ]; then echo 'Warning: Undesired chars (–’‘“”¸…¦) found, use straight quotes instead:'; cat $(BUILD_DIR)/CppCoreGuidelines.md.badchars; false; fi;
77
+ @ cat ../CppCoreGuidelines.md | nl -ba | grep -P '’|‘|”|“|¸|–|…|¦' > $(BUILD_DIR)/CppCoreGuidelines.md.badchars || true
78
+ @ if [ -s $(BUILD_DIR)/CppCoreGuidelines.md.badchars ]; then echo 'Warning: Undesired chars (–’‘“”¸…¦) found, use straight quotes instead:'; cat $(BUILD_DIR)/CppCoreGuidelines.md.badchars; false; fi;
79
79
80
80
81
81
@@ -88,7 +88,7 @@ cpplint-all: $(BUILD_DIR)/codeblocks $(BUILD_DIR)/Makefile python/Makefile.in
88
88
# ### generic makefile for sourceblocks (need to be evaluated after c++ file generation)
89
89
90
90
$(BUILD_DIR ) /Makefile : python/Makefile.in
91
- cp python/Makefile.in $(BUILD_DIR ) /codeblocks/Makefile
91
+ @ cp python/Makefile.in $(BUILD_DIR ) /codeblocks/Makefile
92
92
93
93
# ### split md file into plain text and code
94
94
@@ -98,7 +98,7 @@ $(BUILD_DIR)/plain.txt: splitfile
98
98
99
99
.PHONY : splitfile
100
100
splitfile : $(SOURCEPATH ) ./python/md-split.py
101
- python ./python/md-split.py $(SOURCEPATH ) $(BUILD_DIR ) /plain.txt $(BUILD_DIR ) /codeblocks
101
+ @ python ./python/md-split.py $(SOURCEPATH ) $(BUILD_DIR ) /plain.txt $(BUILD_DIR ) /codeblocks
102
102
103
103
# ### install npm modules
104
104
# install/update npm dependencies defined in file package.json
0 commit comments