diff options
author | lloyd <[email protected]> | 2011-04-18 15:32:33 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2011-04-18 15:32:33 +0000 |
commit | 590ba658562924d3aba0147690c4110d63b4f4ae (patch) | |
tree | 1348f14553fa8d484f2ba5ebdc58ddf6452d198e /src/build-data/makefile | |
parent | e62da81415097726b2f8689dadbc645de278eeb6 (diff) |
Integrate building docs using Sphinx and Doxygen into the makefile
proper. Enabled using --use-sphinx and --use-doxygen options, both of
which default to false. If Sphinx isn't enabled, the ReST sources are
copied directly (a case where having a very readable source format
comes in handy...)
The reference manual (either Sphinx processed into HTML, or the raw
source) and the Doxygen output (if enabled) are copied into the doc
directory upon install on Unix. Currently not done on Windows, the
install target is fairly bogus there currently, and hasn't been tested
in some time.
Diffstat (limited to 'src/build-data/makefile')
-rw-r--r-- | src/build-data/makefile/nmake.in | 6 | ||||
-rw-r--r-- | src/build-data/makefile/unix.in | 27 | ||||
-rw-r--r-- | src/build-data/makefile/unix_shr.in | 32 |
3 files changed, 35 insertions, 30 deletions
diff --git a/src/build-data/makefile/nmake.in b/src/build-data/makefile/nmake.in index 9ca071da3..3e20d988a 100644 --- a/src/build-data/makefile/nmake.in +++ b/src/build-data/makefile/nmake.in @@ -17,6 +17,7 @@ DESTDIR = %{prefix} ### Aliases for Common Programs AR = %{ar_command} +COPY = copy CD = @cd ECHO = @echo INSTALL = %{install_cmd_exec} @@ -30,8 +31,6 @@ RMDIR = @rmdir ### File Lists CHECK = check -DOCS = %{doc_files} - HEADERS = %{include_files} LIBOBJS = %{lib_objs} @@ -67,6 +66,9 @@ $(BOTAN_LIB): $(LIBOBJS) !Endif ### Fake Targets +docs: +%{build_doc_commands} + clean: $(RM) %{build_dir}\lib\* %{build_dir}\checks\* $(RM) *.manifest *.exp *.dll diff --git a/src/build-data/makefile/unix.in b/src/build-data/makefile/unix.in index ea51c999e..1a1128f81 100644 --- a/src/build-data/makefile/unix.in +++ b/src/build-data/makefile/unix.in @@ -24,6 +24,8 @@ PKGCONFIG = %{botan_pkgconfig} # Aliases for Common Programs AR = %{ar_command} +COPY = cp +COPY_R = cp -r CD = @cd ECHO = @echo INSTALL_CMD_EXEC = %{install_cmd_exec} @@ -38,8 +40,6 @@ RM_R = @rm -rf # File Lists CHECK = %{check_prefix}check -DOCS = %{doc_files} - HEADERS = %{include_files} LIBOBJS = %{lib_objs} @@ -71,12 +71,12 @@ $(STATIC_LIB): $(LIBOBJS) $(RANLIB) $(STATIC_LIB) # Fake Targets -.PHONY = doxygen clean distclean install static +.PHONY = docs clean distclean install static static: $(STATIC_LIB) -doxygen: - doxygen %{build_dir}/botan.doxy +docs: +%{build_doc_commands} clean: $(RM_R) %{build_dir}/lib/* %{build_dir}/checks/* @@ -84,22 +84,23 @@ clean: distclean: clean $(RM_R) %{build_dir} - $(RM_R) %{doc_src_dir}/doxygen %{doc_src_dir}/botan.doxy $(RM) Makefile* $(CONFIG_SCRIPT) $(PKGCONFIG) -install: $(LIBRARIES) +install: $(LIBRARIES) docs $(ECHO) "Installing Botan into $(DESTDIR)... " $(MKDIR_INSTALL) $(DOCDIR) + $(COPY_R) %{doc_output_dir}/* $(DOCDIR) + $(MKDIR_INSTALL) $(HEADERDIR) - $(MKDIR_INSTALL) $(LIBDIR) - $(MKDIR_INSTALL) $(BINDIR) - $(MKDIR_INSTALL) $(PKGCONF_DIR) - for i in $(DOCS); do \ - $(INSTALL_CMD_DATA) $$i $(DOCDIR); \ - done for i in $(HEADERS); do \ $(INSTALL_CMD_DATA) $$i $(HEADERDIR); \ done + + $(MKDIR_INSTALL) $(LIBDIR) $(INSTALL_CMD_DATA) $(STATIC_LIB) $(LIBDIR) + + $(MKDIR_INSTALL) $(BINDIR) $(INSTALL_CMD_EXEC) $(CONFIG_SCRIPT) $(BINDIR) + + $(MKDIR_INSTALL) $(PKGCONF_DIR) $(INSTALL_CMD_DATA) $(PKGCONFIG) $(PKGCONF_DIR) diff --git a/src/build-data/makefile/unix_shr.in b/src/build-data/makefile/unix_shr.in index 06a7c3354..c311d9924 100644 --- a/src/build-data/makefile/unix_shr.in +++ b/src/build-data/makefile/unix_shr.in @@ -26,6 +26,8 @@ PKGCONFIG = %{botan_pkgconfig} # Aliases for Common Programs AR = %{ar_command} +COPY = cp +COPY_R = cp -r CD = @cd ECHO = @echo INSTALL_CMD_EXEC = %{install_cmd_exec} @@ -40,8 +42,6 @@ RM_R = @rm -rf # File Lists CHECK = %{check_prefix}check -DOCS = %{doc_files} - HEADERS = %{include_files} LIBOBJS = %{lib_objs} @@ -83,14 +83,14 @@ $(SHARED_LIB): $(LIBOBJS) $(LN) $(SHARED_LIB) $(SYMLINK) # Fake Targets -.PHONY = doxygen clean distclean install static shared +.PHONY = docs clean distclean install static shared static: $(STATIC_LIB) shared: $(SHARED_LIB) -doxygen: - doxygen %{build_dir}/botan.doxy +docs: +%{build_doc_commands} clean: $(RM_R) %{build_dir}/lib/* %{build_dir}/checks/* @@ -98,24 +98,26 @@ clean: distclean: clean $(RM_R) %{build_dir} - $(RM_R) %{doc_src_dir}/doxygen %{doc_src_dir}/botan.doxy $(RM) Makefile* $(CONFIG_SCRIPT) $(PKGCONFIG) -install: $(LIBRARIES) +install: $(LIBRARIES) docs $(ECHO) "Installing Botan into $(DESTDIR)... " $(MKDIR_INSTALL) $(DOCDIR) + $(COPY_R) %{doc_output_dir}/* $(DOCDIR) + $(MKDIR_INSTALL) $(HEADERDIR) - $(MKDIR_INSTALL) $(LIBDIR) - $(MKDIR_INSTALL) $(BINDIR) - $(MKDIR_INSTALL) $(PKGCONF_DIR) - for i in $(DOCS); do \ - $(INSTALL_CMD_DATA) $$i $(DOCDIR); \ - done for i in $(HEADERS); do \ $(INSTALL_CMD_DATA) $$i $(HEADERDIR); \ done + + $(MKDIR_INSTALL) $(LIBDIR) $(INSTALL_CMD_DATA) $(STATIC_LIB) $(LIBDIR) - $(INSTALL_CMD_EXEC) $(CONFIG_SCRIPT) $(BINDIR) $(INSTALL_CMD_EXEC) $(SHARED_LIB) $(LIBDIR) - $(INSTALL_CMD_DATA) $(PKGCONFIG) $(PKGCONF_DIR) $(CD) $(LIBDIR); $(LN) $(SHARED_LIB) $(SYMLINK) + $(CD) $(LIBDIR); $(LN) $(SHARED_LIB) $(SONAME) + + $(MKDIR_INSTALL) $(BINDIR) + $(INSTALL_CMD_EXEC) $(CONFIG_SCRIPT) $(BINDIR) + + $(MKDIR_INSTALL) $(PKGCONF_DIR) + $(INSTALL_CMD_DATA) $(PKGCONFIG) $(PKGCONF_DIR) |