You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by iw...@apache.org on 2016/06/17 03:06:21 UTC
incubator-hawq git commit: HAWQ-824. Move orca submodules to depends/
Repository: incubator-hawq
Updated Branches:
refs/heads/master d9b1848a4 -> 0e62247f3
HAWQ-824. Move orca submodules to depends/
This patch also optmized the makefiles for gpopt/gpora/gpos/gp-xerces.
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/0e62247f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/0e62247f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/0e62247f
Branch: refs/heads/master
Commit: 0e62247f3822dd2101d47d47990e8fb00929b4df
Parents: d9b1848
Author: Paul Guo <pa...@gmail.com>
Authored: Thu Jun 16 11:10:40 2016 +0800
Committer: ivan <iw...@pivotal.io>
Committed: Fri Jun 17 11:05:43 2016 +0800
----------------------------------------------------------------------
.gitmodules | 12 ++--
depends/thirdparty/.gitignore | 4 ++
depends/thirdparty/gp-xerces | 1 +
depends/thirdparty/gporca | 1 +
depends/thirdparty/gpos | 1 +
src/backend/.gitignore | 4 --
src/backend/Makefile | 123 ++++++++++++++-----------------------
src/backend/gp-xerces | 1 -
src/backend/gpopt/Makefile | 26 +++-----
src/backend/gpopt/gpopt.mk | 10 +--
src/backend/gporca | 1 -
src/backend/gpos | 1 -
12 files changed, 76 insertions(+), 109 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0e62247f/.gitmodules
----------------------------------------------------------------------
diff --git a/.gitmodules b/.gitmodules
index f289853..6e33770 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,11 +1,11 @@
-[submodule "src/backend/gp-xerces"]
- path = src/backend/gp-xerces
+[submodule "depends/thirdparty/gp-xerces"]
+ path = depends/thirdparty/gp-xerces
url = https://github.com/greenplum-db/gp-xerces.git
-[submodule "src/backend/gpos"]
- path = src/backend/gpos
+[submodule "depends/thirdparty/gpos"]
+ path = depends/thirdparty/gpos
url = https://github.com/greenplum-db/gpos.git
-[submodule "src/backend/gporca"]
- path = src/backend/gporca
+[submodule "depends/thirdparty/gporca"]
+ path = depends/thirdparty/gporca
url = https://github.com/greenplum-db/gporca.git
[submodule "src/pl/plr"]
path = src/pl/plr
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0e62247f/depends/thirdparty/.gitignore
----------------------------------------------------------------------
diff --git a/depends/thirdparty/.gitignore b/depends/thirdparty/.gitignore
index 6c21398..2fc21c9 100644
--- a/depends/thirdparty/.gitignore
+++ b/depends/thirdparty/.gitignore
@@ -1 +1,5 @@
pg_prepare_timestamp
+orca_prepare_timestamp
+gp-xerces_build_timestamp
+gporca_build_timestamp
+gpos_build_timestamp
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0e62247f/depends/thirdparty/gp-xerces
----------------------------------------------------------------------
diff --git a/depends/thirdparty/gp-xerces b/depends/thirdparty/gp-xerces
new file mode 160000
index 0000000..f07c17d
--- /dev/null
+++ b/depends/thirdparty/gp-xerces
@@ -0,0 +1 @@
+Subproject commit f07c17da813f44d8da17067a76491ca4b1deb02f
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0e62247f/depends/thirdparty/gporca
----------------------------------------------------------------------
diff --git a/depends/thirdparty/gporca b/depends/thirdparty/gporca
new file mode 160000
index 0000000..f0532b1
--- /dev/null
+++ b/depends/thirdparty/gporca
@@ -0,0 +1 @@
+Subproject commit f0532b19c22c86e6959ae35fb9568096b7d666f9
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0e62247f/depends/thirdparty/gpos
----------------------------------------------------------------------
diff --git a/depends/thirdparty/gpos b/depends/thirdparty/gpos
new file mode 160000
index 0000000..91fa636
--- /dev/null
+++ b/depends/thirdparty/gpos
@@ -0,0 +1 @@
+Subproject commit 91fa636d53ad71d56a4beae55e3ed1fb6d6f8f92
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0e62247f/src/backend/.gitignore
----------------------------------------------------------------------
diff --git a/src/backend/.gitignore b/src/backend/.gitignore
index 00b1901..e26100d 100644
--- a/src/backend/.gitignore
+++ b/src/backend/.gitignore
@@ -1,6 +1,2 @@
postgres
postgres.def
-*timestamp
-gporca/
-gpos/
-gp-xerces/
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0e62247f/src/backend/Makefile
----------------------------------------------------------------------
diff --git a/src/backend/Makefile b/src/backend/Makefile
index 8643775..a90443a 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -49,13 +49,15 @@ LIBS := $(filter-out -lpgport, $(LIBS)) $(LDAP_LIBS_BE) $(CONNECTEMCLIB)
LIBS := $(filter-out -lreadline -ledit -ltermcap -lncurses -lcurses, $(LIBS))
LIBS := -lprotobuf -lboost_system -lboost_date_time -lstdc++ -lhdfs3 -lgsasl -lxml2 $(LIBS)
+ORCA_BLD_PATH=$(abs_top_builddir)/depends/thirdparty
+
# adding orca libraries
ifeq ($(enable_orca),yes)
-LIBGPOS_DIR = $(abs_top_builddir)/$(subdir)/gpos/build/install/$(prefix)/lib
-LIBXERCES_DIR = $(abs_top_builddir)/$(subdir)/gp-xerces/build/install/$(prefix)/lib
-LIBNAUCRATES_DIR = $(abs_top_builddir)/$(subdir)/gporca/build/install/$(prefix)/lib
-LIBGPDBCOST_DIR = $(abs_top_builddir)/$(subdir)/gporca/build/install/$(prefix)/lib
-LIBGPOPT_DIR = $(abs_top_builddir)/$(subdir)/gporca/build/install/$(prefix)/lib
+LIBGPOS_DIR = $(ORCA_BLD_PATH)/gpos/build/install/$(prefix)/lib
+LIBXERCES_DIR = $(ORCA_BLD_PATH)/gp-xerces/build/install/$(prefix)/lib
+LIBNAUCRATES_DIR = $(ORCA_BLD_PATH)/gporca/build/install/$(prefix)/lib
+LIBGPDBCOST_DIR = $(ORCA_BLD_PATH)/gporca/build/install/$(prefix)/lib
+LIBGPOPT_DIR = $(ORCA_BLD_PATH)/gporca/build/install/$(prefix)/lib
LIBS := $(LIBS) -L$(LIBGPOS_DIR) -lgpos
LIBS := $(LIBS) -L$(LIBXERCES_DIR) -lxerces-c
@@ -85,91 +87,56 @@ XERCES_LIB_FILE=libxerces-c.so
GPOS_LIB_FILE=libgpos.so
endif
-GPORCA_SRC_PATH := $(abs_top_srcdir)/$(subdir)/gporca
-GPOS_SRC_PATH := $(abs_top_srcdir)/$(subdir)/gpos
-GP_XERCES_SRC_PATH := $(abs_top_srcdir)/$(subdir)/gp-xerces
+ORCA_SRC_PATH=$(abs_top_srcdir)/depends/thirdparty
+
+GPORCA_SRC_PATH := $(ORCA_SRC_PATH)/gporca
+GPOS_SRC_PATH := $(ORCA_SRC_PATH)/gpos
+GP_XERCES_SRC_PATH := $(ORCA_SRC_PATH)/gp-xerces
-submake-gporca: submake-gpos submake-gp-xerces gporca_prepare
-ifneq ($(prefix),)
- if [ ! -f gporca_build_timestamp ]; then \
- rm -rf gporca/build; mkdir -p gporca/build; cd gporca/build; \
+submake-gporca: submake-gpos submake-gp-xerces orca_prepare
+ if [ ! -f $(ORCA_BLD_PATH)/gporca_build_timestamp ]; then \
+ rm -rf $(ORCA_BLD_PATH)/gporca/build; mkdir -p $(ORCA_BLD_PATH)/gporca/build; cd $(ORCA_BLD_PATH)/gporca/build; mkdir -p install; \
cmake $(GPORCA_SRC_PATH) -DCMAKE_INSTALL_PREFIX=$(prefix) \
- -DXERCES_INCLUDE_DIR=$(abs_top_builddir)/$(subdir)/gp-xerces/build/install/$(prefix)/include \
- -DXERCES_LIBRARY=$(abs_top_builddir)/$(subdir)/gp-xerces/build/install/$(prefix)/lib/$(XERCES_LIB_FILE) \
- -DGPOS_INCLUDE_DIR=$(abs_top_builddir)/$(subdir)/gpos/build/install/$(prefix)/include \
- -DGPOS_LIBRARY=$(abs_top_builddir)/$(subdir)/gpos/build/install/$(prefix)/lib/$(GPOS_LIB_FILE) && \
- $(MAKE) DESTDIR=$(abs_top_builddir)/$(subdir)/gporca/build/install install && \
- touch ../../gporca_build_timestamp; \
- fi
-else
- if [ ! -f gporca_build_timestamp ]; then \
- rm -rf gporca/build; mkdir -p gporca/build; cd gporca/build; \
- cmake $(ORCA_SRC_PATH) \
- -DXERCES_INCLUDE_DIR=$(abs_top_builddir)/$(subdir)/gp-xerces/build/install/$(prefix)/include \
- -DXERCES_LIBRARY=$(abs_top_builddir)/$(subdir)/gp-xerces/build/install/$(prefix)/lib/$(XERCES_LIB_FILE) \
- -DGPOS_INCLUDE_DIR=$(abs_top_builddir)/$(subdir)/gpos/build/install/$(prefix)/include \
- -DGPOS_LIBRARY=$(abs_top_builddir)/$(subdir)/gpos/build/install/$(prefix)/lib/$(GPOS_LIB_FILE) && \
- $(MAKE) DESTDIR=$(abs_top_builddir)/$(subdir)/gporca/build/install install && \
- touch ../../gporca_build_timestamp; \
+ -DXERCES_INCLUDE_DIR=$(ORCA_BLD_PATH)/gp-xerces/build/install/$(prefix)/include \
+ -DXERCES_LIBRARY=$(ORCA_BLD_PATH)/gp-xerces/build/install/$(prefix)/lib/$(XERCES_LIB_FILE) \
+ -DGPOS_INCLUDE_DIR=$(ORCA_BLD_PATH)/gpos/build/install/$(prefix)/include \
+ -DGPOS_LIBRARY=$(ORCA_BLD_PATH)/gpos/build/install/$(prefix)/lib/$(GPOS_LIB_FILE) && \
+ $(MAKE) DESTDIR=$(ORCA_BLD_PATH)/gporca/build/install install && \
+ touch $(ORCA_BLD_PATH)/gporca_build_timestamp; \
fi
-endif
-submake-gpos: gporca_prepare
-ifneq ($(prefix),)
- if [ ! -f gpos_build_timestamp ]; then \
- rm -rf gpos/build; mkdir -p gpos/build; cd gpos/build; mkdir -p install; \
+submake-gpos: orca_prepare
+ if [ ! -f $(ORCA_BLD_PATH)/gpos_build_timestamp ]; then \
+ rm -rf $(ORCA_BLD_PATH)/gpos/build; mkdir -p $(ORCA_BLD_PATH)/gpos/build; cd $(ORCA_BLD_PATH)/gpos/build; mkdir -p install; \
cmake $(GPOS_SRC_PATH) -DCMAKE_INSTALL_PREFIX=$(prefix) && \
- $(MAKE) DESTDIR=$(abs_top_builddir)/$(subdir)/gpos/build/install install && \
- touch ../../gpos_build_timestamp; \
- fi
-else
- if [ ! -f gpos_build_timestamp ]; then \
- rm -rf gpos/build; mkdir -p gpos/build; cd gpos/build; mkdir -p install; \
- cmake $(GPOS_SRC_PATH) && \
- $(MAKE) DESTDIR=$(abs_top_builddir)/$(subdir)/gpos/build/install install && \
- touch ../../gpos_build_timestamp; \
+ $(MAKE) DESTDIR=$(ORCA_BLD_PATH)/gpos/build/install install && \
+ touch $(ORCA_BLD_PATH)/gpos_build_timestamp; \
fi
-endif
-submake-gp-xerces: submake-gpos gporca_prepare
-ifneq ($(prefix),)
- if [ ! -f gp-xerces_build_timestamp ]; then \
- rm -rf gp-xerces/build; mkdir -p gp-xerces/build; cd gp-xerces/build; mkdir -p install; \
- $(GP_XERCES_SRC_PATH)/configure --prefix=$(prefix); \
- $(MAKE) DESTDIR=$(abs_top_builddir)/$(subdir)/gp-xerces/build/install install && \
- touch ../../gp-xerces_build_timestamp; \
- fi
-else
- if [ ! -f gp-xerces_build_timestamp ]; then \
- rm -rf gp-xerces/build; mkdir -p gp-xerces/build; cd gp-xerces/build; mkdir -p install; \
+submake-gp-xerces: submake-gpos orca_prepare
+ if [ ! -f $(ORCA_BLD_PATH)/gp-xerces_build_timestamp ]; then \
+ rm -rf $(ORCA_BLD_PATH)/gp-xerces/build; mkdir -p $(ORCA_BLD_PATH)/gp-xerces/build; cd $(ORCA_BLD_PATH)/gp-xerces/build; mkdir -p install; \
$(GP_XERCES_SRC_PATH)/configure --prefix=$(prefix); \
- $(MAKE) DESTDIR=$(abs_top_builddir)/$(subdir)/gp-xerces/build/install install && \
- touch ../../gp-xerces_build_timestamp; \
+ $(MAKE) DESTDIR=$(ORCA_BLD_PATH)/gp-xerces/build/install install && \
+ touch $(ORCA_BLD_PATH)/gp-xerces_build_timestamp; \
fi
-endif
-gporca_prepare:
- if [ ! -f $(abs_top_builddir)/$(subdir)/gporca_prepare_timestamp ]; then \
+orca_prepare:
+ if [ ! -f $(ORCA_BLD_PATH)/orca_prepare_timestamp ]; then \
cd $(abs_top_srcdir); \
- git submodule update --init $(subdir)/gporca && \
- git submodule update --init $(subdir)/gp-xerces && \
- git submodule update --init $(subdir)/gpos && \
- touch $(abs_top_builddir)/$(subdir)/gporca_prepare_timestamp; \
+ git submodule update --init depends/thirdparty/gporca && \
+ git submodule update --init depends/thirdparty/gp-xerces && \
+ git submodule update --init depends/thirdparty/gpos && \
+ touch $(ORCA_BLD_PATH)/orca_prepare_timestamp; \
fi
submake-libdxltranslators: submake-gporca
$(MAKE) -C gpopt all
-# No distclean for gpor & gpos by now.
-distclean_gporca:
- rm -rf gporca/build gporca_*_timestamp
- rm -rf gpos/build gpos_*_timestamp
- rm -rf gp-xerces/build gp-xerces_*_timestamp
-
-.PHONY: submake-gporca submake-gpos submake-gp-xerces distclean_gporca gporca_prepare
+.PHONY: submake-gporca submake-gpos submake-gp-xerces orca_prepare
else
-submake-libdxltranslators distclean_gporca:
+submake-libdxltranslators:
endif # enable_orca
all: submake-libpgport postgres $(POSTGRES_IMP)
@@ -319,10 +286,10 @@ endif
${INSTALL_DATA} $(srcdir)/utils/misc/etc/template-hawq-site.xml ${sysconfdir}
${INSTALL_DATA} $(srcdir)/utils/misc/etc/gpcheck.cnf ${sysconfdir}
ifeq ($(enable_orca), yes)
+ $(MAKE) -C $(ORCA_BLD_PATH)/gporca/build $@
+ $(MAKE) -C $(ORCA_BLD_PATH)/gpos/build $@
+ $(MAKE) -C $(ORCA_BLD_PATH)/gp-xerces/build $@
$(MAKE) -C gpopt $@ INSTLOC=$(DESTDIR)$(libdir)
- $(MAKE) -C gporca/build $@
- $(MAKE) -C gpos/build $@
- $(MAKE) -C gp-xerces/build $@
endif
install-bin: postgres $(POSTGRES_IMP) installdirs
@@ -398,8 +365,12 @@ endif
find gpopt -name *.o | xargs rm -rf
find gpopt -name *.so | xargs rm -rf
find gpopt -name *.dylib | xargs rm -rf
+ rm -rf $(ORCA_BLD_PATH)/gporca/build $(ORCA_BLD_PATH)/gporca_build_timestamp
+ rm -rf $(ORCA_BLD_PATH)/gpos/build $(ORCA_BLD_PATH)/gpos_build_timestamp
+ rm -rf $(ORCA_BLD_PATH)/gp-xerces/build $(ORCA_BLD_PATH)/gp-xerces_build_timestamp
+ rm -f $(ORCA_BLD_PATH)/orca_prepare_timestamp
-distclean: clean distclean_gporca
+distclean: clean
rm -f port/tas.s port/dynloader.c port/pg_sema.c port/pg_shmem.c
maintainer-clean: distclean
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0e62247f/src/backend/gp-xerces
----------------------------------------------------------------------
diff --git a/src/backend/gp-xerces b/src/backend/gp-xerces
deleted file mode 160000
index f07c17d..0000000
--- a/src/backend/gp-xerces
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit f07c17da813f44d8da17067a76491ca4b1deb02f
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0e62247f/src/backend/gpopt/Makefile
----------------------------------------------------------------------
diff --git a/src/backend/gpopt/Makefile b/src/backend/gpopt/Makefile
index 58d97fa..d974969 100644
--- a/src/backend/gpopt/Makefile
+++ b/src/backend/gpopt/Makefile
@@ -39,30 +39,24 @@ else
GPOPT_UDF_FLAGS := -shared
endif
-LIBGPOS_DIR = ../gpos/build/install/$(prefix)/lib
-LIBXERCES_DIR = ../gp-xerces/build/install/$(prefix)/lib
-LIBNAUCRATES_DIR = ../gporca/build/install/$(prefix)/lib
-LIBGPDBCOST_DIR = ../gporca/build/install/$(prefix)/lib
-LIBGPOPT_DIR = ../gporca/build/install/$(prefix)/lib
-
include $(top_srcdir)/src/backend/common.mk
libdxltranslators.$(LDSFX): $(SUBDIROBJS) $(OBJS)
$(CXX) $(CXXFLAGS) $(LDLIBFLAGS) \
- -L$(LIBGPOS_DIR) -lgpos \
- -L$(LIBXERCES_DIR) -lxerces-c \
- -L$(LIBNAUCRATES_DIR) -lnaucrates \
- -L$(LIBGPDBCOST_DIR) -lgpdbcost \
- -L$(LIBGPOPT_DIR) -lgpopt -lpthread -o $@ \
+ -L$(LIBGPOS_DIR)/lib -lgpos \
+ -L$(LIBXERCES_DIR)/lib -lxerces-c \
+ -L$(LIBNAUCRATES_DIR)/lib -lnaucrates \
+ -L$(LIBGPDBCOST_DIR)/lib -lgpdbcost \
+ -L$(LIBGPOPT_DIR)/lib -lgpopt -lpthread -o $@ \
$(SUBDIROBJS) $(OBJS)
libgpoptudf.$(LDSFX): $(SUBDIROBJS)
$(CXX) $(CXXFLAGS) $(GPOPT_UDF_FLAGS) \
- -L$(LIBXERCES_DIR) -lxerces-c \
- -L$(LIBGPOS_DIR) -lgpos \
- -L$(LIBNAUCRATES_DIR) -lnaucrates \
- -L$(LIBGPDBCOST_DIR) -lgpdbcost \
- -L$(LIBGPOPT_DIR) -lgpopt \
+ -L$(LIBXERCES_DIR)/lib -lxerces-c \
+ -L$(LIBGPOS_DIR)/lib -lgpos \
+ -L$(LIBNAUCRATES_DIR)/lib -lnaucrates \
+ -L$(LIBGPDBCOST_DIR)/lib -lgpdbcost \
+ -L$(LIBGPOPT_DIR)/lib -lgpopt \
-o $@ ./utils/funcs.o
install:
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0e62247f/src/backend/gpopt/gpopt.mk
----------------------------------------------------------------------
diff --git a/src/backend/gpopt/gpopt.mk b/src/backend/gpopt/gpopt.mk
index c21f27e..2fffc22 100644
--- a/src/backend/gpopt/gpopt.mk
+++ b/src/backend/gpopt/gpopt.mk
@@ -60,10 +60,12 @@ XERCES_VER = $(shell grep "\"xerces-c\"" $(GREP_SED_VAR))
LIBGPOS_VER = $(shell grep "\"libgpos\"" $(GREP_SED_VAR))
OPTIMIZER_VER = $(shell grep "\"optimizer\"" $(GREP_SED_VAR))
-LIBGPOS_DIR = $(abs_top_builddir)/src/backend/gpos/build/install/$(prefix)
-LIBXERCES_DIR = $(abs_top_builddir)/src/backend/gp-xerces/build/install/$(prefix)
-LIBNAUCRATES_DIR = $(abs_top_builddir)/src/backend/gporca/build/install/$(prefix)
-LIBGPDBCOST_DIR = $(abs_top_builddir)/src/backend/gporca/build/install/$(prefix)
+ORCA_BLD_PATH=$(abs_top_builddir)/depends/thirdparty
+
+LIBGPOS_DIR = $(ORCA_BLD_PATH)/gpos/build/install/$(prefix)
+LIBXERCES_DIR = $(ORCA_BLD_PATH)/gp-xerces/build/install/$(prefix)
+LIBNAUCRATES_DIR = $(ORCA_BLD_PATH)/gporca/build/install/$(prefix)
+LIBGPDBCOST_DIR = $(ORCA_BLD_PATH)/gporca/build/install/$(prefix)
LIBGPOPT_DIR = $(abs_top_builddir)/src/backend/gpopt/build/install/$(prefix)
BLD_FLAGS = $(ARCH_FLAGS) -D$(ARCH_BIT) -D$(ARCH_CPU) -D$(ARCH_OS) $(GPOPT_flags)
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0e62247f/src/backend/gporca
----------------------------------------------------------------------
diff --git a/src/backend/gporca b/src/backend/gporca
deleted file mode 160000
index f0532b1..0000000
--- a/src/backend/gporca
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit f0532b19c22c86e6959ae35fb9568096b7d666f9
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/0e62247f/src/backend/gpos
----------------------------------------------------------------------
diff --git a/src/backend/gpos b/src/backend/gpos
deleted file mode 160000
index 91fa636..0000000
--- a/src/backend/gpos
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 91fa636d53ad71d56a4beae55e3ed1fb6d6f8f92