summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2013-10-01 17:14:28 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2013-10-06 11:50:46 (GMT)
commitac2cd570cc7f606963d7cac15d3f3e11c6e305f3 (patch)
tree1a29528b7b89f2c2e1841d0957a2da1d376cda65 /configure
parente835d4b28e1db3bdcdf3bfa718bc85445587ccd9 (diff)
downloadDoxygen-ac2cd570cc7f606963d7cac15d3f3e11c6e305f3.zip
Doxygen-ac2cd570cc7f606963d7cac15d3f3e11c6e305f3.tar.gz
Doxygen-ac2cd570cc7f606963d7cac15d3f3e11c6e305f3.tar.bz2
This patch contains changes regarding the build system so that the *nix and Windows systems use the same information (consistency). Some use names routine names have been changed (from .l files with -P option) to reflect the file name that generated the routines, this makes it easier to create a general procedure.
A number of include / header files are files are generated from different file types (html, xml, js), due some limitations of the windows build system the generated file names had to be changed (the extension in the windows build system is only available including the '.' so e.g. the file jquery_fx.js generates now jquery_fx.js.h instead of jquery_fx_js.h) In the windows version the creation of .cpp files from .l files has been adjusted to correct for the YY_BUF_SIZE problems. Furthermore on windows (and also used on *nix) some commends have been replaced with python scripts so that on windows only python is need (besides flex and and bison). On *nix also perl is required for the generation using tmake. Below a short description of the changes will be given and grouped. Changed files ============= - .gitignore added some directories and file - Doxyfile corrected for changed file names - Makefile.in added realclean and some other changes (ignore error) and the moment when the Makefile is deleted (as last file). Added entries for doxyapp and doxmlparser Added realclean for the following files (consistency): ====================================================== - Makefile.win_make.in - Makefile.win_nmake.in - addon/doxmlparser/examples/metrics/Makefile.in - addon/doxmlparser/src/Makefile.in - addon/doxmlparser/test/Makefile.in - addon/doxyapp/Makefile.in - addon/doxysearch/Makefile.in - libmd5/Makefile.in - qtools/Makefile.in - addon/doxyapp/doxyapp.pro.in removed double occurence of -L../../lib - addon/doxysearch/doxysearch.pro.in no visible change just spacing? - addon/doxywizard/Makefile.in added realclean corrected call to qmake (to get it from the right place, it is not necessarily in the path) made some macros known in the called process - addon/doxywizard/configdoc.cpp automatically generated, can be removed - addon/doxywizard/doxywizard.pro.in corrected dependencies corrected call to python (to get it from the right place, it is not necessarily in the path) new items to generate version.cpp and config_doxyw.cpp - configure added configuration definition possibility for python added possibility to build doxmlparser automatically generate the lang_cfg.h file based on the available languages (translator_??.h) and not on a fixed list. This step still has to be added to the windows build process. - doc/Makefile.in corrected call to python (to get it from the right place, it is not necessarily in the path) - doc/config.doc small correction - doc/install.doc added python as a requirement changed CVS to GitHub - doc/language.doc automatically generated file, based on other changes. - doc/language.tpl made XX and xx more consistent changed description of the procedure based on changes already made configure. - src/Makefile.in adjusted used file names in distclean Solved PERL usage consistent with LEX / YACC (with %%PERL%%) automatically add translator_??>h to HEADERS same spacing Adjusted in the following file the names of some include files: =============================================================== - src/cite.cpp - src/docbookgen.cpp - src/ftvhelp.cpp - src/htmlgen.cpp - src/layout.cpp - src/searchindex.cpp - src/xmlgen.cpp Adjusted in the following files some routine names (..YY..) to be consistent with the file names: ================================================================================================= - src/commentscan.l - src/constexp.h - src/constexp.l - src/constexp.y - src/fortrancode.l - src/fortranscanner.l - src/pyscanner.l - src/pre.l - src/scanner.l - src/tclscanner.l - src/vhdlparser.y - src/vhdlscanner.l - src/config.xml small textual correction - src/configoptions.cpp generated output file, can be removed - src/lang_cfg.h Automatically generated file with selected languages (*nix). On windows a procedure has to be defined. - src/libdoxycfg.t.in corrected call to python (to get it from the right place, it is not necessarily in the path) - src/libdoxygen.pro.in adjusted include file names removed translator_??.h files, they are added automatically changed file name ce_lex.cpp -> constexp.cpp (generated file) - src/libdoxygen.t.in made LEX calls used the file name for the -P option changed INCREASEBUF script to a python script changed teh geneartion of some include file, now by means of a pythons script. Names of the generated include file had to be changed as well. added possibility to generate version.cpp here as well. Added HEADERS to dependency so non existing but later generated include files are recognized as well: ===================================================================================================== - tmake/lib/unix/generic.t - tmake/lib/win32-borland/generic.t - tmake/lib/win32-g++/generic.t - tmake/lib/win32-mingw/generic.t - tmake/lib/win32-msvc/generic.t - tmake/lib/win32-symantec/generic.t - tmake/lib/win32-visage/generic.t - tmake/lib/win32-watcom/generic.t - winbuild/Doxygen.vcproj made consistent wit *nix version. Generating all possible files removed unused /empty parts setting for the Lex.rules and other rules files some default values - winbuild/Doxywizard.vcproj made consistent wit *nix version. Generating all possible files removed unused /empty parts removed system dependent paths (C:\... etc) replaced then with external environment variables - winbuild/Lex.rules adjusted file to comply with new requirements, only user variable is -d. -i is set to read only (value can be changed in doxygen.vcproj). Handling of other arguments is all default. generation including increasebuffer possibility - winbuild/doxyindexer.vcproj corrected path - winbuild/doxysearch.vcproj removed system dependent paths (C:\... etc) replaced then with external environment variables - winbuild/qtools.vcproj corrected type, wrong used directory The following files are automatically generated (with slightly other names like index.xsd.h etc.): ================================================================================================== - src/index_xsd.h - src/doxygen_bst.h - src/dynsections_js.h - src/extsearch_js.h - src/footer_html.h - src/header_html.h - src/jquery_fx_js.h - src/jquery_p1_js.h - src/jquery_p2_js.h - src/jquery_p3_js.h - src/jquery_pt_js.h - src/jquery_ui_js.h - src/navtree_css.h - src/navtree_js.h - src/resize_js.h - src/search_css.h - src/search_functions_php.h - src/search_js.h - src/search_opensearch_php.h - src/svgpan_js.h the following files are generated with different names: - src/bib2xhtml.h becomes - src/bib2xhtml.pl/h - src/layout_default.h becomes - src/layout_default.xml.h The file: ========= - addon/doxywizard/config.l is replaced by: - addon/doxywizard/config_doxyw.l so there are in the system not 2 different config.l files. Renamed some routines from configYY -> config_doxywYY... New files: ========== - src/increasebuffer.py increase YY_BUF_SIZE and YY_READ_BUF_SIZE from 16k / 8k to 256k. - src/settings.py create settings.h file - src/to_c_cmd.py create include files from different files (html, xml, js) so they can be included in the code as defaults - src/version.py create version.cpp file based on the configure file - winbuild/Config.rules rules file to convert the config.xml file into configoptions.cpp (doxygen) or configdoc.cpp (doxywizard). Seen the differences 2 rules are created within this file. - winbuild/Gen_head.rules rules files to generate include files from different files using to_c_cmd.py - winbuild/Settings.rules rules file for generating the settings.h file. It is possible to select to use CLANG and SqlLite3 - winbuild/Version.rules rules file to be able to start version.py The files: ========== - version.bat - runbison.bat - increasebuffer.pl are not used anymore. I've only added the files as indicated, I didn't remove the files from the repository.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure120
1 files changed, 91 insertions, 29 deletions
diff --git a/configure b/configure
index 7b554a3..0434457 100755
--- a/configure
+++ b/configure
@@ -29,23 +29,31 @@ f_shared=YES
f_make=NO
f_dot=NO
f_perl=NO
+f_python=NO
f_plf_auto=NO
f_prefix=/usr/local
f_insttool=NO
f_english=NO
f_wizard=NO
f_app=NO
+f_doxmlparser=NO
f_thread=NO
f_flex=NO
f_bison=NO
f_search=NO
-f_langs=nl,sv,cz,fr,id,it,de,jp,je,es,fi,ru,hr,pl,pt,hu,kr,ke,ro,si,cn,no,mk,br,dk,sk,ua,gr,tw,sr,ca,lt,za,ar,fa,sc,vi,tr,eo,am
f_sqlite3=NO
f_sqlite3static=NO
f_sqlite3_path=NO
f_libclang=NO
f_libclangstatic=NO
+#
+# first setup the list with availabe languages, so we cannot forget any
+# list will be in case as specified (f_langs) and in uppercase (f_ulangs) as used in the internal perl script
+#
+f_langs=`ls -1 src/translator_??.h | sed -e 's%src/translator_%%g' | sed -e 's/\.h//' | tr '\012' ',' | sed -e 's/,$//'`
+f_ulangs=`echo $f_langs | tr '[a-z]' '[A-Z]'`
+
while test -n "$1"; do
case $1 in
--prefix | -prefix)
@@ -81,6 +89,9 @@ while test -n "$1"; do
--dot | -dot)
shift; f_dot=$1
;;
+ --python | -python)
+ shift; f_python=$1
+ ;;
--perl | -perl)
shift; f_perl=$1
;;
@@ -99,6 +110,9 @@ while test -n "$1"; do
--with-doxyapp | -with-doxyapp)
f_app=YES
;;
+ --with-doxmlparser | -with-doxmlparser)
+ f_doxmlparser=YES
+ ;;
--with-doxysearch | -with-doxysearch)
f_search=YES
;;
@@ -133,13 +147,14 @@ done
if test "$f_help" = y; then
cat <<EOF
-Usage: $0 [--help] [--shared] [--static] [--release] [--debug]
+Usage: $0 [--help] [--shared] [--static] [--release] [--debug] [--python name]
[--perl name] [--flex name] [--bison name] [--make name]
[--dot name] [--platform target] [--prefix dir] [--docdir dir]
[--install name] [--english-only] [--enable-langs list]
[--with-sqlite3] [--with-sqlite3-static] [--sqlite3-path]
[--with-libclang] [--with-libclang-static]
[--with-doxywizard] [--with-doxysearch] [--with-doxyapp]
+ [--with-doxxmlparser]
Options:
@@ -148,6 +163,8 @@ Options:
[default: shared]
--release | --debug Build for release or debug
[default: release]
+ --python name Use \`name' as the name of the python interpreter
+ [default: autodetect]
--perl name Use \`name' as the name of the perl interpreter
[default: autodetect]
--flex name Use \`name' as the name of the GNU lexical scanner
@@ -178,6 +195,7 @@ Options:
--with-doxysearch Build external search tools (doxysearch and doxyindexer)
requires Xapian library version 1.2
--with-doxyapp Example showing how to embed doxygen in an application.
+ --with-doxmlparser Example showing how to parse doxygen's XML output.
EOF
test "$f_error" = y && exit 1
@@ -312,11 +330,18 @@ if test "$f_wizard" = YES; then
for d in /usr/{lib,share,qt}/{qt-4,qt4,qt,qt*,4} /usr; do
if test -x "$d/bin/qmake"; then
QTDIR=$d
+ break 2
fi
done
else
- echo " Detected Qt via the QTDIR environment variable..."
- printf " "
+ if test -e "$QTDIR/bin/qmake"; then
+ printf " Detected Qt via the QTDIR environment variable..."
+ else
+ printf "ERROR Detected Qt via the QTDIR environment variable..."
+ echo ", but $QTDIR/bin/qmake does not exist."
+ echo " Set the QTDIR environment variable such that \$QTDIR/bin/qmake exists."
+ exit 2
+ fi
fi
if test -z "$QTDIR"; then
echo "QTDIR not set and Qt not found at standard locations!"
@@ -325,6 +350,7 @@ if test "$f_wizard" = YES; then
echo "check the Qt installation instructions!"
exit 2
fi
+ echo using $QTDIR
fi
#- check for xapian -----------------------------------------------------------
@@ -335,13 +361,24 @@ if test "$f_search" = YES; then
for d in /usr /usr/local /opt/local; do
if test -e "$d/include/xapian.h"; then
XAPIAN=$d
+ break 2
fi
done
+ else
+ if test -e "$XAPIAN/include/xapian.h"; then
+ printf " Detected Xapian via the XAPIAN environment variable..."
+ else
+ printf "ERROR Detected Xapian via the XAPIAN environment variable..."
+ echo ", but $XAPIAN/include/xapian.h does not exist."
+ echo " Set the XAPIAN environment variable such that \$XAPIAN/include/xapian.h exists."
+ exit 2
+ fi
fi
if test -z "$XAPIAN"; then
echo "XAPIAN not set and xapian.h not found at standard locations!"
exit 2;
fi
+ echo using $XAPIAN
fi
# - check for make ------------------------------------------------------------
@@ -520,6 +557,39 @@ if test "$f_libclang" = YES; then
fi
fi
+# - check for python ----------------------------------------------------------
+
+printf " Checking for python... "
+if test "$f_python" = NO; then
+ python_names="python"
+ python_dirs="$bin_dirs /usr/bin /usr/local/bin /bin /sbin"
+ python_prog=NO
+ python_found=NO
+ for i in $python_names; do
+ for j in $python_dirs; do
+ if test -x "$j/$i"; then
+ python_found=YES
+ if test `$j/$i -c "import sys; print sys.version_info.major"` = 2; then
+ python_prog="$j/$i"
+ break 2
+ fi
+ fi
+ done
+ done
+ f_python="$python_prog"
+fi
+
+if test "$f_python" = NO; then
+ if test "$python_found" = YES; then
+ echo "version should be python 2."
+ else
+ echo "not found!";
+ fi
+ echo
+ exit 2
+fi
+echo "using $f_python";
+
# - check for perl ------------------------------------------------------------
printf " Checking for perl... "
@@ -625,7 +695,8 @@ TMAKEPATH = $configPWD/tmake/lib/$f_platform
ENV = env TMAKEPATH="\$(TMAKEPATH)"
TMAKE = $configPWD/tmake/bin/tmake
MAKE = $f_make
-PERL = $f_perl
+PYTHON = $f_python
+LEX = $f_flex
RM = rm -f
CP = cp
VERSION = `cat VERSION`
@@ -777,6 +848,11 @@ EOF
if test $f_app = YES; then
echo " \$(MAKE) -C addon/doxyapp" >> $DST
fi
+ if test $f_doxmlparser = YES; then
+ echo " \$(MAKE) -C addon/doxmlparser/src" >> $DST
+ echo " \$(MAKE) -C addon/doxmlparser/test" >> $DST
+ echo " \$(MAKE) -C addon/doxmlparser/examples/metrics" >> $DST
+ fi
echo "" >> $DST
echo "doxywizard_install:" >> $DST
if test $f_wizard = YES; then
@@ -796,8 +872,8 @@ EOF
echo " Created $DST from $SRC..."
done
-cat src/libdoxycfg.t.in | sed -e "s|%%FLEX%%|$f_flex|g" -e "s|%%BISON%%|$f_bison|g" > src/libdoxycfg.t
-cat src/libdoxygen.t.in | sed -e "s|%%FLEX%%|$f_flex|g" -e "s|%%BISON%%|$f_bison|g" > src/libdoxygen.t
+cat src/libdoxycfg.t.in | sed -e "s|%%FLEX%%|$f_flex|g" -e "s|%%BISON%%|$f_bison|g" -e "s|%%PYTHON%%|$f_python|g" > src/libdoxycfg.t
+cat src/libdoxygen.t.in | sed -e "s|%%FLEX%%|$f_flex|g" -e "s|%%BISON%%|$f_bison|g" -e "s|%%PYTHON%%|$f_python|g" > src/libdoxygen.t
f_inprofiles="qtools/qtools.pro.in src/libdoxygen.pro.in src/libdoxycfg.pro.in src/doxygen.pro.in addon/doxywizard/doxywizard.pro.in addon/doxmlparser/src/doxmlparser.pro.in addon/doxmlparser/test/xmlparse.pro.in addon/doxmlparser/examples/metrics/metrics.pro.in libmd5/libmd5.pro.in addon/doxyapp/doxyapp.pro.in addon/doxysearch/doxysearch.pro.in addon/doxysearch/doxyindexer.pro.in"
@@ -831,7 +907,7 @@ fi
echo " Generating src/lang_cfg.h..."
echo $f_langs | $f_perl -e '@l=split(/,/,<STDIN>);
chomp @l;
- @allowed=(split(/,/,"NL,SV,CZ,FR,ID,IT,DE,JP,JE,ES,FI,RU,HR,PL,PT,HU,KR,KE,RO,SI,CN,NO,MK,BR,DK,SK,UA,GR,TW,SR,CA,LT,ZA,AR,FA,SC,VI,TR,EO,AM"));
+ @allowed=(split(/,/,"'$f_ulangs'"));
foreach my $elem (@l){
$elem =~ tr/a-z/A-Z/;
$r=0;
@@ -845,25 +921,11 @@ echo $f_langs | $f_perl -e '@l=split(/,/,<STDIN>);
if test -f "src/config.h"; then
chmod u+w src/config.h
fi
-echo " Generating src/settings.h..."
-echo "#ifndef SETTINGS_H" > src/settings.h
-echo "#define SETTINGS_H" >> src/settings.h
-echo "" >> src/settings.h
-if test "$f_sqlite3" != NO; then
-echo "#define USE_SQLITE3 1" >> src/settings.h
-else
-echo "#define USE_SQLITE3 0" >> src/settings.h
+if test -f "src/settings.h"; then
+ chmod u+w src/settings.h
fi
-if test "$f_libclang" != NO; then
-echo "#define USE_LIBCLANG 1" >> src/settings.h
-else
-echo "#define USE_LIBCLANG 0" >> src/settings.h
-fi
-echo "" >> src/settings.h
-echo "#define IS_SUPPORTED(x) \\" >> src/settings.h
-echo " ((USE_SQLITE3 && strcmp(\"USE_SQLITE3\",(x))==0) || \\" >> src/settings.h
-echo " (USE_LIBCLANG && strcmp(\"USE_LIBCLANG\",(x))==0) || \\" >> src/settings.h
-echo " 0)" >> src/settings.h
-echo "" >> src/settings.h
-echo "#endif" >> src/settings.h
-echo
+echo " Generating src/settings.h..."
+cd src
+$f_python settings.py $f_sqlite3 $f_libclang
+cd ..
+echo " Finished"