From 5bac93f5b37f6ae091e63aefd0f2da4def0dfd49 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 28 Sep 2009 16:26:07 +0200 Subject: Start tracking XSD dependency information with git --- README | 70 ++++++++++++ TODO | 1 + build.sh | 117 +++++++++++++++++++++ .../build/cxx/configuration-dynamic.make | 14 +++ .../build/cxx/gnu/configuration-dynamic.make | 8 ++ .../import/libboost/configuration-dynamic.make | 1 + .../import/libcult/configuration-dynamic.make | 1 + .../build/ld/configuration-lib-dynamic.make | 3 + libcult/build/configuration-dynamic.make | 3 + libcult/build/cxx/configuration-dynamic.make | 14 +++ libcult/build/cxx/gnu/configuration-dynamic.make | 8 ++ libcult/build/ld/configuration-lib-dynamic.make | 3 + .../build/cxx/configuration-dynamic.make | 14 +++ .../build/cxx/gnu/configuration-dynamic.make | 8 ++ .../import/libcult/configuration-dynamic.make | 1 + .../build/ld/configuration-lib-dynamic.make | 3 + .../build/cxx/configuration-dynamic.make | 14 +++ .../build/cxx/gnu/configuration-dynamic.make | 8 ++ .../import/libboost/configuration-dynamic.make | 1 + .../import/libcult/configuration-dynamic.make | 1 + .../configuration-dynamic.make | 1 + .../import/libxerces-c/configuration-dynamic.make | 1 + .../build/ld/configuration-lib-dynamic.make | 3 + xsd/build/configuration-dynamic.make | 6 ++ xsd/build/cxx/configuration-dynamic.make | 14 +++ xsd/build/cxx/gnu/configuration-dynamic.make | 8 ++ .../libbackend-elements/configuration-dynamic.make | 1 + .../import/libboost/configuration-dynamic.make | 1 + .../import/libcult/configuration-dynamic.make | 1 + .../import/libxerces-c/configuration-dynamic.make | 1 + .../libxsd-frontend/configuration-dynamic.make | 1 + 31 files changed, 331 insertions(+) create mode 100644 README create mode 100644 TODO create mode 100755 build.sh create mode 100644 libbackend-elements/build/cxx/configuration-dynamic.make create mode 100644 libbackend-elements/build/cxx/gnu/configuration-dynamic.make create mode 100644 libbackend-elements/build/import/libboost/configuration-dynamic.make create mode 100644 libbackend-elements/build/import/libcult/configuration-dynamic.make create mode 100644 libbackend-elements/build/ld/configuration-lib-dynamic.make create mode 100644 libcult/build/configuration-dynamic.make create mode 100644 libcult/build/cxx/configuration-dynamic.make create mode 100644 libcult/build/cxx/gnu/configuration-dynamic.make create mode 100644 libcult/build/ld/configuration-lib-dynamic.make create mode 100644 libfrontend-elements/build/cxx/configuration-dynamic.make create mode 100644 libfrontend-elements/build/cxx/gnu/configuration-dynamic.make create mode 100644 libfrontend-elements/build/import/libcult/configuration-dynamic.make create mode 100644 libfrontend-elements/build/ld/configuration-lib-dynamic.make create mode 100644 libxsd-frontend/build/cxx/configuration-dynamic.make create mode 100644 libxsd-frontend/build/cxx/gnu/configuration-dynamic.make create mode 100644 libxsd-frontend/build/import/libboost/configuration-dynamic.make create mode 100644 libxsd-frontend/build/import/libcult/configuration-dynamic.make create mode 100644 libxsd-frontend/build/import/libfrontend-elements/configuration-dynamic.make create mode 100644 libxsd-frontend/build/import/libxerces-c/configuration-dynamic.make create mode 100644 libxsd-frontend/build/ld/configuration-lib-dynamic.make create mode 100644 xsd/build/configuration-dynamic.make create mode 100644 xsd/build/cxx/configuration-dynamic.make create mode 100644 xsd/build/cxx/gnu/configuration-dynamic.make create mode 100644 xsd/build/import/libbackend-elements/configuration-dynamic.make create mode 100644 xsd/build/import/libboost/configuration-dynamic.make create mode 100644 xsd/build/import/libcult/configuration-dynamic.make create mode 100644 xsd/build/import/libxerces-c/configuration-dynamic.make create mode 100644 xsd/build/import/libxsd-frontend/configuration-dynamic.make diff --git a/README b/README new file mode 100644 index 0000000..6dcb3ba --- /dev/null +++ b/README @@ -0,0 +1,70 @@ +This archive contains pre-configured CodeSynthesis XSD source code +with all its dependencies (except Xerces-C++ and Boost) as well as +a build script that builds the XSD compiler in non-interactive mode +(that is, without asking any questions). + +The following GNU tools are required to build XSD. Any fairly recent +GNU/Linux distribution should have these already installed: + +GNU bash >= 2.00 (bash --version) http://www.gnu.org/software/bash/ +GNU m4 >= 1.4 (m4 --version) http://www.gnu.org/software/m4/ +GNU make >= 3.81 (make --version) http://www.gnu.org/software/make/ +GNU g++ >= 3.4.3 (g++ --version) http://gcc.gnu.org/ + +The build script expects you to have the Xerces-C++ (2.6.0 or later) +as well as Boost filesystem and regex (1.33.1 or later) libraries +built and installed in a location where the g++ compiler looks by +default (normally /usr/lib/ and /usr/local/lib/). Alternatively, +you can install them into the stage/ directory in this package +or provide include (-I) and library (-L) paths via the CPPFLAGS +and LDFLAGS variables, respectively. + +The script supports the following standard variables: + +CXX (defaults to g++ if not set) +CPPFLAGS +CXXFLAGS +LDFALGS +LIBS +MAKEFLAGS + +For example: + +$ CXX=g++-4.2 CXXFLAGS=-O3 MAKEFLAGS=-j4 ./build.sh + +If you would like to see the full compiler/linker/etc., command lines, +you can add verbose=1 to MAKEFLAGS, for example: + +MAKEFLAGS="verbose=1" ./build.sh + +After the build, the XSD compiler can be found in the stage/bin/ +directory and the runtime headers in the stage/include/xsd/ +directory. You can install the XSD compiler, runtime library, and +documentation with the install target, for example: + +$ MAKEFLAGS="install_prefix=/usr" ./build.sh install + +You can fine-tune the installation locations with the following +make variables (should be set in MAKEFLAGS): + +install_prefix default is /usr/local +install_data_prefix default is install_prefix +install_exec_prefix default is install_prefix + +install_bin_dir default is install_exec_prefix/bin +install_sbin_dir default is install_exec_prefix/sbin +install_lib_dir default is install_exec_prefix/lib + +install_data_dir default is install_data_prefix/share +install_inc_dir default is install_data_prefix/include + +install_doc_dir default is install_data_dir/doc +install_man_dir default is install_data_dir/man +install_info_dir default is install_data_dir/info + +The build script also supports the clean target: + +$ ./build.sh clean + +Send bug reports or any other feedback to the xsd-users@codesynthesis.com +mailing list. diff --git a/TODO b/TODO new file mode 100644 index 0000000..30be842 --- /dev/null +++ b/TODO @@ -0,0 +1 @@ +@@ allow changing the make executable name in build.sh (MAKE var). diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..cdc1bd2 --- /dev/null +++ b/build.sh @@ -0,0 +1,117 @@ +#! /usr/bin/env bash + +trap 'exit 1' ERR + +build=build +libcult=libcult +libfe=libfrontend-elements +libbe=libbackend-elements +libxsd_fe=libxsd-frontend +xsd=xsd + +pwd=`pwd` + +MAKEFLAGS="-I$pwd/stage/include $MAKEFLAGS" + +target=$1 + +if [ "$target" = "install" ]; then + # Since we only want to install XSD, we will handle + # this target at the end. + target= +fi + + +# build +# +if [ ! -d $pwd/stage/include/build-* ]; then + make -C $build install_prefix=$pwd/stage install +fi + + +# libcult +# +make $MAKEFLAGS -C $libcult/cult $target + +if [ "$target" = "clean" ]; then + rm -f $pwd/stage/include/cult + rm -f $pwd/stage/lib/libcult.a + rm -f $libcult/build/system/configuration-dynamic.make +else + if [ ! -d $pwd/stage/include/cult ]; then + ln -s ../../$libcult/cult stage/include/ + ln -s ../../$libcult/cult/libcult.a stage/lib/ + fi +fi + + +# libfrontend-elements +# +make $MAKEFLAGS -C $libfe/frontend-elements $target + +if [ "$target" = "clean" ]; then + rm -f $pwd/stage/include/frontend-elements + rm -f $pwd/stage/lib/libfrontend-elements.a +else + if [ ! -d $pwd/stage/include/frontend-elements ]; then + ln -s ../../$libfe/frontend-elements stage/include/ + ln -s ../../$libfe/frontend-elements/libfrontend-elements.a stage/lib/ + fi +fi + + +# libbackend-elements +# +make $MAKEFLAGS -C $libbe/backend-elements $target + +if [ "$target" = "clean" ]; then + rm -f $pwd/stage/include/backend-elements +else + if [ ! -d $pwd/stage/include/backend-elements ]; then + ln -s ../../$libbe/backend-elements stage/include/ + fi +fi + + +# libxsd-frontend +# +make $MAKEFLAGS -C $libxsd_fe/xsd-frontend $target + +if [ "$target" = "clean" ]; then + rm -f $pwd/stage/include/xsd-frontend + rm -f $pwd/stage/lib/libxsd-frontend.a +else + if [ ! -d $pwd/stage/include/xsd-frontend ]; then + ln -s ../../$libxsd_fe/xsd-frontend stage/include/ + ln -s ../../$libxsd_fe/xsd-frontend/libxsd-frontend.a stage/lib/ + fi +fi + + +# xsd +# +if [ "$target" = "clean" ]; then + make $MAKEFLAGS -C $xsd clean +else + make $MAKEFLAGS -C $xsd/xsd $target +fi + +if [ "$target" = "clean" ]; then + rm -f $pwd/stage/include/xsd + rm -f $pwd/stage/bin/xsd +else + if [ ! -d $pwd/stage/include/xsd ]; then + ln -s ../../$xsd/libxsd/xsd stage/include/ + ln -s ../../$xsd/xsd/xsd stage/bin/ + fi +fi + +if [ "$1" = "install" ]; then +make $MAKEFLAGS -C $xsd install +fi + +# build (clean) +# +if [ "$target" = "clean" ]; then + rm -rf $pwd/stage/include/build-* +fi diff --git a/libbackend-elements/build/cxx/configuration-dynamic.make b/libbackend-elements/build/cxx/configuration-dynamic.make new file mode 100644 index 0000000..7485fe9 --- /dev/null +++ b/libbackend-elements/build/cxx/configuration-dynamic.make @@ -0,0 +1,14 @@ +cxx_id := gnu +cxx_optimize := n +cxx_debug := n +cxx_rpath := n +cxx_pp_extra_options := $(CPPFLAGS) -I$(out_root)/../stage/include +cxx_extra_options := $(CXXFLAGS) +cxx_ld_extra_options := $(LDFLAGS) +cxx_extra_libs := $(LIBS) + +r := $(shell echo $(LDFLAGS) | sed -e 's/-L *\([^ ]*\)/-L\1/g') +r := $(patsubst -L%,%,$(filter -L%,$(r))) +r := $(shell echo $(r) | sed -e 's/ /:/g') + +cxx_extra_lib_paths := $(out_root)/../stage/lib $(r) diff --git a/libbackend-elements/build/cxx/gnu/configuration-dynamic.make b/libbackend-elements/build/cxx/gnu/configuration-dynamic.make new file mode 100644 index 0000000..f3fe64d --- /dev/null +++ b/libbackend-elements/build/cxx/gnu/configuration-dynamic.make @@ -0,0 +1,8 @@ +ifneq ($(CXX),) +cxx_gnu := $(CXX) +else +cxx_gnu := g++ +endif + +cxx_gnu_libraries := +cxx_gnu_optimization_options := diff --git a/libbackend-elements/build/import/libboost/configuration-dynamic.make b/libbackend-elements/build/import/libboost/configuration-dynamic.make new file mode 100644 index 0000000..a33bf20 --- /dev/null +++ b/libbackend-elements/build/import/libboost/configuration-dynamic.make @@ -0,0 +1 @@ +libboost_installed := y diff --git a/libbackend-elements/build/import/libcult/configuration-dynamic.make b/libbackend-elements/build/import/libcult/configuration-dynamic.make new file mode 100644 index 0000000..78c41d3 --- /dev/null +++ b/libbackend-elements/build/import/libcult/configuration-dynamic.make @@ -0,0 +1 @@ +libcult_installed := y diff --git a/libbackend-elements/build/ld/configuration-lib-dynamic.make b/libbackend-elements/build/ld/configuration-lib-dynamic.make new file mode 100644 index 0000000..c2c560c --- /dev/null +++ b/libbackend-elements/build/ld/configuration-lib-dynamic.make @@ -0,0 +1,3 @@ +ld_lib_type := archive +ld_lib_ar := ar +ld_lib_ranlib := ranlib diff --git a/libcult/build/configuration-dynamic.make b/libcult/build/configuration-dynamic.make new file mode 100644 index 0000000..e027b0b --- /dev/null +++ b/libcult/build/configuration-dynamic.make @@ -0,0 +1,3 @@ +cult_dr := n +cult_threads := n +cult_network := n diff --git a/libcult/build/cxx/configuration-dynamic.make b/libcult/build/cxx/configuration-dynamic.make new file mode 100644 index 0000000..7485fe9 --- /dev/null +++ b/libcult/build/cxx/configuration-dynamic.make @@ -0,0 +1,14 @@ +cxx_id := gnu +cxx_optimize := n +cxx_debug := n +cxx_rpath := n +cxx_pp_extra_options := $(CPPFLAGS) -I$(out_root)/../stage/include +cxx_extra_options := $(CXXFLAGS) +cxx_ld_extra_options := $(LDFLAGS) +cxx_extra_libs := $(LIBS) + +r := $(shell echo $(LDFLAGS) | sed -e 's/-L *\([^ ]*\)/-L\1/g') +r := $(patsubst -L%,%,$(filter -L%,$(r))) +r := $(shell echo $(r) | sed -e 's/ /:/g') + +cxx_extra_lib_paths := $(out_root)/../stage/lib $(r) diff --git a/libcult/build/cxx/gnu/configuration-dynamic.make b/libcult/build/cxx/gnu/configuration-dynamic.make new file mode 100644 index 0000000..f3fe64d --- /dev/null +++ b/libcult/build/cxx/gnu/configuration-dynamic.make @@ -0,0 +1,8 @@ +ifneq ($(CXX),) +cxx_gnu := $(CXX) +else +cxx_gnu := g++ +endif + +cxx_gnu_libraries := +cxx_gnu_optimization_options := diff --git a/libcult/build/ld/configuration-lib-dynamic.make b/libcult/build/ld/configuration-lib-dynamic.make new file mode 100644 index 0000000..c2c560c --- /dev/null +++ b/libcult/build/ld/configuration-lib-dynamic.make @@ -0,0 +1,3 @@ +ld_lib_type := archive +ld_lib_ar := ar +ld_lib_ranlib := ranlib diff --git a/libfrontend-elements/build/cxx/configuration-dynamic.make b/libfrontend-elements/build/cxx/configuration-dynamic.make new file mode 100644 index 0000000..7485fe9 --- /dev/null +++ b/libfrontend-elements/build/cxx/configuration-dynamic.make @@ -0,0 +1,14 @@ +cxx_id := gnu +cxx_optimize := n +cxx_debug := n +cxx_rpath := n +cxx_pp_extra_options := $(CPPFLAGS) -I$(out_root)/../stage/include +cxx_extra_options := $(CXXFLAGS) +cxx_ld_extra_options := $(LDFLAGS) +cxx_extra_libs := $(LIBS) + +r := $(shell echo $(LDFLAGS) | sed -e 's/-L *\([^ ]*\)/-L\1/g') +r := $(patsubst -L%,%,$(filter -L%,$(r))) +r := $(shell echo $(r) | sed -e 's/ /:/g') + +cxx_extra_lib_paths := $(out_root)/../stage/lib $(r) diff --git a/libfrontend-elements/build/cxx/gnu/configuration-dynamic.make b/libfrontend-elements/build/cxx/gnu/configuration-dynamic.make new file mode 100644 index 0000000..f3fe64d --- /dev/null +++ b/libfrontend-elements/build/cxx/gnu/configuration-dynamic.make @@ -0,0 +1,8 @@ +ifneq ($(CXX),) +cxx_gnu := $(CXX) +else +cxx_gnu := g++ +endif + +cxx_gnu_libraries := +cxx_gnu_optimization_options := diff --git a/libfrontend-elements/build/import/libcult/configuration-dynamic.make b/libfrontend-elements/build/import/libcult/configuration-dynamic.make new file mode 100644 index 0000000..78c41d3 --- /dev/null +++ b/libfrontend-elements/build/import/libcult/configuration-dynamic.make @@ -0,0 +1 @@ +libcult_installed := y diff --git a/libfrontend-elements/build/ld/configuration-lib-dynamic.make b/libfrontend-elements/build/ld/configuration-lib-dynamic.make new file mode 100644 index 0000000..c2c560c --- /dev/null +++ b/libfrontend-elements/build/ld/configuration-lib-dynamic.make @@ -0,0 +1,3 @@ +ld_lib_type := archive +ld_lib_ar := ar +ld_lib_ranlib := ranlib diff --git a/libxsd-frontend/build/cxx/configuration-dynamic.make b/libxsd-frontend/build/cxx/configuration-dynamic.make new file mode 100644 index 0000000..7485fe9 --- /dev/null +++ b/libxsd-frontend/build/cxx/configuration-dynamic.make @@ -0,0 +1,14 @@ +cxx_id := gnu +cxx_optimize := n +cxx_debug := n +cxx_rpath := n +cxx_pp_extra_options := $(CPPFLAGS) -I$(out_root)/../stage/include +cxx_extra_options := $(CXXFLAGS) +cxx_ld_extra_options := $(LDFLAGS) +cxx_extra_libs := $(LIBS) + +r := $(shell echo $(LDFLAGS) | sed -e 's/-L *\([^ ]*\)/-L\1/g') +r := $(patsubst -L%,%,$(filter -L%,$(r))) +r := $(shell echo $(r) | sed -e 's/ /:/g') + +cxx_extra_lib_paths := $(out_root)/../stage/lib $(r) diff --git a/libxsd-frontend/build/cxx/gnu/configuration-dynamic.make b/libxsd-frontend/build/cxx/gnu/configuration-dynamic.make new file mode 100644 index 0000000..f3fe64d --- /dev/null +++ b/libxsd-frontend/build/cxx/gnu/configuration-dynamic.make @@ -0,0 +1,8 @@ +ifneq ($(CXX),) +cxx_gnu := $(CXX) +else +cxx_gnu := g++ +endif + +cxx_gnu_libraries := +cxx_gnu_optimization_options := diff --git a/libxsd-frontend/build/import/libboost/configuration-dynamic.make b/libxsd-frontend/build/import/libboost/configuration-dynamic.make new file mode 100644 index 0000000..a33bf20 --- /dev/null +++ b/libxsd-frontend/build/import/libboost/configuration-dynamic.make @@ -0,0 +1 @@ +libboost_installed := y diff --git a/libxsd-frontend/build/import/libcult/configuration-dynamic.make b/libxsd-frontend/build/import/libcult/configuration-dynamic.make new file mode 100644 index 0000000..78c41d3 --- /dev/null +++ b/libxsd-frontend/build/import/libcult/configuration-dynamic.make @@ -0,0 +1 @@ +libcult_installed := y diff --git a/libxsd-frontend/build/import/libfrontend-elements/configuration-dynamic.make b/libxsd-frontend/build/import/libfrontend-elements/configuration-dynamic.make new file mode 100644 index 0000000..6583182 --- /dev/null +++ b/libxsd-frontend/build/import/libfrontend-elements/configuration-dynamic.make @@ -0,0 +1 @@ +libfrontend_elements_installed := y diff --git a/libxsd-frontend/build/import/libxerces-c/configuration-dynamic.make b/libxsd-frontend/build/import/libxerces-c/configuration-dynamic.make new file mode 100644 index 0000000..91f61b2 --- /dev/null +++ b/libxsd-frontend/build/import/libxerces-c/configuration-dynamic.make @@ -0,0 +1 @@ +libxerces_c_installed := y diff --git a/libxsd-frontend/build/ld/configuration-lib-dynamic.make b/libxsd-frontend/build/ld/configuration-lib-dynamic.make new file mode 100644 index 0000000..c2c560c --- /dev/null +++ b/libxsd-frontend/build/ld/configuration-lib-dynamic.make @@ -0,0 +1,3 @@ +ld_lib_type := archive +ld_lib_ar := ar +ld_lib_ranlib := ranlib diff --git a/xsd/build/configuration-dynamic.make b/xsd/build/configuration-dynamic.make new file mode 100644 index 0000000..4a21920 --- /dev/null +++ b/xsd/build/configuration-dynamic.make @@ -0,0 +1,6 @@ +xsd_with_ace := n +xsd_with_xdr := n +xsd_with_dbxml := n +xsd_with_xqilla := n +xsd_with_boost_date_time := n +xsd_with_boost_serialization := n diff --git a/xsd/build/cxx/configuration-dynamic.make b/xsd/build/cxx/configuration-dynamic.make new file mode 100644 index 0000000..7485fe9 --- /dev/null +++ b/xsd/build/cxx/configuration-dynamic.make @@ -0,0 +1,14 @@ +cxx_id := gnu +cxx_optimize := n +cxx_debug := n +cxx_rpath := n +cxx_pp_extra_options := $(CPPFLAGS) -I$(out_root)/../stage/include +cxx_extra_options := $(CXXFLAGS) +cxx_ld_extra_options := $(LDFLAGS) +cxx_extra_libs := $(LIBS) + +r := $(shell echo $(LDFLAGS) | sed -e 's/-L *\([^ ]*\)/-L\1/g') +r := $(patsubst -L%,%,$(filter -L%,$(r))) +r := $(shell echo $(r) | sed -e 's/ /:/g') + +cxx_extra_lib_paths := $(out_root)/../stage/lib $(r) diff --git a/xsd/build/cxx/gnu/configuration-dynamic.make b/xsd/build/cxx/gnu/configuration-dynamic.make new file mode 100644 index 0000000..f3fe64d --- /dev/null +++ b/xsd/build/cxx/gnu/configuration-dynamic.make @@ -0,0 +1,8 @@ +ifneq ($(CXX),) +cxx_gnu := $(CXX) +else +cxx_gnu := g++ +endif + +cxx_gnu_libraries := +cxx_gnu_optimization_options := diff --git a/xsd/build/import/libbackend-elements/configuration-dynamic.make b/xsd/build/import/libbackend-elements/configuration-dynamic.make new file mode 100644 index 0000000..fd03110 --- /dev/null +++ b/xsd/build/import/libbackend-elements/configuration-dynamic.make @@ -0,0 +1 @@ +libbackend_elements_installed := y diff --git a/xsd/build/import/libboost/configuration-dynamic.make b/xsd/build/import/libboost/configuration-dynamic.make new file mode 100644 index 0000000..a33bf20 --- /dev/null +++ b/xsd/build/import/libboost/configuration-dynamic.make @@ -0,0 +1 @@ +libboost_installed := y diff --git a/xsd/build/import/libcult/configuration-dynamic.make b/xsd/build/import/libcult/configuration-dynamic.make new file mode 100644 index 0000000..78c41d3 --- /dev/null +++ b/xsd/build/import/libcult/configuration-dynamic.make @@ -0,0 +1 @@ +libcult_installed := y diff --git a/xsd/build/import/libxerces-c/configuration-dynamic.make b/xsd/build/import/libxerces-c/configuration-dynamic.make new file mode 100644 index 0000000..91f61b2 --- /dev/null +++ b/xsd/build/import/libxerces-c/configuration-dynamic.make @@ -0,0 +1 @@ +libxerces_c_installed := y diff --git a/xsd/build/import/libxsd-frontend/configuration-dynamic.make b/xsd/build/import/libxsd-frontend/configuration-dynamic.make new file mode 100644 index 0000000..1b2d3ca --- /dev/null +++ b/xsd/build/import/libxsd-frontend/configuration-dynamic.make @@ -0,0 +1 @@ +libxsd_frontend_installed := y -- cgit v1.1