From: <man...@us...> - 2013-12-08 13:37:21
|
Revision: 3414 http://sourceforge.net/p/modplug/code/3414 Author: manxorist Date: 2013-12-08 13:37:09 +0000 (Sun, 08 Dec 2013) Log Message: ----------- [Imp] libopenmpt build: Build openmpt123 man page using help2man. [Imp] libopenmpt build: Include docs (as far as available) in make install. Modified Paths: -------------- trunk/OpenMPT/Makefile trunk/OpenMPT/libopenmpt/Doxyfile-c trunk/OpenMPT/libopenmpt/Doxyfile-cpp Modified: trunk/OpenMPT/Makefile =================================================================== --- trunk/OpenMPT/Makefile 2013-12-08 11:37:18 UTC (rev 3413) +++ trunk/OpenMPT/Makefile 2013-12-08 13:37:09 UTC (rev 3414) @@ -76,11 +76,15 @@ RM = del /q /f INSTALL = echo install +INSTALL_MAKE_DIR echo install +INSTALL_DIR = echo install else RM = rm -f INSTALL = install +INSTALL_MAKE_DIR = install -d +INSTALL_DIR = cp -r -v endif @@ -90,6 +94,8 @@ INSTALL_PROGRAM = $(INSTALL) -m 0755 -D INSTALL_DATA = $(INSTALL) -m 0644 -D +INSTALL_DATA_DIR = $(INSTALL_DIR) +INSTALL_MAKE_DIR += -m 0755 CPPFLAGS += -Icommon -I. -Iinclude/modplug/include -Iinclude CXXFLAGS += -fvisibility=hidden @@ -122,6 +128,14 @@ #CXXFLAGS += -mtune=generic #CFLAGS += -mtune=generic +ifeq ($(shell help2man --version > /dev/null 2>&1 && echo yes ),yes) +MPT_WITH_HELP2MAN := 1 +endif + +ifeq ($(shell doxygen --version > /dev/null 2>&1 && echo yes ),yes) +MPT_WITH_DOXYGEN := 1 +endif + ifeq ($(NO_ZLIB),1) CPPFLAGS_ZLIB := -DNO_ZLIB else @@ -318,7 +332,10 @@ endif ifeq ($(OPENMPT123),1) OUTPUTS += bin/openmpt123$(EXESUFFIX) +ifeq ($(MPT_WITH_HELP2MAN),1) +OUTPUTS += bin/openmpt123.1 endif +endif ifeq ($(NO_PORTAUDIO),1) else ifeq ($(EXAMPLES),1) @@ -331,9 +348,37 @@ OUTPUTS += bin/libopenmpt_test$(EXESUFFIX) endif OUTPUTS += bin/libopenmpt.pc +ifeq ($(MPT_WITH_DOXYGEN),1) +OUTPUTS += docs +endif +MISC_OUTPUTS += libopenmpt.so +MISC_OUTPUTS += bin/.docs +MISC_OUTPUTS += bin/dist.tar +MISC_OUTPUTS += bin/svn_version_dist.h +MISC_OUTPUTS += bin/libopenmpt_test$(EXESUFFIX) + +MISC_OUTPUTDIRS += bin/dest +MISC_OUTPUTDIRS += bin/dist +MISC_OUTPUTDIRS += bin/dist-zip +MISC_OUTPUTDIRS += bin/docs + + + + all: $(OUTPUTS) +.PHONY: docs +docs: bin/.docs + +bin/.docs: + $(VERYSILENT)mkdir -p bin/docs + $(INFO) [DOXYGEN] C + $(SILENT)doxygen libopenmpt/Doxyfile-c + $(INFO) [DOXYGEN] C++ + $(SILENT)doxygen libopenmpt/Doxyfile-cpp + $(VERYSILENT)touch $@ + .PHONY: test test: bin/libopenmpt_test$(EXESUFFIX) bin/libopenmpt_test$(EXESUFFIX) @@ -377,14 +422,36 @@ endif ifeq ($(OPENMPT123),1) $(INSTALL_PROGRAM) bin/openmpt123$(EXESUFFIX).norpath $(DESTDIR)$(PREFIX)/bin/openmpt123$(EXESUFFIX) +ifeq ($(MPT_WITH_HELP2MAN),1) + $(INSTALL_DATA) bin/openmpt123.1 $(DESTDIR)$(PREFIX)/share/man/man.1/openmpt123.1 endif +endif + $(INSTALL_DATA) LICENSE $(DESTDIR)$(PREFIX)/share/doc/libopenmpt/LICENSE + $(INSTALL_DATA) README $(DESTDIR)$(PREFIX)/share/doc/libopenmpt/README + $(INSTALL_DATA) TODO $(DESTDIR)$(PREFIX)/share/doc/libopenmpt/TODO + $(INSTALL_DATA) libopenmpt/examples/libopenmpt_example_c.c $(DESTDIR)$(PREFIX)/share/doc/libopenmpt/examples/libopenmpt_example_c.c + $(INSTALL_DATA) libopenmpt/examples/libopenmpt_example_c_mem.c $(DESTDIR)$(PREFIX)/share/doc/libopenmpt/examples/libopenmpt_example_c_mem.c + $(INSTALL_DATA) libopenmpt/examples/libopenmpt_example_cxx.cpp $(DESTDIR)$(PREFIX)/share/doc/libopenmpt/examples/libopenmpt_example_cxx.cpp +ifeq ($(MPT_WITH_DOXYGEN),1) + $(INSTALL_MAKE_DIR) $(DESTDIR)$(PREFIX)/share/doc/man/ + #$(INSTALL_DATA_DIR) bin/docs/c/man $(DESTDIR)$(PREFIX)/share/doc/man + #$(INSTALL_DATA_DIR) bin/docs/cpp/man $(DESTDIR)$(PREFIX)/share/doc/man +endif .PHONY: dist dist: bin/dist.tar -bin/dist.tar: bin/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar.gz +bin/dist.tar: bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar.gz rm -rf bin/dist.tar + cd bin/ && cp dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip ./ + cd bin/ && cp dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip ./ + cd bin/ && cp dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar ./ + cd bin/ && cp dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar.gz ./ cd bin/ && tar cvf dist.tar OpenMPT-src-$(DIST_OPENMPT_VERSION).zip libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar.gz + rm bin/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip + rm bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip + rm bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar + rm bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar.gz .PHONY: bin/svn_version_dist.h bin/svn_version_dist.h: @@ -396,8 +463,8 @@ echo '#include "../svn_version_svnversion/svn_version.h"' >> $@.tmp mv $@.tmp $@ -.PHONY: bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar -bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar: bin/svn_version_dist.h +.PHONY: bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar +bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar: bin/svn_version_dist.h mkdir -p bin/dist rm -rf bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION) mkdir -p bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION) @@ -416,10 +483,10 @@ svn export ./include/miniz bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include/miniz svn export ./include/modplug bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include/modplug cp bin/svn_version_dist.h bin/dist/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/common/svn_version_default/svn_version.h - cd bin/dist/ && tar cv libopenmpt-src-$(DIST_LIBOPENMPT_VERSION) > ../libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar + cd bin/dist/ && tar cv libopenmpt-src-$(DIST_LIBOPENMPT_VERSION) > libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).tar -.PHONY: bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip -bin/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip: bin/svn_version_dist.h +.PHONY: bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip +bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip: bin/svn_version_dist.h mkdir -p bin/dist-zip rm -rf bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION) mkdir -p bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION) @@ -443,15 +510,15 @@ svn export ./include/winamp bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include/winamp --native-eol CRLF svn export ./include/xmplay bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/include/xmplay --native-eol CRLF cp bin/svn_version_dist.h bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/common/svn_version_default/svn_version.h - cd bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/ && zip -r ../../libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip --compression-method deflate -9 * + cd bin/dist-zip/libopenmpt-src-$(DIST_LIBOPENMPT_VERSION)/ && zip -r ../libopenmpt-src-$(DIST_LIBOPENMPT_VERSION).zip --compression-method deflate -9 * -.PHONY: bin/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip -bin/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip: bin/svn_version_dist.h +.PHONY: bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip +bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION).zip: bin/svn_version_dist.h mkdir -p bin/dist-zip rm -rf bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION) svn export ./ bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION)/ --native-eol CRLF cp bin/svn_version_dist.h bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION)/common/svn_version_default/svn_version.h - cd bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION)/ && zip -r ../../OpenMPT-src-$(DIST_OPENMPT_VERSION).zip --compression-method deflate -9 * + cd bin/dist-zip/OpenMPT-src-$(DIST_OPENMPT_VERSION)/ && zip -r ../OpenMPT-src-$(DIST_OPENMPT_VERSION).zip --compression-method deflate -9 * bin/openmpt.a: $(LIBOPENMPT_OBJECTS) $(INFO) [AR ] $@ @@ -465,6 +532,10 @@ $(INFO) [LD ] $@ $(SILENT)$(LINK.cc) -shared $(LDFLAGS_LIBOPENMPT) $^ $(LOADLIBES) $(LDLIBS) $(LDLIBS_LIBOPENMPT) -o $@ +bin/openmpt123.1: bin/openmpt123$(EXESUFFIX) + $(INFO) [HELP2MAN] $@ + $(SILENT)help2man --no-discard-stderr --no-info $< > $@ + openmpt123/openmpt123.o: openmpt123/openmpt123.cpp $(INFO) [CXX] $< $(VERYSILENT)$(CXX) $(CXXFLAGS) $(CXXFLAGS_OPENMPT123) $(CPPFLAGS) $(CPPFLAGS_OPENMPT123) $(TARGET_ARCH) -M -MT$@ $< > $*.d @@ -526,6 +597,6 @@ else clean: $(INFO) clean ... - $(SILENT)$(RM) $(OUTPUTS) $(ALL_OBJECTS) $(ALL_DEPENDS) libopenmpt.so - $(SILENT)$(RM) -rf bin/dest + $(SILENT)$(RM) $(OUTPUTS) $(ALL_OBJECTS) $(ALL_DEPENDS) $(MISC_OUTPUTS) + $(SILENT)$(RM) -rf $(MISC_OUTPUTDIRS) endif Modified: trunk/OpenMPT/libopenmpt/Doxyfile-c =================================================================== --- trunk/OpenMPT/libopenmpt/Doxyfile-c 2013-12-08 11:37:18 UTC (rev 3413) +++ trunk/OpenMPT/libopenmpt/Doxyfile-c 2013-12-08 13:37:09 UTC (rev 3414) @@ -52,7 +52,7 @@ # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = docs/c +OUTPUT_DIRECTORY = bin/docs/c # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output @@ -544,7 +544,7 @@ # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. -SHOW_DIRECTORIES = NO +SHOW_DIRECTORIES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. # This will remove the Files entry from the Quick Index and from the @@ -595,7 +595,7 @@ # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. -QUIET = NO +QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank @@ -648,7 +648,13 @@ # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = libopenmpt.h libopenmpt_stream_callbacks_fd.h libopenmpt_stream_callbacks_file.h +INPUT = \ + libopenmpt/libopenmpt.h \ + libopenmpt/libopenmpt_config.h \ + libopenmpt/libopenmpt_version.h \ + libopenmpt/libopenmpt_stream_callbacks_fd.h \ + libopenmpt/libopenmpt_stream_callbacks_file.h \ + # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is @@ -858,7 +864,7 @@ # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. -HTML_OUTPUT = . +HTML_OUTPUT = # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank @@ -1351,7 +1357,7 @@ # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages -GENERATE_MAN = NO +GENERATE_MAN = YES # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be @@ -1370,7 +1376,7 @@ # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. -MAN_LINKS = NO +MAN_LINKS = YES #--------------------------------------------------------------------------- # configuration options related to the XML output Modified: trunk/OpenMPT/libopenmpt/Doxyfile-cpp =================================================================== --- trunk/OpenMPT/libopenmpt/Doxyfile-cpp 2013-12-08 11:37:18 UTC (rev 3413) +++ trunk/OpenMPT/libopenmpt/Doxyfile-cpp 2013-12-08 13:37:09 UTC (rev 3414) @@ -52,7 +52,7 @@ # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = docs/cpp +OUTPUT_DIRECTORY = bin/docs/cpp # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output @@ -595,7 +595,7 @@ # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. -QUIET = NO +QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank @@ -648,7 +648,11 @@ # directories like "/usr/src/myproject". Separate the files or directories # with spaces. -INPUT = libopenmpt.hpp +INPUT = \ + libopenmpt/libopenmpt.hpp \ + libopenmpt/libopenmpt_config.h \ + libopenmpt/libopenmpt_version.h \ + # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is @@ -858,7 +862,7 @@ # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. -HTML_OUTPUT = . +HTML_OUTPUT = # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank @@ -1351,7 +1355,7 @@ # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages -GENERATE_MAN = NO +GENERATE_MAN = YES # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be @@ -1370,7 +1374,7 @@ # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. -MAN_LINKS = NO +MAN_LINKS = YES #--------------------------------------------------------------------------- # configuration options related to the XML output This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |