Add validateCFG target to validate library files against RNG
This commit is contained in:
parent
93e0516291
commit
cea82c4ee9
8
Makefile
8
Makefile
|
@ -125,6 +125,14 @@ DB2MAN?=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
|
||||||
XP=xsltproc -''-nonet -''-param man.charmap.use.subset "0"
|
XP=xsltproc -''-nonet -''-param man.charmap.use.subset "0"
|
||||||
MAN_SOURCE=man/cppcheck.1.xml
|
MAN_SOURCE=man/cppcheck.1.xml
|
||||||
|
|
||||||
|
Validation of library files:
|
||||||
|
ConfigFiles := $(wildcard cfg/*.cfg)
|
||||||
|
ConfigFilesCHECKED := $(patsubst %.cfg,%.checked,$(ConfigFiles))
|
||||||
|
.PHONY: validateCFG
|
||||||
|
%.checked:%.cfg
|
||||||
|
xmllint --noout --relaxng cfg/cppcheck-cfg.rng $<
|
||||||
|
validateCFG: ${ConfigFilesCHECKED}
|
||||||
|
|
||||||
|
|
||||||
###### Object Files
|
###### Object Files
|
||||||
|
|
||||||
|
|
|
@ -346,6 +346,15 @@ int main(int argc, char **argv)
|
||||||
fout << "XP=xsltproc -''-nonet -''-param man.charmap.use.subset \"0\"\n";
|
fout << "XP=xsltproc -''-nonet -''-param man.charmap.use.subset \"0\"\n";
|
||||||
fout << "MAN_SOURCE=man/cppcheck.1.xml\n\n";
|
fout << "MAN_SOURCE=man/cppcheck.1.xml\n\n";
|
||||||
|
|
||||||
|
fout << "Validation of library files:\n";
|
||||||
|
fout << "ConfigFiles := $(wildcard cfg/*.cfg)\n";
|
||||||
|
fout << "ConfigFilesCHECKED := $(patsubst %.cfg,%.checked,$(ConfigFiles))\n";
|
||||||
|
fout << ".PHONY: validateCFG\n";
|
||||||
|
fout << "%.checked:%.cfg\n";
|
||||||
|
fout << "\txmllint --noout --relaxng cfg/cppcheck-cfg.rng $<\n";
|
||||||
|
fout << "validateCFG: ${ConfigFilesCHECKED}\n\n";
|
||||||
|
|
||||||
|
|
||||||
fout << "\n###### Object Files\n\n";
|
fout << "\n###### Object Files\n\n";
|
||||||
fout << "LIBOBJ = " << objfile(libfiles[0]);
|
fout << "LIBOBJ = " << objfile(libfiles[0]);
|
||||||
for (size_t i = 1; i < libfiles.size(); ++i)
|
for (size_t i = 1; i < libfiles.size(); ++i)
|
||||||
|
|
Loading…
Reference in New Issue