Upgrade build system

This commit is contained in:
Laurence Withers 2008-12-20 22:36:28 +00:00
parent cad2283f6a
commit 2d51d09c83
6 changed files with 108 additions and 100 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
obj obj
html html
.*.swp

View File

@ -21,7 +21,7 @@ run_test() {
return 1 return 1
fi fi
LD_LIBRARY_PATH="obj" ${EXE} "$@" || return 1 LD_LIBRARY_PATH="obj" "${EXE}" "$@" || return 1
return 0 return 0
} }

View File

@ -8,77 +8,56 @@
# to override values if needed. # to override values if needed.
# #
# build proposed paths MY_PREFIX="${PREFIX}"
[ "${MY_PREFIX}" == "/" ] && MY_PREFIX=""
[ -z "${BINDIR}" ] && BINDIR="${PREFIX}/bin"
[ -z "${SBINDIR}" ] && SBINDIR="${PREFIX}/sbin"
[ -z "${LIBDIR}" ] && LIBDIR="${PREFIX}/lib"
if [ -z "${INCLUDEDIR}" ]
then
case "${PREFIX}" in case "${PREFIX}" in
/) /) INCLUDEDIR="/usr/include" ;;
MY_BINDIR="/bin" *) INCLUDEDIR="${PREFIX}/include" ;;
MY_SBINDIR="/sbin"
MY_LIBDIR="/lib"
MY_INCLUDEDIR="/usr/include"
MY_CONFIGDIR="/etc"
MY_VARDIR="/var"
MY_SHAREDIR="/usr/share/libiso8601"
MY_DOCSDIR="/usr/share/doc/libiso8601"
MY_WEBDIR="/srv/http"
;;
/usr)
MY_BINDIR="/usr/bin"
MY_SBINDIR="/usr/sbin"
MY_LIBDIR="/usr/lib"
MY_INCLUDEDIR="/usr/include"
MY_CONFIGDIR="/etc"
MY_VARDIR="/var"
MY_SHAREDIR="/usr/share/libiso8601"
MY_DOCSDIR="/usr/share/doc/libiso8601"
MY_WEBDIR="/srv/http"
;;
/usr/local)
MY_BINDIR="/usr/local/bin"
MY_SBINDIR="/usr/local/sbin"
MY_LIBDIR="/usr/local/lib"
MY_INCLUDEDIR="/usr/local/include"
MY_CONFIGDIR="/usr/local/etc"
MY_VARDIR="/var"
MY_SHAREDIR="/usr/local/share/libiso8601"
MY_DOCSDIR="/usr/local/share/doc/libiso8601"
MY_WEBDIR="/srv/http"
;;
/opt/*)
MY_BINDIR="${PREFIX}/bin"
MY_SBINDIR="${PREFIX}/sbin"
MY_LIBDIR="${PREFIX}/lib"
MY_INCLUDEDIR="${PREFIX}/include"
MY_CONFIGDIR="/etc${PREFIX}"
MY_VARDIR="/var${PREFIX}"
MY_SHAREDIR="/var${PREFIX}"
MY_DOCSDIR="${PREFIX}/doc"
MY_WEBDIR="${PREFIX}/http"
;;
**)
MY_BINDIR="${PREFIX}/bin"
MY_SBINDIR="${PREFIX}/sbin"
MY_LIBDIR="${PREFIX}/lib"
MY_INCLUDEDIR="${PREFIX}/include"
MY_CONFIGDIR="${PREFIX}/etc"
MY_VARDIR="${PREFIX}/var"
MY_DOCSDIR="${PREFIX}/share/doc"
MY_WEBDIR="${PREFIX}/srv/http"
;;
esac esac
fi
# assign paths allowing user to override if [ -z "${CONFIGDIR}" ]
[ -z "${BINDIR}" ] && BINDIR="${MY_BINDIR}" then
[ -z "${SBINDIR}" ] && SBINDIR="${MY_SBINDIR}" case "${PREFIX}" in
[ -z "${LIBDIR}" ] && LIBDIR="${MY_LIBDIR}" / | /usr) CONFIGDIR="/etc" ;;
[ -z "${INCLUDEDIR}" ] && INCLUDEDIR="${MY_INCLUDEDIR}" /opt*) CONFIGDIR="/etc${PREFIX}" ;;
[ -z "${CONFIGDIR}" ] && CONFIGDIR="${MY_CONFIGDIR}" *) CONFIGDIR="${PREFIX}/etc" ;;
[ -z "${VARDIR}" ] && VARDIR="${MY_VARDIR}" esac
[ -z "${DOCSDIR}" ] && DOCSDIR="${MY_DOCSDIR}" fi
[ -z "${WEBDIR}" ] && WEBDIR="${MY_WEBDIR}"
if [ -z "${VARDIR}" ]
then
case "${PREFIX}" in
/ | /usr | /usr/local) VARDIR="/var" ;;
/opt*) VARDIR="/var${PREFIX}" ;;
*) VARDIR="${PREFIX}/var" ;;
esac
fi
if [ -z "${SHAREDIR}" ]
then
case "${PREFIX}" in
/) SHAREDIR="/usr/share" ;;
*) SHAREDIR="${PREFIX}/share" ;;
esac
fi
[ -z "${DOCSDIR}" ] && DOCSDIR="${SHAREDIR}/doc"
if [ -z "${SRVDIR}" ]
then
case "${PREFIX}" in
/ | /usr | /usr/local) SRVDIR="/srv" ;;
*) SRVDIR="${PREFIX}/srv" ;;
esac
fi
[ -z "${WEBDIR}" ] && WEBDIR="${SRVDIR}/http"
[ -z "${CGIDIR}" ] && CGIDIR="${WEBDIR}/cgi-bin" [ -z "${CGIDIR}" ] && CGIDIR="${WEBDIR}/cgi-bin"
# kate: replace-trailing-space-save true; space-indent true; tab-width 4; # kate: replace-trailing-space-save true; space-indent true; tab-width 4;

View File

@ -20,23 +20,30 @@ STRIP_FROM_PATH =
STRIP_FROM_INC_PATH = STRIP_FROM_INC_PATH =
SHORT_NAMES = NO SHORT_NAMES = NO
JAVADOC_AUTOBRIEF = NO JAVADOC_AUTOBRIEF = NO
QT_AUTOBRIEF = NO
MULTILINE_CPP_IS_BRIEF = YES MULTILINE_CPP_IS_BRIEF = YES
DETAILS_AT_TOP = YES
INHERIT_DOCS = YES INHERIT_DOCS = YES
SEPARATE_MEMBER_PAGES = NO SEPARATE_MEMBER_PAGES = NO
TAB_SIZE = 4 TAB_SIZE = 4
ALIASES = ALIASES =
OPTIMIZE_OUTPUT_FOR_C = NO OPTIMIZE_OUTPUT_FOR_C = YES
OPTIMIZE_OUTPUT_JAVA = NO OPTIMIZE_OUTPUT_JAVA = NO
OPTIMIZE_FOR_FORTRAN = NO
OPTIMIZE_OUTPUT_VHDL = NO
BUILTIN_STL_SUPPORT = NO BUILTIN_STL_SUPPORT = NO
CPP_CLI_SUPPORT = NO CPP_CLI_SUPPORT = NO
SIP_SUPPORT = NO
IDL_PROPERTY_SUPPORT = NO
DISTRIBUTE_GROUP_DOC = NO DISTRIBUTE_GROUP_DOC = NO
SUBGROUPING = YES SUBGROUPING = YES
TYPEDEF_HIDES_STRUCT = NO
SYMBOL_CACHE_SIZE = 0
EXTRACT_ALL = NO EXTRACT_ALL = NO
EXTRACT_PRIVATE = NO EXTRACT_PRIVATE = NO
EXTRACT_STATIC = NO EXTRACT_STATIC = NO
EXTRACT_LOCAL_CLASSES = NO EXTRACT_LOCAL_CLASSES = NO
EXTRACT_LOCAL_METHODS = NO EXTRACT_LOCAL_METHODS = NO
EXTRACT_ANON_NSPACES = NO
HIDE_UNDOC_MEMBERS = NO HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO HIDE_UNDOC_CLASSES = NO
HIDE_FRIEND_COMPOUNDS = YES HIDE_FRIEND_COMPOUNDS = YES
@ -48,6 +55,7 @@ SHOW_INCLUDE_FILES = NO
INLINE_INFO = YES INLINE_INFO = YES
SORT_MEMBER_DOCS = NO SORT_MEMBER_DOCS = NO
SORT_BRIEF_DOCS = NO SORT_BRIEF_DOCS = NO
SORT_GROUP_NAMES = NO
SORT_BY_SCOPE_NAME = NO SORT_BY_SCOPE_NAME = NO
GENERATE_TODOLIST = YES GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES GENERATE_TESTLIST = YES
@ -57,7 +65,10 @@ ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30 MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = NO SHOW_USED_FILES = NO
SHOW_DIRECTORIES = NO SHOW_DIRECTORIES = NO
SHOW_FILES = NO
SHOW_NAMESPACES = YES
FILE_VERSION_FILTER = FILE_VERSION_FILTER =
LAYOUT_FILE =
QUIET = YES QUIET = YES
WARNINGS = YES WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES WARN_IF_UNDOCUMENTED = YES
@ -65,6 +76,7 @@ WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = YES WARN_NO_PARAMDOC = YES
WARN_FORMAT = "$file:$line: $text" WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE = WARN_LOGFILE =
INPUT =
INPUT_ENCODING = UTF-8 INPUT_ENCODING = UTF-8
FILE_PATTERNS = FILE_PATTERNS =
RECURSIVE = NO RECURSIVE = NO
@ -97,16 +109,27 @@ HTML_HEADER =
HTML_FOOTER = HTML_FOOTER =
HTML_STYLESHEET = HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES HTML_ALIGN_MEMBERS = YES
HTML_DYNAMIC_SECTIONS = YES
GENERATE_DOCSET = NO
DOCSET_FEEDNAME = "Doxygen generated docs"
DOCSET_BUNDLE_ID = org.doxygen.Project
GENERATE_HTMLHELP = NO GENERATE_HTMLHELP = NO
CHM_FILE = CHM_FILE =
HHC_LOCATION = HHC_LOCATION =
GENERATE_CHI = NO GENERATE_CHI = NO
CHM_INDEX_ENCODING =
BINARY_TOC = NO BINARY_TOC = NO
TOC_EXPAND = NO TOC_EXPAND = NO
GENERATE_QHP = NO
QCH_FILE =
QHP_NAMESPACE = org.doxygen.Project
QHP_VIRTUAL_FOLDER = doc
QHG_LOCATION =
DISABLE_INDEX = NO DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4 ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250 TREEVIEW_WIDTH = 250
FORMULA_FONTSIZE = 10
GENERATE_LATEX = NO GENERATE_LATEX = NO
LATEX_OUTPUT = latex LATEX_OUTPUT = latex
LATEX_CMD_NAME = latex LATEX_CMD_NAME = latex
@ -158,6 +181,9 @@ CLASS_DIAGRAMS = YES
MSCGEN_PATH = MSCGEN_PATH =
HIDE_UNDOC_RELATIONS = YES HIDE_UNDOC_RELATIONS = YES
HAVE_DOT = YES HAVE_DOT = YES
DOT_FONTNAME = FreeSans
DOT_FONTSIZE = 10
DOT_FONTPATH =
CLASS_GRAPH = YES CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES COLLABORATION_GRAPH = YES
GROUP_GRAPHS = NO GROUP_GRAPHS = NO
@ -173,6 +199,7 @@ DOT_IMAGE_FORMAT = png
DOT_PATH = DOT_PATH =
DOTFILE_DIRS = DOTFILE_DIRS =
DOT_GRAPH_MAX_NODES = 50 DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 0
DOT_TRANSPARENT = YES DOT_TRANSPARENT = YES
DOT_MULTI_TARGETS = YES DOT_MULTI_TARGETS = YES
GENERATE_LEGEND = YES GENERATE_LEGEND = YES

View File

@ -39,8 +39,9 @@ then
-Wl,-soname,${SONAME} \ -Wl,-soname,${SONAME} \
${SRC} ${SO_EXTRA} || return 1 ${SRC} ${SO_EXTRA} || return 1
# make tests work # make tests and linking work
do_cmd ln -sf $(basename ${libiso8601}) obj/${SONAME} || return 1 do_cmd ln -sf "$(basename "${libiso8601}")" "obj/${SONAME}" || return 1
do_cmd ln -sf "$(basename "${libiso8601}")" "obj/${libiso8601_BASE}.so" || return 1
print_success "Library built" print_success "Library built"
else else

View File

@ -17,7 +17,7 @@ int main(int argc, char* argv[])
int ret = 0; int ret = 0;
if(argc == 2 && !strcmp(argv[1], "--print-summary")) { if(argc == 2 && !strcmp(argv[1], "--print-summary")) {
printf("One line summary.\n"); fputs("One line summary.\n", stdout);
return 0; return 0;
} }