aboutsummaryrefslogtreecommitdiffstats
path: root/src/build-data/makefile
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-07-01 21:59:19 +0000
committerlloyd <[email protected]>2009-07-01 21:59:19 +0000
commit21308960d04c28e90ee63485b4d95636f4fe9240 (patch)
tree10fff059d3ad0127f20f61001dce1c6be808ada1 /src/build-data/makefile
parent461602d1d2662cdad9f898bc350d9074b267cc6a (diff)
Change the makefile template language somewhat. Previously variables
had been denoted with @{var:NAME}, this has changed to %{NAME}. This is pretty much a wash for configure.pl but it makes it much easier to process the templates using Python's string.Template. The logic being the 'var:' prefix had been to support conditional statements in the templates (using an 'if:' prefix), but this functionality was not being used and support for it is removed from configure.pl in this revision. For a similiar reason, rename a number of template variables with hyphens in their name to use underscores instead. This is slightly more consistent anyway (since many variable names had already used _ instead of -) but more importantly makes them much easier to deal with using aforementioned Python template code. This should not result in any user-visible change (unless I messed up).
Diffstat (limited to 'src/build-data/makefile')
-rw-r--r--src/build-data/makefile/nmake.in60
-rw-r--r--src/build-data/makefile/unix.in60
-rw-r--r--src/build-data/makefile/unix_shr.in74
3 files changed, 97 insertions, 97 deletions
diff --git a/src/build-data/makefile/nmake.in b/src/build-data/makefile/nmake.in
index b730beab1..b1e651551 100644
--- a/src/build-data/makefile/nmake.in
+++ b/src/build-data/makefile/nmake.in
@@ -1,40 +1,40 @@
##################################################
# Compiler Options #
##################################################
-CXX = @{var:cc}
-LIB_OPT = @{var:lib_opt}
-CHECK_OPT = @{var:check_opt}
-MACH_OPT = @{var:mach_opt}
-LANG_FLAGS = @{var:lang_flags}
-WARN_FLAGS = @{var:warn_flags}
-LINK_TO = @{var:link_to}
+CXX = %{cc}
+LIB_OPT = %{lib_opt}
+CHECK_OPT = %{check_opt}
+MACH_OPT = %{mach_opt}
+LANG_FLAGS = %{lang_flags}
+WARN_FLAGS = %{warn_flags}
+LINK_TO = %{link_to}
##################################################
# Version Numbers #
##################################################
-MAJOR = @{var:version_major}
-MINOR = @{var:version_minor}
-PATCH = @{var:version_patch}
+MAJOR = %{version_major}
+MINOR = %{version_minor}
+PATCH = %{version_patch}
VERSION = $(MAJOR).$(MINOR).$(PATCH)
##################################################
# Installation Settings #
##################################################
-DESTDIR = @{var:prefix}
+DESTDIR = %{prefix}
-LIBDIR = $(DESTDIR)\@{var:libdir}
-HEADERDIR = $(DESTDIR)\@{var:includedir}\botan
-DOCDIR = $(DESTDIR)\@{var:docdir}\Botan-$(VERSION)
+LIBDIR = $(DESTDIR)\%{libdir}
+HEADERDIR = $(DESTDIR)\%{includedir}\botan
+DOCDIR = $(DESTDIR)\%{docdir}\Botan-$(VERSION)
##################################################
# Aliases for Common Programs #
##################################################
-AR = @{var:ar_command}
+AR = %{ar_command}
CD = @cd
ECHO = @echo
-INSTALL = @{var:install_cmd_exec}
-INSTALL_CMD = @{var:install_cmd_exec}
+INSTALL = %{install_cmd_exec}
+INSTALL_CMD = %{install_cmd_exec}
MKDIR = @md
MKDIR_INSTALL = @md
RM = @del /Q
@@ -45,13 +45,13 @@ RMDIR = @rmdir
##################################################
CHECK = check
-DOCS = @{var:doc_files}
+DOCS = %{doc_files}
-HEADERS = @{var:include_files}
+HEADERS = %{include_files}
-LIBOBJS = @{var:lib_objs}
+LIBOBJS = %{lib_objs}
-CHECKOBJS = @{var:check_objs}
+CHECKOBJS = %{check_objs}
LIB_FLAGS = $(LIB_OPT) $(MACH_OPT) $(LANG_FLAGS) $(WARN_FLAGS)
CHECK_FLAGS = $(CHECK_OPT) $(LANG_FLAGS) $(WARN_FLAGS)
@@ -59,16 +59,16 @@ CHECK_FLAGS = $(CHECK_OPT) $(LANG_FLAGS) $(WARN_FLAGS)
LIBRARIES = $(STATIC_LIB)
LIBNAME = libbotan
-STATIC_LIB = $(LIBNAME).@{var:static_suffix}
+STATIC_LIB = $(LIBNAME).%{static_suffix}
all: $(LIBRARIES)
##################################################
# Build Commands #
##################################################
-@{var:lib_build_cmds}
+%{lib_build_cmds}
-@{var:check_build_cmds}
+%{check_build_cmds}
##################################################
# Link Commands #
@@ -93,15 +93,15 @@ static: $(STATIC_LIB)
# Fake Targets #
##################################################
clean:
- $(RM) @{var:build-dir}\lib\* @{var:build-dir}\checks\*
+ $(RM) %{build-dir}\lib\* %{build-dir}\checks\*
$(RM) $(LIBRARIES) $(CHECK)
distclean: clean
- $(RM) @{var:build-dir}\build.h
- $(RM) @{var:build-dir}\include\botan\*
- $(RMDIR) @{var:build-dir}\include\botan @{var:build-dir}\include
- $(RMDIR) @{var:build-dir}\lib @{var:build-dir}\checks
- $(RMDIR) @{var:build-dir}
+ $(RM) %{build-dir}\build.h
+ $(RM) %{build-dir}\include\botan\*
+ $(RMDIR) %{build-dir}\include\botan %{build-dir}\include
+ $(RMDIR) %{build-dir}\lib %{build-dir}\checks
+ $(RMDIR) %{build-dir}
$(RM) Makefile
##################################################
diff --git a/src/build-data/makefile/unix.in b/src/build-data/makefile/unix.in
index 4025eed29..95859d16d 100644
--- a/src/build-data/makefile/unix.in
+++ b/src/build-data/makefile/unix.in
@@ -1,67 +1,67 @@
##################################################
# Compiler Options #
##################################################
-CXX = @{var:cc}
-LIB_OPT = @{var:lib_opt}
-CHECK_OPT = @{var:check_opt}
-MACH_OPT = @{var:mach_opt}
-LANG_FLAGS = @{var:lang_flags}
-WARN_FLAGS = @{var:warn_flags}
-LINK_TO = @{var:link_to}
+CXX = %{cc}
+LIB_OPT = %{lib_opt}
+CHECK_OPT = %{check_opt}
+MACH_OPT = %{mach_opt}
+LANG_FLAGS = %{lang_flags}
+WARN_FLAGS = %{warn_flags}
+LINK_TO = %{link_to}
##################################################
# Version Numbers #
##################################################
-VERSION = @{var:version}
+VERSION = %{version}
##################################################
# Installation Settings #
##################################################
-DESTDIR = @{var:prefix}
+DESTDIR = %{prefix}
BINDIR = $(DESTDIR)/bin
-LIBDIR = $(DESTDIR)/@{var:libdir}
-HEADERDIR = $(DESTDIR)/@{var:includedir}/botan
-DOCDIR = $(DESTDIR)/@{var:docdir}/Botan-$(VERSION)
+LIBDIR = $(DESTDIR)/%{libdir}
+HEADERDIR = $(DESTDIR)/%{includedir}/botan
+DOCDIR = $(DESTDIR)/%{docdir}/Botan-$(VERSION)
PKGCONF_DIR = $(LIBDIR)/pkgconfig
-CONFIG_SCRIPT = @{var:botan-config}
-PKGCONFIG = @{var:botan-pkgconfig}
+CONFIG_SCRIPT = %{botan_config}
+PKGCONFIG = %{botan_pkgconfig}
##################################################
# Aliases for Common Programs #
##################################################
-AR = @{var:ar_command}
+AR = %{ar_command}
CD = @cd
ECHO = @echo
-INSTALL_CMD_EXEC = @{var:install_cmd_exec}
-INSTALL_CMD_DATA = @{var:install_cmd_data}
+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 = @{var:ranlib_command}
+RANLIB = %{ranlib_command}
RM = @rm -f
RM_R = @rm -rf
##################################################
# File Lists #
##################################################
-CHECK = @{var:check_prefix}check
+CHECK = %{check_prefix}check
-DOCS = @{var:doc_files}
+DOCS = %{doc_files}
-HEADERS = @{var:include_files}
+HEADERS = %{include_files}
-LIBOBJS = @{var:lib_objs}
+LIBOBJS = %{lib_objs}
-CHECKOBJS = @{var:check_objs}
+CHECKOBJS = %{check_objs}
LIB_FLAGS = $(LIB_OPT) $(MACH_OPT) $(LANG_FLAGS) $(WARN_FLAGS)
CHECK_FLAGS = $(CHECK_OPT) $(LANG_FLAGS) $(WARN_FLAGS)
LIBRARIES = $(STATIC_LIB)
-LIBNAME = @{var:lib_prefix}libbotan
+LIBNAME = %{lib_prefix}libbotan
STATIC_LIB = $(LIBNAME).a
all: $(LIBRARIES)
@@ -69,9 +69,9 @@ all: $(LIBRARIES)
##################################################
# Build Commands #
##################################################
-@{var:lib_build_cmds}
+%{lib_build_cmds}
-@{var:check_build_cmds}
+%{check_build_cmds}
##################################################
# Link Commands #
@@ -92,15 +92,15 @@ $(STATIC_LIB): $(LIBOBJS)
static: $(STATIC_LIB)
doxygen:
- doxygen @{var:doc-dir}/botan.doxy
+ doxygen %{doc_src_dir}/botan.doxy
clean:
- $(RM_R) @{var:build-dir}/lib/* @{var:build-dir}/checks/*
+ $(RM_R) %{build-dir}/lib/* %{build-dir}/checks/*
$(RM) $(LIBRARIES) $(SYMLINK) $(CHECK)
distclean: clean
- $(RM_R) @{var:build-dir}
- $(RM_R) @{var:doc-dir}/doxygen @{var:doc-dir}/botan.doxy
+ $(RM_R) %{build-dir}
+ $(RM_R) %{doc_src_dir}/doxygen %{doc_src_dir}/botan.doxy
$(RM) Makefile $(CONFIG_SCRIPT) $(PKGCONFIG)
install: $(LIBRARIES)
diff --git a/src/build-data/makefile/unix_shr.in b/src/build-data/makefile/unix_shr.in
index 5b1522f70..f718d1160 100644
--- a/src/build-data/makefile/unix_shr.in
+++ b/src/build-data/makefile/unix_shr.in
@@ -1,91 +1,91 @@
##################################################
# Compiler Options #
##################################################
-CXX = @{var:cc}
-LIB_OPT = @{var:lib_opt}
-CHECK_OPT = @{var:check_opt}
-MACH_OPT = @{var:mach_opt}
-LANG_FLAGS = @{var:lang_flags}
-WARN_FLAGS = @{var:warn_flags}
-SO_OBJ_FLAGS = @{var:shared_flags}
-SO_LINK_CMD = @{var:so_link}
-LINK_TO = @{var:link_to}
+CXX = %{cc}
+LIB_OPT = %{lib_opt}
+CHECK_OPT = %{check_opt}
+MACH_OPT = %{mach_opt}
+LANG_FLAGS = %{lang_flags}
+WARN_FLAGS = %{warn_flags}
+SO_OBJ_FLAGS = %{shared_flags}
+SO_LINK_CMD = %{so_link}
+LINK_TO = %{link_to}
##################################################
# Version Numbers #
##################################################
-VERSION = @{var:version}
-SO_VERSION = @{var:so_version}
+VERSION = %{version}
+SO_VERSION = %{so_version}
##################################################
# Installation Settings #
##################################################
-DESTDIR = @{var:prefix}
+DESTDIR = %{prefix}
BINDIR = $(DESTDIR)/bin
-LIBDIR = $(DESTDIR)/@{var:libdir}
-HEADERDIR = $(DESTDIR)/@{var:includedir}/botan
-DOCDIR = $(DESTDIR)/@{var:docdir}/Botan-$(VERSION)
+LIBDIR = $(DESTDIR)/%{libdir}
+HEADERDIR = $(DESTDIR)/%{includedir}/botan
+DOCDIR = $(DESTDIR)/%{docdir}/Botan-$(VERSION)
PKGCONF_DIR = $(LIBDIR)/pkgconfig
-CONFIG_SCRIPT = @{var:botan-config}
-PKGCONFIG = @{var:botan-pkgconfig}
+CONFIG_SCRIPT = %{botan_config}
+PKGCONFIG = %{botan_pkgconfig}
##################################################
# Aliases for Common Programs #
##################################################
-AR = @{var:ar_command}
+AR = %{ar_command}
CD = @cd
ECHO = @echo
-INSTALL_CMD_EXEC = @{var:install_cmd_exec}
-INSTALL_CMD_DATA = @{var:install_cmd_data}
+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 = @{var:ranlib_command}
+RANLIB = %{ranlib_command}
RM = @rm -f
RM_R = @rm -rf
##################################################
# File Lists #
##################################################
-CHECK = @{var:check_prefix}check
+CHECK = %{check_prefix}check
-DOCS = @{var:doc_files}
+DOCS = %{doc_files}
-HEADERS = @{var:include_files}
+HEADERS = %{include_files}
-LIBOBJS = @{var:lib_objs}
+LIBOBJS = %{lib_objs}
-CHECKOBJS = @{var:check_objs}
+CHECKOBJS = %{check_objs}
LIB_FLAGS = $(LIB_OPT) $(MACH_OPT) $(LANG_FLAGS) $(WARN_FLAGS) $(SO_OBJ_FLAGS)
CHECK_FLAGS = $(CHECK_OPT) $(LANG_FLAGS) $(WARN_FLAGS)
LIBRARIES = $(STATIC_LIB) $(SHARED_LIB)
-LIBNAME = @{var:lib_prefix}libbotan
+LIBNAME = %{lib_prefix}libbotan
STATIC_LIB = $(LIBNAME).a
-SHARED_LIB = $(LIBNAME)-$(SO_VERSION).@{var:so_suffix}
-SONAME = $(LIBNAME)-$(SO_VERSION).@{var:so_suffix}
+SHARED_LIB = $(LIBNAME)-$(SO_VERSION).%{so_suffix}
+SONAME = $(LIBNAME)-$(SO_VERSION).%{so_suffix}
-SYMLINK = libbotan.@{var:so_suffix}
+SYMLINK = libbotan.%{so_suffix}
all: $(LIBRARIES)
##################################################
# Build Commands #
##################################################
-@{var:lib_build_cmds}
+%{lib_build_cmds}
-@{var:check_build_cmds}
+%{check_build_cmds}
##################################################
# Link Commands #
##################################################
$(CHECK): $(LIBRARIES) $(CHECKOBJS)
- $(CXX) $(LDFLAGS) $(CHECKOBJS) -o $(CHECK) -L. -lbotan-@{var:so_version} $(LINK_TO)
+ $(CXX) $(LDFLAGS) $(CHECKOBJS) -o $(CHECK) -L. -lbotan-%{so_version} $(LINK_TO)
$(STATIC_LIB): $(LIBOBJS)
$(RM) $(STATIC_LIB)
@@ -106,15 +106,15 @@ static: $(STATIC_LIB)
shared: $(SHARED_LIB)
doxygen:
- doxygen @{var:doc-dir}/botan.doxy
+ doxygen %{doc_src_dir}/botan.doxy
clean:
- $(RM_R) @{var:build-dir}/lib/* @{var:build-dir}/checks/*
+ $(RM_R) %{build_dir}/lib/* %{build_dir}/checks/*
$(RM) $(LIBRARIES) $(SYMLINK) $(CHECK)
distclean: clean
- $(RM_R) @{var:build-dir}
- $(RM_R) @{var:doc-dir}/doxygen @{var:doc-dir}/botan.doxy
+ $(RM_R) %{build_dir}
+ $(RM_R) %{doc_src_dir}/doxygen %{doc_src_dir}/botan.doxy
$(RM) Makefile $(CONFIG_SCRIPT) $(PKGCONFIG)
install: $(LIBRARIES)