Repository: incubator-hawq Updated Branches: refs/heads/master f8fd15e37 -> 156e98353
HAWQ-711. Integrate libhdfs3 and libyarn makefile into hawq This is based on Liming's work, i.e. commit 1b0e6e2d728b5f4f9da09ecc19dc32c87a9fdc81 This patch will make that we do not need to build libhdfs and libyarn seperately before building hawq. Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/156e9835 Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/156e9835 Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/156e9835 Branch: refs/heads/master Commit: 156e98353977e807947a11e1c4137f837076bf22 Parents: f8fd15e Author: Paul Guo <[email protected]> Authored: Tue May 10 10:18:47 2016 +0800 Committer: Ruilong Huo <[email protected]> Committed: Tue May 10 11:29:36 2016 +0800 ---------------------------------------------------------------------- GNUmakefile.in | 8 + configure | 290 ++++++++++--------------------- configure.in | 5 +- depends/libhdfs3/.gitignore | 2 + depends/libhdfs3/CMakeLists.txt | 2 +- depends/libhdfs3/Makefile | 48 +++++ depends/libhdfs3/Makefile.global.in | 22 +++ depends/libyarn/.gitignore | 2 + depends/libyarn/CMakeLists.txt | 2 +- depends/libyarn/Makefile | 48 +++++ depends/libyarn/Makefile.global.in | 22 +++ 11 files changed, 247 insertions(+), 204 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/156e9835/GNUmakefile.in ---------------------------------------------------------------------- diff --git a/GNUmakefile.in b/GNUmakefile.in index 3f1a624..4da5951 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -10,6 +10,8 @@ include $(top_builddir)/src/Makefile.global all: # $(MAKE) -C doc all + $(MAKE) -C depends/libhdfs3 all + $(MAKE) -C depends/libyarn all $(MAKE) -C src all $(MAKE) -C config all $(MAKE) -C contrib/formatter_fixedwidth all @@ -22,6 +24,8 @@ all: install: # $(MAKE) -C doc $@ + $(MAKE) -C depends/libhdfs3 $@ + $(MAKE) -C depends/libyarn $@ $(MAKE) -C src $@ $(MAKE) -C config $@ $(MAKE) -C contrib/formatter_fixedwidth $@ @@ -59,6 +63,8 @@ feature_test_clean: clean: # $(MAKE) -C doc $@ $(MAKE) -C contrib $@ + $(MAKE) -C depends/libhdfs3 $@ + $(MAKE) -C depends/libyarn $@ $(MAKE) -C src $@ $(MAKE) -C config $@ $(MAKE) -C contrib/formatter_fixedwidth $@ @@ -76,6 +82,8 @@ clean: distclean maintainer-clean: # -$(MAKE) -C doc $@ -$(MAKE) -C contrib $@ + -$(MAKE) -C depends/libhdfs3 $@ + -$(MAKE) -C depends/libyarn $@ -$(MAKE) -C config $@ -$(MAKE) -C tools $@ -$(MAKE) -C src $@ http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/156e9835/configure ---------------------------------------------------------------------- diff --git a/configure b/configure index 34f2788..46008e4 100755 --- a/configure +++ b/configure @@ -2,7 +2,7 @@ # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for HAWQ 8.2.15. # -# Report bugs to https://issues.apache.org/jira/browse/HAWQ +# Report bugs to <https://issues.apache.org/jira/browse/HAWQ>. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -269,11 +269,10 @@ fi $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell [email protected] and -$0: https://issues.apache.org/jira/browse/HAWQ -$0: about your system, including any -$0: error possibly output before this message. Then install -$0: a modern shell, or manually run the script under such a -$0: shell if you do have one." +$0: https://issues.apache.org/jira/browse/HAWQ about your +$0: system, including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." fi exit 1 fi @@ -716,6 +715,8 @@ EGREP GREP with_rt ADDON_DIR +with_libyarn +with_libhdfs3 with_zlib with_system_tzdata with_openssl @@ -841,7 +842,6 @@ enable_cassert enable_forceplan enable_debugbreak enable_debugntuplestore -enable_mdverinstrumentation enable_testutils enable_snmp enable_gphdfs @@ -865,6 +865,8 @@ with_openssl with_readline with_libedit_preferred with_system_tzdata +with_libhdfs3 +with_libyarn with_zlib with_rt with_gnu_ld @@ -1516,7 +1518,6 @@ disable 64-bit integer date/time support --enable-forceplan enable forcing of plans via EXPLAIN FORCE (for debugging) --enable-debugbreak enable debug_break and debug_break_n (for debugging) --enable-ntuplestore enable debug_ntuplestore (for debugging) - --enable-mdverinstrumentation enable metadata versioning instrumentation --enable-testutils enable testing utilities --enable-snmp enable snmp for MIB and alerts via TRAP/INFORM --enable-gphdfs enables GPHDFS support @@ -1550,6 +1551,8 @@ Optional Packages: --with-ldap build with LDAP support --with-bonjour build with Bonjour support --with-openssl build with OpenSSL support + --without-libyarn do not build libyarn + --without-libhdfs3 do not build libhdfs3 --without-readline do not use GNU Readline nor BSD Libedit for editing --without-libedit-preferred Don't prefer BSD Libedit over GNU Readline --with-system-tzdata=DIR use system time zone data in DIR @@ -1579,7 +1582,7 @@ Some influential environment variables: Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to https://issues.apache.org/jira/browse/HAWQ +Report bugs to <https://issues.apache.org/jira/browse/HAWQ>. _ACEOF ac_status=$? fi @@ -1849,9 +1852,9 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## ------------------------------------ ## +( $as_echo "## --------------------------------------------------------- ## ## Report this to https://issues.apache.org/jira/browse/HAWQ ## -## ------------------------------------ ##" +## --------------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac @@ -2088,9 +2091,9 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( $as_echo "## --------------------------------------------------- ## +( $as_echo "## --------------------------------------------------------- ## ## Report this to https://issues.apache.org/jira/browse/HAWQ ## -## -------------------------------------------------- ##" +## --------------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac @@ -5336,34 +5339,6 @@ fi -# Enable metadata versioning instrumentation - -pgac_args="$pgac_args enable_mdverinstrumentation" - -# Check whether --enable-mdverinstrumentation was given. -if test "${enable_mdverinstrumentation+set}" = set; then : - enableval=$enable_mdverinstrumentation; - case $enableval in - yes) - -$as_echo "#define MD_VERSIONING_INSTRUMENTATION 1" >>confdefs.h - - ;; - no) - : - ;; - *) - as_fn_error $? "no argument expected for --enable-mdverinstrumentation option" "$LINENO" 5 - ;; - esac - -else - enable_mdverinstrumentation=no - -fi - - - # # Enable testing utilities # @@ -5532,9 +5507,6 @@ fi - - - # # Include directories # @@ -5797,6 +5769,73 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_java" >&5 $as_echo "$with_java" >&6; } +# +# Optionally build libhdfs3 +# +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build libhdfs3" >&5 +$as_echo_n "checking whether to build libhdfs3" >&6; } + +pgac_args="$pgac_args with_libhdfs3" + + +# Check whether --with-libhdfs3 was given. +if test "${with_libhdfs3+set}" = set; then : + withval=$with_libhdfs3; + case $withval in + yes) + : + ;; + no) + : + ;; + *) + as_fn_error $? "no argument expected for --with-libhdfs3 option" "$LINENO" 5 + ;; + esac + +else + with_libhdfs3=yes + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libhdfs3" >&5 +$as_echo "$with_libhdfs3" >&6; } + + +# +# Optionally build libyarn +# +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build libyarn" >&5 +$as_echo_n "checking whether to build libyarn" >&6; } + +pgac_args="$pgac_args with_libyarn" + + +# Check whether --with-libyarn was given. +if test "${with_libyarn+set}" = set; then : + withval=$with_libyarn; + case $withval in + yes) + : + ;; + no) + : + ;; + *) + as_fn_error $? "no argument expected for --with-libyarn option" "$LINENO" 5 + ;; + esac + +else + with_libyarn=yes + +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libyarn" >&5 +$as_echo "$with_libyarn" >&6; } + # @@ -11125,10 +11164,10 @@ fi for ac_header in json-c/json.h do : - ac_fn_c_check_header_mongrel "$LINENO" "json-c/json.h" "ac_cv_header_json_json_h" "$ac_includes_default" -if test "x$ac_cv_header_json_json_h" = xyes; then : + ac_fn_c_check_header_mongrel "$LINENO" "json-c/json.h" "ac_cv_header_json_c_json_h" "$ac_includes_default" +if test "x$ac_cv_header_json_c_json_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_JSON_JSON_H 1 +#define HAVE_JSON_C_JSON_H 1 _ACEOF else @@ -11461,157 +11500,6 @@ rm -f core conftest.err conftest.$ac_objext \ pgac_args="$pgac_args with_xml_prefix with_xml_exec_prefix enable_xmltest" CFLAGS="$CFLAGS $XML_CPPFLAGS" -# libhdfs3 - -for ac_header in hdfs/hdfs.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "hdfs/hdfs.h" "ac_cv_header_hdfs_hdfs_h" "$ac_includes_default" -if test "x$ac_cv_header_hdfs_hdfs_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_HDFS_HDFS_H 1 -_ACEOF - -else - as_fn_error $? "libhdfs3 is required" "$LINENO" 5 -fi - -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing hdfsOpenFile" >&5 -$as_echo_n "checking for library containing hdfsOpenFile... " >&6; } -if ${ac_cv_search_hdfsOpenFile+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char hdfsOpenFile (); -int -main () -{ -return hdfsOpenFile (); - ; - return 0; -} -_ACEOF -for ac_lib in '' hdfs3; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_hdfsOpenFile=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_hdfsOpenFile+:} false; then : - break -fi -done -if ${ac_cv_search_hdfsOpenFile+:} false; then : - -else - ac_cv_search_hdfsOpenFile=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_hdfsOpenFile" >&5 -$as_echo "$ac_cv_search_hdfsOpenFile" >&6; } -ac_res=$ac_cv_search_hdfsOpenFile -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -else - as_fn_error $? "libhdfs3 is required" "$LINENO" 5 -fi - - - -# libyarn - -for ac_header in libyarn/LibYarnClientC.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "libyarn/LibYarnClientC.h" "ac_cv_header_libyarn_LibYarnClientC_h" "$ac_includes_default" -if test "x$ac_cv_header_libyarn_LibYarnClientC_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBYARN_LIBYARNCLIENTC_H 1 -_ACEOF - -else - as_fn_error $? "libyarn is required" "$LINENO" 5 -fi - -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing newLibYarnClient" >&5 -$as_echo_n "checking for library containing newLibYarnClient... " >&6; } -if ${ac_cv_search_newLibYarnClient+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char newLibYarnClient (); -int -main () -{ -return newLibYarnClient (); - ; - return 0; -} -_ACEOF -for ac_lib in '' yarn; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_newLibYarnClient=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_newLibYarnClient+:} false; then : - break -fi -done -if ${ac_cv_search_newLibYarnClient+:} false; then : - -else - ac_cv_search_newLibYarnClient=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_newLibYarnClient" >&5 -$as_echo "$ac_cv_search_newLibYarnClient" >&6; } -ac_res=$ac_cv_search_newLibYarnClient -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -else - as_fn_error $? "libyarn is required" "$LINENO" 5 -fi - - # apr for gpfdist # Extract the first word of "apr-1-config", so it can be a program name with args. set dummy apr-1-config; ac_word=$2 @@ -16540,7 +16428,7 @@ fi -ac_config_files="$ac_config_files GNUmakefile src/VERSIONS.mk src/Makefile.global src/pl/pljava/src/java/Makefile.global" +ac_config_files="$ac_config_files GNUmakefile src/VERSIONS.mk depends/libhdfs3/Makefile.global depends/libyarn/Makefile.global src/Makefile.global src/pl/pljava/src/java/Makefile.global" ac_config_links="$ac_config_links src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c src/backend/port/pg_sema.c:${SEMA_IMPLEMENTATION} src/backend/port/pg_shmem.c:${SHMEM_IMPLEMENTATION} src/include/dynloader.h:src/backend/port/dynloader/${template}.h src/include/pg_config_os.h:src/include/port/${template}.h src/Makefile.port:src/makefiles/Makefile.${template}" @@ -17128,7 +17016,7 @@ $config_links Configuration commands: $config_commands -Report bugs to https://issues.apache.org/jira/browse/HAWQ" +Report bugs to <https://issues.apache.org/jira/browse/HAWQ>." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -17260,6 +17148,8 @@ do "src/backend/port/tas.s") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/tas.s:src/backend/port/tas/${tas_file}" ;; "GNUmakefile") CONFIG_FILES="$CONFIG_FILES GNUmakefile" ;; "src/VERSIONS.mk") CONFIG_FILES="$CONFIG_FILES src/VERSIONS.mk" ;; + "depends/libhdfs3/Makefile.global") CONFIG_FILES="$CONFIG_FILES depends/libhdfs3/Makefile.global" ;; + "depends/libyarn/Makefile.global") CONFIG_FILES="$CONFIG_FILES depends/libyarn/Makefile.global" ;; "src/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/Makefile.global" ;; "src/pl/pljava/src/java/Makefile.global") CONFIG_FILES="$CONFIG_FILES src/pl/pljava/src/java/Makefile.global" ;; "src/backend/port/dynloader.c") CONFIG_LINKS="$CONFIG_LINKS src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c" ;; http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/156e9835/configure.in ---------------------------------------------------------------------- diff --git a/configure.in b/configure.in index a5b322b..f1fdc02 100644 --- a/configure.in +++ b/configure.in @@ -17,7 +17,7 @@ dnl Read the Autoconf manual for details. dnl m4_pattern_forbid(^PGAC_)dnl to catch undefined macros -AC_INIT([HAWQ], [8.2.15], [[email protected]]) +AC_INIT([HAWQ], [8.2.15], [https://issues.apache.org/jira/browse/HAWQ]) AC_PREREQ(2.63) dnl m4_if(m4_defn([m4_PACKAGE_VERSION]), [2.63], [], [m4_fatal([Autoconf version 2.63 is required. @@ -310,6 +310,7 @@ elif test "$GCC" = yes; then CFLAGS="-O0" else CFLAGS="-O3" + fi else # if the user selected debug mode, don't use -O if test "$enable_debug" != yes; then @@ -2055,7 +2056,7 @@ fi AC_SUBST(vpath_build) -AC_CONFIG_FILES([GNUmakefile src/VERSIONS.mk src/Makefile.global src/pl/pljava/src/java/Makefile.global]) +AC_CONFIG_FILES([GNUmakefile src/VERSIONS.mk depends/libhdfs3/Makefile.global depends/libyarn/Makefile.global src/Makefile.global src/pl/pljava/src/java/Makefile.global]) AC_CONFIG_LINKS([ src/backend/port/dynloader.c:src/backend/port/dynloader/${template}.c http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/156e9835/depends/libhdfs3/.gitignore ---------------------------------------------------------------------- diff --git a/depends/libhdfs3/.gitignore b/depends/libhdfs3/.gitignore new file mode 100644 index 0000000..8341b2e --- /dev/null +++ b/depends/libhdfs3/.gitignore @@ -0,0 +1,2 @@ +build/ +Makefile.global http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/156e9835/depends/libhdfs3/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/depends/libhdfs3/CMakeLists.txt b/depends/libhdfs3/CMakeLists.txt index 0700861..31b6601 100644 --- a/depends/libhdfs3/CMakeLists.txt +++ b/depends/libhdfs3/CMakeLists.txt @@ -21,7 +21,7 @@ FIND_PACKAGE(LibXml2 REQUIRED) FIND_PACKAGE(Protobuf REQUIRED) FIND_PACKAGE(KERBEROS REQUIRED) FIND_PACKAGE(GSasl REQUIRED) -FIND_PACKAGE(GoogleTest REQUIRED) +#FIND_PACKAGE(GoogleTest REQUIRED) IF(OS_LINUX) FIND_PACKAGE(LibUUID REQUIRED) http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/156e9835/depends/libhdfs3/Makefile ---------------------------------------------------------------------- diff --git a/depends/libhdfs3/Makefile b/depends/libhdfs3/Makefile new file mode 100644 index 0000000..c5702ae --- /dev/null +++ b/depends/libhdfs3/Makefile @@ -0,0 +1,48 @@ +# -*-makefile-*- +#------------------------------------------------------------------------------ +# A makefile that integrate building this module with hawq +#------------------------------------------------------------------------------ +subdir = depends/libhdfs3 +top_builddir = ../../ +include Makefile.global + +PRE_CFG_ARG = +# get argument for running ../boostrap +ifeq ($(enable_debug), yes) + PRE_CFG_ARG += --enable-debug +endif # enable_debug + +ifeq ($(enable_coverage), yes) + PRE_CFG_ARG += --enable-coverage +endif # enable_coverage + +########################################################################## +# +.PHONY: all install distclean maintainer-clean clean pre-config + +ifeq ($(with_libhdfs3), yes) + +all: pre-config + cd $(top_srcdir)/$(subdir)/build && $(MAKE) + +install: all + cd $(top_srcdir)/$(subdir)/build && $(MAKE) install + +distclean: + rm -rf $(top_srcdir)/$(subdir)/build + +maintainer-clean: distclean + +clean: + if [ -d $(top_srcdir)/$(subdir)/build ]; then \ + cd $(top_srcdir)/$(subdir)/build && $(MAKE) clean; \ + fi + +pre-config: + cd $(top_srcdir)/$(subdir)/ && mkdir -p build && cd build && ../bootstrap --prefix=$(prefix) $(PRE_CFG_ARG) + +else + +all install distclean maintainer-clean clean pre-config: + +endif http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/156e9835/depends/libhdfs3/Makefile.global.in ---------------------------------------------------------------------- diff --git a/depends/libhdfs3/Makefile.global.in b/depends/libhdfs3/Makefile.global.in new file mode 100644 index 0000000..745de2b --- /dev/null +++ b/depends/libhdfs3/Makefile.global.in @@ -0,0 +1,22 @@ +# -*-makefile-*- +#------------------------------------------------------------------------------ +# A makefile that integrate building this module with hawq +#------------------------------------------------------------------------------ + +prefix := @prefix@ +enable_debug = @enable_debug@ +enable_coverage = @enable_coverage@ +with_libhdfs3 = @with_libhdfs3@ + +# Support for VPATH builds +vpath_build = @vpath_build@ +abs_top_srcdir = @abs_top_srcdir@ + +ifneq ($(vpath_build),yes) +top_srcdir = $(top_builddir) +srcdir = . +else # vpath_build = yes +top_srcdir = $(abs_top_srcdir) +srcdir = $(top_srcdir)/$(subdir) +VPATH = $(srcdir) +endif http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/156e9835/depends/libyarn/.gitignore ---------------------------------------------------------------------- diff --git a/depends/libyarn/.gitignore b/depends/libyarn/.gitignore new file mode 100644 index 0000000..8341b2e --- /dev/null +++ b/depends/libyarn/.gitignore @@ -0,0 +1,2 @@ +build/ +Makefile.global http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/156e9835/depends/libyarn/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/depends/libyarn/CMakeLists.txt b/depends/libyarn/CMakeLists.txt index e323472..a9a7637 100644 --- a/depends/libyarn/CMakeLists.txt +++ b/depends/libyarn/CMakeLists.txt @@ -21,7 +21,7 @@ FIND_PACKAGE(LibXml2 REQUIRED) FIND_PACKAGE(Protobuf REQUIRED) FIND_PACKAGE(KERBEROS REQUIRED) FIND_PACKAGE(GSasl REQUIRED) -FIND_PACKAGE(GoogleTest REQUIRED) +#FIND_PACKAGE(GoogleTest REQUIRED) ADD_SUBDIRECTORY(mock) ADD_SUBDIRECTORY(src) http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/156e9835/depends/libyarn/Makefile ---------------------------------------------------------------------- diff --git a/depends/libyarn/Makefile b/depends/libyarn/Makefile new file mode 100644 index 0000000..20b71f2 --- /dev/null +++ b/depends/libyarn/Makefile @@ -0,0 +1,48 @@ +# -*-makefile-*- +#------------------------------------------------------------------------------ +# A makefile that integrate building this module with hawq +#------------------------------------------------------------------------------ +subdir = depends/libyarn +top_builddir = ../../ +include Makefile.global + +PRE_CFG_ARG = +# get argument for running ../boostrap +ifeq ($(enable_debug), yes) + PRE_CFG_ARG += --enable-debug +endif # enable_debug + +ifeq ($(enable_coverage), yes) + PRE_CFG_ARG += --enable-coverage +endif # enable_coverage + +########################################################################## +# +.PHONY: all install distclean maintainer-clean clean pre-config + +ifeq ($(with_libyarn), yes) + +all: pre-config + cd $(top_srcdir)/$(subdir)/build && $(MAKE) + +install: all + cd $(top_srcdir)/$(subdir)/build && $(MAKE) install + +distclean: + rm -rf $(top_srcdir)/$(subdir)/build + +maintainer-clean: distclean + +clean: + if [ -d $(top_srcdir)/$(subdir)/build ]; then \ + cd $(top_srcdir)/$(subdir)/build && $(MAKE) clean; \ + fi + +pre-config: + cd $(top_srcdir)/$(subdir)/ && mkdir -p build && cd build && ../bootstrap --prefix=$(prefix) $(PRE_CFG_ARG) + +else + +all install distclean maintainer-clean clean pre-config: + +endif http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/156e9835/depends/libyarn/Makefile.global.in ---------------------------------------------------------------------- diff --git a/depends/libyarn/Makefile.global.in b/depends/libyarn/Makefile.global.in new file mode 100644 index 0000000..b3806aa --- /dev/null +++ b/depends/libyarn/Makefile.global.in @@ -0,0 +1,22 @@ +# -*-makefile-*- +#------------------------------------------------------------------------------ +# A makefile that integrate building this module with hawq +#------------------------------------------------------------------------------ + +prefix := @prefix@ +enable_debug = @enable_debug@ +enable_coverage = @enable_coverage@ +with_libyarn = @with_libyarn@ + +# Support for VPATH builds +vpath_build = @vpath_build@ +abs_top_srcdir = @abs_top_srcdir@ + +ifneq ($(vpath_build),yes) +top_srcdir = $(top_builddir) +srcdir = . +else # vpath_build = yes +top_srcdir = $(abs_top_srcdir) +srcdir = $(top_srcdir)/$(subdir) +VPATH = $(srcdir) +endif
