aboutsummaryrefslogtreecommitdiffstats
path: root/src/build-data
diff options
context:
space:
mode:
Diffstat (limited to 'src/build-data')
-rw-r--r--src/build-data/botan.doxy.in2
-rw-r--r--src/build-data/makefile/commands.in14
-rw-r--r--src/build-data/makefile/dso.in (renamed from src/build-data/makefile/shared.in)2
-rw-r--r--src/build-data/makefile/gmake.in89
-rw-r--r--src/build-data/makefile/header.in32
-rw-r--r--src/build-data/makefile/nmake.in40
6 files changed, 94 insertions, 85 deletions
diff --git a/src/build-data/botan.doxy.in b/src/build-data/botan.doxy.in
index 63eaa7e15..49d18fe7c 100644
--- a/src/build-data/botan.doxy.in
+++ b/src/build-data/botan.doxy.in
@@ -78,7 +78,7 @@ WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
-INPUT = lib
+INPUT = src/lib
INPUT_ENCODING = UTF-8
FILE_PATTERNS =
RECURSIVE = YES
diff --git a/src/build-data/makefile/commands.in b/src/build-data/makefile/commands.in
new file mode 100644
index 000000000..33c6634c3
--- /dev/null
+++ b/src/build-data/makefile/commands.in
@@ -0,0 +1,14 @@
+# Program aliases
+AR = %{ar_command}
+COPY = cp
+COPY_R = cp -r
+CD = @cd
+ECHO = @echo
+INSTALL_CMD_EXEC = %{install_cmd_exec}
+INSTALL_CMD_DATA = %{install_cmd_data}
+LN = ln -fs
+MKDIR = @mkdir
+MKDIR_INSTALL = @umask 022; mkdir -p -m 755
+RANLIB = %{ranlib_command}
+RM = @rm -f
+RM_R = @rm -rf
diff --git a/src/build-data/makefile/shared.in b/src/build-data/makefile/dso.in
index f4116cce4..7e9829fff 100644
--- a/src/build-data/makefile/shared.in
+++ b/src/build-data/makefile/dso.in
@@ -3,7 +3,7 @@ SHARED_LIB = $(SONAME).%{version_patch}
SYMLINK = $(LIBNAME)-$(BRANCH).%{so_suffix}
$(SHARED_LIB): $(LIBOBJS)
- %{so_link} $(LDFLAGS) $(LIBOBJS) $(LIB_LINKS_TO) -o $(SHARED_LIB)
+ $(LIB_LINK_CMD) $(LDFLAGS) $(LIBOBJS) $(LIB_LINKS_TO) -o $(SHARED_LIB)
$(LN) $(SHARED_LIB) $(SONAME)
$(LN) $(SHARED_LIB) $(SYMLINK)
diff --git a/src/build-data/makefile/gmake.in b/src/build-data/makefile/gmake.in
index 2bdf34e4a..60520cd5f 100644
--- a/src/build-data/makefile/gmake.in
+++ b/src/build-data/makefile/gmake.in
@@ -1,48 +1,6 @@
-# Compiler Options
-CXX = %{cc}
-LIB_OPT = %{lib_opt}
-APP_OPT = %{app_opt}
-LANG_FLAGS = %{lang_flags}
-WARN_FLAGS = %{warn_flags}
-SO_OBJ_FLAGS = %{shared_flags}
-LIB_LINKS_TO = %{link_to}
-APP_LINKS_TO = $(LIB_LINKS_TO) -lboost_thread
-TEST_LINKS_TO = $(LIB_LINKS_TO) -lboost_filesystem
-
-LIB_FLAGS = $(SO_OBJ_FLAGS) $(LANG_FLAGS) $(LIB_OPT) $(WARN_FLAGS)
-APP_FLAGS = $(LANG_FLAGS) $(APP_OPT) $(WARN_FLAGS)
-TEST_FLAGS = $(LANG_FLAGS) $(APP_OPT) $(WARN_FLAGS)
-
-# Version Numbers
-VERSION = %{version}
-BRANCH = %{version_major}.%{version_minor}
-
-# Installation Settings
-DESTDIR = %{prefix}
-
-BINDIR = $(DESTDIR)/bin
-LIBDIR = $(DESTDIR)/%{libdir}
-HEADERDIR = $(DESTDIR)/%{includedir}/botan-$(BRANCH)/botan
-DOCDIR = $(DESTDIR)/%{docdir}/botan-$(VERSION)
-PKGCONF_DIR = $(LIBDIR)/pkgconfig
-
-CONFIG_SCRIPT = %{botan_config}
-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}
-INSTALL_CMD_DATA = %{install_cmd_data}
-LN = ln -fs
-MKDIR = @mkdir
-MKDIR_INSTALL = @umask 022; mkdir -p -m 755
-RANLIB = %{ranlib_command}
-RM = @rm -f
-RM_R = @rm -rf
+%{header_in}
+
+%{commands_in}
# Targets
APP = %{app_prefix}botan
@@ -57,13 +15,13 @@ LIBPATH = botan-$(BRANCH)
all: $(APP) $(TEST)
# File Lists
-INCLUDE_DIR = %{botan_include_dir}
+INCLUDE_DIR = %{botan_include_dir}
LIBOBJS = %{lib_objs}
-APPOBJS = %{app_objs}
+APPOBJS = %{app_objs}
-TESTOBJS = %{test_objs}
+TESTOBJS = %{test_objs}
# Build Commands
%{lib_build_cmds}
@@ -73,7 +31,7 @@ TESTOBJS = %{test_objs}
%{test_build_cmds}
# Link Commands
-%{shared_makefile}
+%{dso_in}
$(APP): $(LIBRARIES) $(APPOBJS)
$(CXX) $(LDFLAGS) $(APPOBJS) -L. -l$(LIBPATH) $(APP_LINKS_TO) -o $(APP)
@@ -86,16 +44,19 @@ $(STATIC_LIB): $(LIBOBJS)
$(AR) $(STATIC_LIB) $(LIBOBJS)
$(RANLIB) $(STATIC_LIB)
-%{python_makefile}
+%{python_in}
# Fake Targets
-.PHONY = docs clean distclean install
+.PHONY = clean distclean docs website install
-docs:
-%{build_doc_commands}
+SPHINX_CONFIG = %{sphinx_config_dir}
+SPHINX_OPTS = -b html
+
+WEBSITE_DIR=%{doc_output_dir}/website
+WEBSITE_SRC_DIR=%{doc_output_dir}/website-src
clean:
- $(RM_R) %{build_dir}/lib/* %{build_dir}/tests/*
+ $(RM_R) %{build_dir}/obj
$(RM) $(LIBRARIES) $(SYMLINK) $(SONAME) $(APP) $(TEST)
distclean: clean
@@ -103,6 +64,9 @@ distclean: clean
$(RM) Makefile* $(CONFIG_SCRIPT) $(PKGCONFIG)
$(RM) botan_all.cpp botan_all.h
+docs:
+%{build_doc_commands}
+
install: $(LIBRARIES) docs
$(MKDIR_INSTALL) $(DOCDIR)
$(COPY_R) %{doc_output_dir}/* $(DOCDIR)
@@ -115,14 +79,27 @@ install: $(LIBRARIES) docs
$(MKDIR_INSTALL) $(LIBDIR)
$(INSTALL_CMD_DATA) $(STATIC_LIB) $(LIBDIR)
- ifdef $(SHARED_LIB)
+ifneq ($(SHARED_LIB),)
$(INSTALL_CMD_EXEC) $(SHARED_LIB) $(LIBDIR)
$(CD) $(LIBDIR); $(LN) $(SHARED_LIB) $(SYMLINK)
$(CD) $(LIBDIR); $(LN) $(SHARED_LIB) $(SONAME)
- endif
+endif
$(MKDIR_INSTALL) $(BINDIR)
$(INSTALL_CMD_EXEC) $(CONFIG_SCRIPT) $(BINDIR)
$(MKDIR_INSTALL) $(PKGCONF_DIR)
$(INSTALL_CMD_DATA) $(PKGCONFIG) $(PKGCONF_DIR)
+
+website:
+ rm -rf $(WEBSITE_SRC_DIR)
+ mkdir -p $(WEBSITE_SRC_DIR)
+ cp -r %{doc_dir}/*.rst %{doc_dir}/relnotes %{doc_dir}/website/*.rst $(WEBSITE_SRC_DIR)
+ sphinx-build -q -c $(SPHINX_CONFIG) -b html $(WEBSITE_SRC_DIR) $(WEBSITE_DIR)
+ sphinx-build -q -c $(SPHINX_CONFIG) -b html %{doc_dir}/manual $(WEBSITE_DIR)/manual
+ rm -rf $(WEBSITE_DIR)/.doctrees
+ rm -rf $(WEBSITE_DIR)/manual/.doctrees
+ rm -f $(WEBSITE_DIR)/.buildinfo
+ rm -f $(WEBSITE_DIR)/manual/.buildinfo
+ doxygen %{build_dir}/botan.doxy
+ mv %{doc_output_dir}/doxygen $(WEBSITE_DIR)/doxygen
diff --git a/src/build-data/makefile/header.in b/src/build-data/makefile/header.in
new file mode 100644
index 000000000..dfd02aa35
--- /dev/null
+++ b/src/build-data/makefile/header.in
@@ -0,0 +1,32 @@
+# Compiler Options
+CXX = %{cc}
+LIB_OPT = %{lib_opt}
+APP_OPT = %{app_opt}
+LANG_FLAGS = %{lang_flags}
+WARN_FLAGS = %{warn_flags}
+SO_OBJ_FLAGS = %{shared_flags}
+
+LIB_LINK_CMD = %{so_link}
+
+LIB_LINKS_TO = %{link_to}
+APP_LINKS_TO = $(LIB_LINKS_TO)
+TEST_LINKS_TO = $(LIB_LINKS_TO) -lboost_filesystem
+
+LIB_FLAGS = $(SO_OBJ_FLAGS) $(LANG_FLAGS) $(LIB_OPT) $(WARN_FLAGS)
+APP_FLAGS = $(LANG_FLAGS) $(APP_OPT) $(WARN_FLAGS)
+TEST_FLAGS = $(LANG_FLAGS) $(APP_OPT) $(WARN_FLAGS)
+
+# Version Numbers
+VERSION = %{version}
+BRANCH = %{version_major}.%{version_minor}
+
+# Installation Settings
+DESTDIR = %{prefix}
+BINDIR = $(DESTDIR)/bin
+LIBDIR = $(DESTDIR)/%{libdir}
+HEADERIR = $(DESTDIR)/%{includedir}/botan-$(BRANCH)/botan
+DOCDIR = $(DESTDIR)/%{docdir}/botan-$(VERSION)
+PKGCONF_DIR = $(LIBDIR)/pkgconfig
+
+CONFIG_SCRIPT = %{botan_config}
+PKGCONFIG = %{botan_pkgconfig}
diff --git a/src/build-data/makefile/nmake.in b/src/build-data/makefile/nmake.in
index 1ebba3c9f..9a248117b 100644
--- a/src/build-data/makefile/nmake.in
+++ b/src/build-data/makefile/nmake.in
@@ -1,23 +1,4 @@
-### Compiler Options
-CXX = %{cc}
-LIB_OPT = %{lib_opt}
-APP_OPT = %{app_opt}
-LANG_FLAGS = %{lang_flags}
-WARN_FLAGS = %{warn_flags}
-SO_OBJ_FLAGS = %{shared_flags}
-LIB_LINK_CMD = %{so_link}
-APP_LINKS_TO = $(LIB_LINKS_TO) -lboost_thread
-TEST_LINKS_TO = $(LIB_LINKS_TO) -lboost_filesystem
-
-LIB_FLAGS = $(LIB_OPT) $(LANG_FLAGS) $(WARN_FLAGS) $(SO_OBJ_FLAGS)
-APP_FLAGS = $(APP_OPT) $(LANG_FLAGS) $(WARN_FLAGS)
-TEST_FLAGS = $(APP_OPT) $(LANG_FLAGS) $(WARN_FLAGS)
-
-### Version Numbers
-VERSION = %{version}
-
-### Installation Settings
-DESTDIR = %{prefix}
+%{header_in}
### Aliases for Common Programs
AR = %{ar_command}
@@ -33,8 +14,8 @@ RM_R = $(RM) /S
RMDIR = @rmdir
### File Lists
-APP = botan
-TEST = botan-test
+APP = %{app_prefix}botan
+TEST = %{app_prefix}botan-test
LIBOBJS = %{lib_objs}
@@ -51,14 +32,14 @@ BOTAN_LIB = $(LIBNAME).%{static_suffix}
all: $(APP) $(TEST)
-### Build Commands
+# Build Commands
%{lib_build_cmds}
%{app_build_cmds}
%{test_build_cmds}
-### Link Commands
+# Link Commands
$(APP): $(LIBRARIES) $(APPOBJS)
$(CXX) /Fe$@ $(APPOBJS) $(BOTAN_LIB) $(LINK_TO)
@@ -72,7 +53,13 @@ $(BOTAN_LIB): $(LIBOBJS)
$(LIB_LINK_CMD) /Fe$(LIBNAME) $(LIBOBJS) $(LINK_TO)
!Endif
-### Fake Targets
+%{python_in}
+
+# Fake Targets
+
+SPHINX_CONFIG = %{sphinx_config_dir}
+SPHINX_OPTS = -b html
+
docs:
%{build_doc_commands}
@@ -90,8 +77,7 @@ distclean: clean
$(RMDIR) %{build_dir}
$(RM) Makefile $(LIBNAME).* $(APP).*
-### Install Commands
-install: $(LIBRARIES)
+install: $(LIBRARIES) docs
-$(MKDIR) $(DESTDIR)\include\botan
$(INSTALL_CMD) botan.* $(DESTDIR)
$(INSTALL_CMD) build\include\botan\*.h $(DESTDIR)\include\botan