Added 'make man' to Makefile
This commit is contained in:
parent
2ff6ac9768
commit
7596e76a79
8
Makefile
8
Makefile
|
@ -2,6 +2,11 @@ CXXFLAGS=-Wall -Wextra -pedantic -g
|
||||||
CXX=g++
|
CXX=g++
|
||||||
BIN=${DESTDIR}/usr/bin
|
BIN=${DESTDIR}/usr/bin
|
||||||
|
|
||||||
|
# For 'make man': sudo apt-get install xsltproc docbook-xsl docbook-xml
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
###### Object Files
|
###### Object Files
|
||||||
|
|
||||||
|
@ -76,6 +81,9 @@ tools/dmake: tools/dmake.cpp lib/filelister.cpp lib/filelister.h
|
||||||
clean:
|
clean:
|
||||||
rm -f lib/*.o cli/*.o test/*.o testrunner cppcheck tools/dmake
|
rm -f lib/*.o cli/*.o test/*.o testrunner cppcheck tools/dmake
|
||||||
|
|
||||||
|
man: $(MAN_SOURCE)
|
||||||
|
$(XP) $(DB2MAN) $(MAN_SOURCE)
|
||||||
|
|
||||||
install: cppcheck
|
install: cppcheck
|
||||||
install -d ${BIN}
|
install -d ${BIN}
|
||||||
install cppcheck ${BIN}
|
install cppcheck ${BIN}
|
||||||
|
|
|
@ -98,6 +98,10 @@ int main()
|
||||||
fout << "CXXFLAGS=-Wall -Wextra -pedantic -g\n";
|
fout << "CXXFLAGS=-Wall -Wextra -pedantic -g\n";
|
||||||
fout << "CXX=g++\n";
|
fout << "CXX=g++\n";
|
||||||
fout << "BIN=${DESTDIR}/usr/bin\n\n";
|
fout << "BIN=${DESTDIR}/usr/bin\n\n";
|
||||||
|
fout << "# For 'make man': sudo apt-get install xsltproc docbook-xsl docbook-xml\n";
|
||||||
|
fout << "DB2MAN=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl\n";
|
||||||
|
fout << "XP=xsltproc -''-nonet -''-param man.charmap.use.subset \"0\"\n";
|
||||||
|
fout << "MAN_SOURCE=man/cppcheck.1.xml\n\n";
|
||||||
|
|
||||||
fout << "\n###### Object Files\n\n";
|
fout << "\n###### Object Files\n\n";
|
||||||
fout << "LIBOBJ = " << objfile(libfiles[0]);
|
fout << "LIBOBJ = " << objfile(libfiles[0]);
|
||||||
|
@ -127,6 +131,8 @@ int main()
|
||||||
fout << "\t$(CXX) $(CXXFLAGS) -o tools/dmake tools/dmake.cpp lib/filelister.cpp $(LDFLAGS)\n\n";
|
fout << "\t$(CXX) $(CXXFLAGS) -o tools/dmake tools/dmake.cpp lib/filelister.cpp $(LDFLAGS)\n\n";
|
||||||
fout << "clean:\n";
|
fout << "clean:\n";
|
||||||
fout << "\trm -f lib/*.o cli/*.o test/*.o testrunner cppcheck tools/dmake\n\n";
|
fout << "\trm -f lib/*.o cli/*.o test/*.o testrunner cppcheck tools/dmake\n\n";
|
||||||
|
fout << "man:\t$(MAN_SOURCE)\n";
|
||||||
|
fout << "\t$(XP) $(DB2MAN) $(MAN_SOURCE)\n\n";
|
||||||
fout << "install:\tcppcheck\n";
|
fout << "install:\tcppcheck\n";
|
||||||
fout << "\tinstall -d ${BIN}\n";
|
fout << "\tinstall -d ${BIN}\n";
|
||||||
fout << "\tinstall cppcheck ${BIN}\n\n";
|
fout << "\tinstall cppcheck ${BIN}\n\n";
|
||||||
|
|
Loading…
Reference in New Issue