hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject incubator-hawq git commit: HAWQ-1401. Fix make install with DESTDIR option.
Date Thu, 23 Mar 2017 05:29:48 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 3fae12336 -> 477af283e


HAWQ-1401. Fix make install with DESTDIR option.


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/477af283
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/477af283
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/477af283

Branch: refs/heads/master
Commit: 477af283eebf666085b0dcc2242fcb0d8596882e
Parents: 3fae123
Author: rlei <rlei@pivotal.io>
Authored: Wed Mar 22 12:41:01 2017 +0800
Committer: rlei <rlei@pivotal.io>
Committed: Thu Mar 23 13:26:08 2017 +0800

----------------------------------------------------------------------
 src/backend/Makefile                      | 14 +++++++-------
 src/test/regress/GNUmakefile              |  2 +-
 tools/bin/Makefile                        | 12 ++++++------
 tools/bin/ext/Makefile                    | 12 ++++++------
 tools/bin/gppylib/Makefile                | 13 ++++++-------
 tools/bin/hawqpylib/Makefile              | 12 ++++++------
 tools/bin/pythonSrc/PyGreSQL-4.0/setup.py |  4 ++++
 tools/doc/Makefile                        | 10 +++++-----
 tools/gpnetbench/Makefile                 |  4 ++--
 9 files changed, 43 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/477af283/src/backend/Makefile
