Add validateCFG target to validate library files against RNG

This commit is contained in:
amai 2017-05-24 00:07:59 +02:00
parent 93e0516291
commit cea82c4ee9
2 changed files with 17 additions and 0 deletions

View File

@ -125,6 +125,14 @@ DB2MAN?=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
XP=xsltproc -''-nonet -''-param man.charmap.use.subset "0"
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

View File

@ -346,6 +346,15 @@ int main(int argc, char **argv)
fout << "XP=xsltproc -''-nonet -''-param man.charmap.use.subset \"0\"\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 << "LIBOBJ = " << objfile(libfiles[0]);
for (size_t i = 1; i < libfiles.size(); ++i)