----------------------------------------------------------------------
diff --git a/src/backend/Makefile b/src/backend/Makefile
index fbddad0..02ee57b 100644
--- a/src/backend/Makefile
+++ b/src/backend/Makefile
@@ -305,13 +305,13 @@ endif
 	$(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample '$(DESTDIR)$(datadir)/pg_ident.conf.sample'
 	$(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample '$(DESTDIR)$(datadir)/postgresql.conf.sample'
 	$(INSTALL_DATA) $(srcdir)/access/transam/recovery.conf.sample '$(DESTDIR)$(datadir)/recovery.conf.sample'
-	${INSTALL_SCRIPT} -d ${sysconfdir}
-	${INSTALL_DATA} $(srcdir)/utils/misc/etc/hawq-site.xml ${sysconfdir}
-	${INSTALL_DATA} $(srcdir)/utils/misc/etc/hdfs-client.xml ${sysconfdir}
-	${INSTALL_DATA} $(srcdir)/utils/misc/etc/yarn-client.xml ${sysconfdir}
-	${INSTALL_DATA} $(srcdir)/utils/misc/etc/slaves ${sysconfdir}
-	${INSTALL_DATA} $(srcdir)/utils/misc/etc/template-hawq-site.xml ${sysconfdir}
-	${INSTALL_DATA} $(srcdir)/utils/misc/etc/gpcheck.cnf ${sysconfdir}
+	${INSTALL_SCRIPT} -d $(DESTDIR)${sysconfdir}
+	${INSTALL_DATA} $(srcdir)/utils/misc/etc/hawq-site.xml $(DESTDIR)${sysconfdir}
+	${INSTALL_DATA} $(srcdir)/utils/misc/etc/hdfs-client.xml $(DESTDIR)${sysconfdir}
+	${INSTALL_DATA} $(srcdir)/utils/misc/etc/yarn-client.xml $(DESTDIR)${sysconfdir}
+	${INSTALL_DATA} $(srcdir)/utils/misc/etc/slaves $(DESTDIR)${sysconfdir}
+	${INSTALL_DATA} $(srcdir)/utils/misc/etc/template-hawq-site.xml $(DESTDIR)${sysconfdir}
+	${INSTALL_DATA} $(srcdir)/utils/misc/etc/gpcheck.cnf $(DESTDIR)${sysconfdir}
 ifeq ($(enable_orca), yes)
 	$(MAKE) -C $(ORCA_BLD_PATH)/gporca/build $@
 	$(MAKE) -C $(ORCA_BLD_PATH)/gpos/build $@

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/477af283/src/test/regress/GNUmakefile
----------------------------------------------------------------------
diff --git a/src/test/regress/GNUmakefile b/src/test/regress/GNUmakefile
index 841d163..5a2f9da 100644
--- a/src/test/regress/GNUmakefile
+++ b/src/test/regress/GNUmakefile
@@ -66,7 +66,7 @@ $(top_builddir)/src/port/pg_config_paths.h: $(top_builddir)/src/Makefile.global
 
 install: all installdirs
 	$(INSTALL_PROGRAM) pg_regress$(X) '$(DESTDIR)$(pgxsdir)/$(subdir)/pg_regress$(X)'
-	for file in *.pl ; do $(INSTALL_PROGRAM) $${file} ${bindir}; done
+	for file in *.pl ; do $(INSTALL_PROGRAM) $${file} $(DESTDIR)${bindir}; done
 
 uninstall:
 	rm -f '$(DESTDIR)$(pgxsdir)/$(subdir)/pg_regress$(X)'

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/477af283/tools/bin/Makefile
----------------------------------------------------------------------
diff --git a/tools/bin/Makefile b/tools/bin/Makefile
index 754730a..79dcec4 100644
--- a/tools/bin/Makefile
+++ b/tools/bin/Makefile
@@ -60,7 +60,7 @@ PYGRESQL_DIR=PyGreSQL-$(PYGRESQL_VERSION)
 
 pygresql:
 	@echo "--- PyGreSQL"
-	cd $(PYLIB_SRC)/$(PYGRESQL_DIR) && CC="$(CC)" CFLAGS="${CFLAGS}" LDFLAGS="-L$(top_builddir)/src/interfaces/libpq
${LDFLAGS}" python setup.py build
+	cd $(PYLIB_SRC)/$(PYGRESQL_DIR) && CC="$(CC)" CFLAGS="${CFLAGS}" LDFLAGS="-L$(top_builddir)/src/interfaces/libpq
${LDFLAGS}" DESTDIR="${DESTDIR}" python setup.py build
 	mkdir -p $(PYLIB_DIR)/pygresql
 	cp -r $(PYLIB_SRC)/$(PYGRESQL_DIR)/build/lib.*/* $(PYLIB_DIR)/pygresql
 	touch $(PYLIB_DIR)/__init__.py
@@ -189,11 +189,11 @@ distclean: clean
 
 SKIP_INSTALL=.epydoc.config|.gitignore|.p4ignore|.rcfile|Makefile|generate-greenplum-path.sh
 install: all
-	${INSTALL_SCRIPT} -d ${bindir}
-	for files in `find * -maxdepth 0 -type f | grep -x -v -E "${SKIP_INSTALL}"`; do ${INSTALL_SCRIPT}
$${files} ${bindir}; done
+	${INSTALL_SCRIPT} -d ${DESTDIR}${bindir}
+	for files in `find * -maxdepth 0 -type f | grep -x -v -E "${SKIP_INSTALL}"`; do ${INSTALL_SCRIPT}
$${files} ${DESTDIR}${bindir}; done
 	${MAKE} -C gppylib $@
 	${MAKE} -C hawqpylib $@
 	${MAKE} -C ext $@
-	${INSTALL_SCRIPT} -d ${bindir}/lib
-	for files in `find lib -type f`; do ${INSTALL_SCRIPT} $${files} ${bindir}/lib; done
-	unset LIBPATH; ./generate-greenplum-path.sh $(prefix) > ${prefix}/greenplum_path.sh
+	${INSTALL_SCRIPT} -d ${DESTDIR}${bindir}/lib
+	for files in `find lib -type f`; do ${INSTALL_SCRIPT} $${files} ${DESTDIR}${bindir}/lib;
done
+	unset LIBPATH; ./generate-greenplum-path.sh $(prefix) > ${DESTDIR}${prefix}/greenplum_path.sh

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/477af283/tools/bin/ext/Makefile
----------------------------------------------------------------------
diff --git a/tools/bin/ext/Makefile b/tools/bin/ext/Makefile
index a214389..dcc9fee 100644
--- a/tools/bin/ext/Makefile
+++ b/tools/bin/ext/Makefile
@@ -28,17 +28,17 @@ include $(top_builddir)/src/Makefile.global
 SKIP_INSTALL=.gitignore|.p4ignore|.rcfile|Makefile|test/
 
 install:
-	${INSTALL_SCRIPT} -d ${libdir}/python/
+	${INSTALL_SCRIPT} -d ${DESTDIR}${libdir}/python/
 	@for file in `find * -type f | grep -v -E "${SKIP_INSTALL}"`; \
 		do \
-			echo "install $${file} into ${libdir}/python/$${file}" ; \
-			${INSTALL_SCRIPT} $${file} ${libdir}/python/$${file}; \
+			echo "install $${file} into ${DESTDIR}${libdir}/python/$${file}" ; \
+			${INSTALL_SCRIPT} $${file} ${DESTDIR}${libdir}/python/$${file}; \
 		done
 	@for dirs in `find * -type d | grep -v test` ;\
 		do \
-			${INSTALL_SCRIPT} -d ${libdir}/python/$${dirs}; \
+			${INSTALL_SCRIPT} -d ${DESTDIR}${libdir}/python/$${dirs}; \
 			for file in `find $${dirs} -type f | grep -v -E "${SKIP_INSTALL}"`; do \
-				echo "install $${file} into ${libdir}/python/$${file}" ; \
-				${INSTALL_SCRIPT} $${file} ${libdir}/python/$${file}; \
+				echo "install $${file} into ${DESTDIR}${libdir}/python/$${file}" ; \
+				${INSTALL_SCRIPT} $${file} ${DESTDIR}${libdir}/python/$${file}; \
 			done \
 		done

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/477af283/tools/bin/gppylib/Makefile
----------------------------------------------------------------------
diff --git a/tools/bin/gppylib/Makefile b/tools/bin/gppylib/Makefile
index fb37204..2ed7ae2 100644
--- a/tools/bin/gppylib/Makefile
+++ b/tools/bin/gppylib/Makefile
@@ -28,18 +28,17 @@ include $(top_builddir)/src/Makefile.global
 SKIP_INSTALL=.gitignore|.p4ignore|.rcfile|Makefile|test/
 
 install:
-	${INSTALL_SCRIPT} -d ${libdir}/python/gppylib
+	${INSTALL_SCRIPT} -d ${DESTDIR}${libdir}/python/gppylib
 	@for file in `find * -type f | grep -v -E "${SKIP_INSTALL}"`; \
 		do \
-			echo "install $${file} into ${libdir}/python/gppylib/$${file}" ; \
-			${INSTALL_SCRIPT} $${file} ${libdir}/python/gppylib/$${file}; \
+			echo "install $${file} into ${DESTDIR}${libdir}/python/gppylib/$${file}" ; \
+			${INSTALL_SCRIPT} $${file} ${DESTDIR}${libdir}/python/gppylib/$${file}; \
 		done
 	@for dirs in `find * -type d | grep -v test` ;\
 		do \
-			${INSTALL_SCRIPT} -d ${libdir}/python/gppylib/$${dirs}; \
+			${INSTALL_SCRIPT} -d ${DESTDIR}${libdir}/python/gppylib/$${dirs}; \
 			for file in `find $${dirs} -type f | grep -v -E "${SKIP_INSTALL}"`; do \
-				echo "install $${file} into ${libdir}/python/gppylib/$${file}" ; \
-				${INSTALL_SCRIPT} $${file} ${libdir}/python/gppylib/$${file}; \
+				echo "install $${file} into ${DESTDIR}${libdir}/python/gppylib/$${file}" ; \
+				${INSTALL_SCRIPT} $${file} ${DESTDIR}${libdir}/python/gppylib/$${file}; \
 			done \
 		done
-	
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/477af283/tools/bin/hawqpylib/Makefile
----------------------------------------------------------------------
diff --git a/tools/bin/hawqpylib/Makefile b/tools/bin/hawqpylib/Makefile
index fe3686e..93031bf 100644
--- a/tools/bin/hawqpylib/Makefile
+++ b/tools/bin/hawqpylib/Makefile
@@ -28,18 +28,18 @@ include $(top_builddir)/src/Makefile.global
 SKIP_INSTALL=.gitignore|.p4ignore|.rcfile|Makefile|test/
 
 install:
-	${INSTALL_SCRIPT} -d ${libdir}/python/hawqpylib
+	${INSTALL_SCRIPT} -d ${DESTDIR}${libdir}/python/hawqpylib
 	@for file in `find * -type f | grep -v -E "${SKIP_INSTALL}"`; \
 		do \
-			echo "install $${file} into ${libdir}/python/hawqpylib/$${file}" ; \
-			${INSTALL_SCRIPT} $${file} ${libdir}/python/hawqpylib/$${file}; \
+			echo "install $${file} into ${DESTDIR}${libdir}/python/hawqpylib/$${file}" ; \
+			${INSTALL_SCRIPT} $${file} ${DESTDIR}${libdir}/python/hawqpylib/$${file}; \
 		done
 	@for dirs in `find * -type d | grep -v test` ;\
 		do \
-			${INSTALL_SCRIPT} -d ${libdir}/python/hawqpylib/$${dirs}; \
+			${INSTALL_SCRIPT} -d ${DESTDIR}${libdir}/python/hawqpylib/$${dirs}; \
 			for file in `find $${dirs} -type f | grep -v -E "${SKIP_INSTALL}"`; do \
-				echo "install $${file} into ${libdir}/python/hawqpylib/$${file}" ; \
-				${INSTALL_SCRIPT} $${file} ${libdir}/python/hawqpylib/$${file}; \
+				echo "install $${file} into ${DESTDIR}${libdir}/python/hawqpylib/$${file}" ; \
+				${INSTALL_SCRIPT} $${file} ${DESTDIR}${libdir}/python/hawqpylib/$${file}; \
 			done \
 		done
 	

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/477af283/tools/bin/pythonSrc/PyGreSQL-4.0/setup.py
----------------------------------------------------------------------
diff --git a/tools/bin/pythonSrc/PyGreSQL-4.0/setup.py b/tools/bin/pythonSrc/PyGreSQL-4.0/setup.py
index 5d28b31..bd6b3f9 100755
--- a/tools/bin/pythonSrc/PyGreSQL-4.0/setup.py
+++ b/tools/bin/pythonSrc/PyGreSQL-4.0/setup.py
@@ -62,6 +62,10 @@ def pg_config(s):
         raise Exception("pg_config tool is not available.")
     if not d:
         raise Exception("Could not get %s information." % s)
+
+    DESTDIR = os.getenv('DESTDIR')
+    if DESTDIR:
+        d = DESTDIR + d
     return d
 
 def mk_include():

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/477af283/tools/doc/Makefile
----------------------------------------------------------------------
diff --git a/tools/doc/Makefile b/tools/doc/Makefile
index 131ff86..67c7e97 100644
--- a/tools/doc/Makefile
+++ b/tools/doc/Makefile
@@ -10,8 +10,8 @@ include $(top_builddir)/src/Makefile.global
 
 SKIP_INSTALL=.gitignore|.p4ignore|.rcfile|Makefile
 install:
-	${INSTALL_SCRIPT} -d ${docdir}
-	${INSTALL_SCRIPT} -d ${docdir}/cli_help
-	for dirs in `find * -type d` ; do ${INSTALL_SCRIPT} -d ${docdir}/cli_help/$${dirs}; done
-	for files in `find * -type f -maxdepth 0 | grep -v -E "${SKIP_INSTALL}"`; do ${INSTALL_DATA}
$${files} ${docdir}/cli_help; done
-	for files in `find gpconfigs -type f | grep -v -E "${SKIP_INSTALL}"`; do ${INSTALL_DATA}
$${files} ${docdir}/cli_help/gpconfigs; done
+	${INSTALL_SCRIPT} -d ${DESTDIR}${docdir}
+	${INSTALL_SCRIPT} -d ${DESTDIR}${docdir}/cli_help
+	for dirs in `find * -type d` ; do ${INSTALL_SCRIPT} -d ${DESTDIR}${docdir}/cli_help/$${dirs};
done
+	for files in `find * -type f -maxdepth 0 | grep -v -E "${SKIP_INSTALL}"`; do ${INSTALL_DATA}
$${files} ${DESTDIR}${docdir}/cli_help; done
+	for files in `find gpconfigs -type f | grep -v -E "${SKIP_INSTALL}"`; do ${INSTALL_DATA}
$${files} ${DESTDIR}${docdir}/cli_help/gpconfigs; done

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/477af283/tools/gpnetbench/Makefile
----------------------------------------------------------------------
diff --git a/tools/gpnetbench/Makefile b/tools/gpnetbench/Makefile
index 175f797..048c574 100644
--- a/tools/gpnetbench/Makefile
+++ b/tools/gpnetbench/Makefile
@@ -39,8 +39,8 @@ gpnetbenchClient: $(CLIENT_OBJS)
 	$(CC) $(CFLAGS) $(LDFLAGS) -o gpnetbenchClient $(CLIENT_OBJS)
 
 install: all
-	$(INSTALL_PROGRAM) gpnetbenchServer $(bindir)/lib
-	$(INSTALL_PROGRAM) gpnetbenchClient $(bindir)/lib
+	$(INSTALL_PROGRAM) gpnetbenchServer ${DESTDIR}$(bindir)/lib
+	$(INSTALL_PROGRAM) gpnetbenchClient ${DESTDIR}$(bindir)/lib
 
 %.o: %.c
 	$(CC) $(CFLAGS) -o $@ -c $<


Mime
View raw message