1. 编译速度提升;2. 编译依赖项优化:依赖的文件未修改时不会重新编译生成
This commit is contained in:
@ -75,6 +75,18 @@ isolationcheck-install-force: all | submake-isolation submake-mppdb_decoding
|
|||||||
--extra-install=contrib/mppdb_decoding \
|
--extra-install=contrib/mppdb_decoding \
|
||||||
$(ISOLATIONCHECKS)
|
$(ISOLATIONCHECKS)
|
||||||
|
|
||||||
|
|
||||||
|
all: objfiles.txt
|
||||||
|
|
||||||
|
# generate mppdb_decoding objfiles.txt to suspend duplicate make of gaussdb
|
||||||
|
objfiles.txt: $(OBJS)
|
||||||
|
@echo "" > objfiles.txt
|
||||||
|
|
||||||
|
objfiles_clean:
|
||||||
|
rm -f objfiles.txt
|
||||||
|
|
||||||
|
clean: objfiles_clean
|
||||||
|
|
||||||
PHONY: submake-mppdb_decoding submake-regress check \
|
PHONY: submake-mppdb_decoding submake-regress check \
|
||||||
regresscheck regresscheck-install-force \
|
regresscheck regresscheck-install-force \
|
||||||
isolationcheck isolationcheck-install-force
|
isolationcheck isolationcheck-install-force
|
||||||
|
@ -14,6 +14,17 @@ REGRESS = postgres_fdw
|
|||||||
# the db name is hard-coded in the tests
|
# the db name is hard-coded in the tests
|
||||||
override USE_MODULE_DB =
|
override USE_MODULE_DB =
|
||||||
|
|
||||||
|
all: objfiles.txt
|
||||||
|
|
||||||
|
# generate postgres_fdw objfiles.txt to suspend duplicate make of gaussdb
|
||||||
|
objfiles.txt: $(OBJS)
|
||||||
|
@echo "" > objfiles.txt
|
||||||
|
|
||||||
|
objfiles_clean:
|
||||||
|
rm -f objfiles.txt
|
||||||
|
|
||||||
|
clean: objfiles_clean
|
||||||
|
|
||||||
ifdef USE_PGXS
|
ifdef USE_PGXS
|
||||||
PG_CONFIG = pg_config
|
PG_CONFIG = pg_config
|
||||||
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
PGXS := $(shell $(PG_CONFIG) --pgxs)
|
||||||
|
@ -50,6 +50,17 @@ regresscheck: all | submake-regress submake-test_decoding
|
|||||||
--outputdir=./regression_output \
|
--outputdir=./regression_output \
|
||||||
$(REGRESSCHECKS)
|
$(REGRESSCHECKS)
|
||||||
|
|
||||||
|
all: objfiles.txt
|
||||||
|
|
||||||
|
# generate libpq objfiles.txt to suspend duplicate make of gaussdb
|
||||||
|
objfiles.txt: $(OBJS)
|
||||||
|
@echo "" > objfiles.txt
|
||||||
|
|
||||||
|
objfiles_clean:
|
||||||
|
rm -f objfiles.txt
|
||||||
|
|
||||||
|
clean: objfiles_clean
|
||||||
|
|
||||||
regresscheck-install-force: | submake-regress submake-test_decoding
|
regresscheck-install-force: | submake-regress submake-test_decoding
|
||||||
$(pg_regress_installcheck) \
|
$(pg_regress_installcheck) \
|
||||||
--extra-install=contrib/test_decoding \
|
--extra-install=contrib/test_decoding \
|
||||||
|
@ -1136,15 +1136,13 @@ submake-pagecompression:
|
|||||||
submake-libalarmclient:
|
submake-libalarmclient:
|
||||||
$(MAKE) -C $(top_builddir)/src/lib/alarm
|
$(MAKE) -C $(top_builddir)/src/lib/alarm
|
||||||
|
|
||||||
submake-kwlist: $(top_srcdir)/src/include/parser/kwlist_d.h
|
|
||||||
|
|
||||||
submake-kwlist-clean:
|
submake-kwlist-clean:
|
||||||
rm $(top_srcdir)/src/include/parser/kwlist_d.h -f
|
rm $(top_srcdir)/src/include/parser/kwlist_d.h -f
|
||||||
|
|
||||||
$(top_srcdir)/src/include/parser/kwlist_d.h: $(top_srcdir)/src/include/parser/kwlist.h $(GEN_KEYWORDLIST_DEPS)
|
$(top_srcdir)/src/include/parser/kwlist_d.h: $(top_srcdir)/src/include/parser/kwlist.h $(GEN_KEYWORDLIST_DEPS)
|
||||||
$(GEN_KEYWORDLIST) --extern -o $(top_srcdir)/src/include/parser $(top_srcdir)/src/include/parser/kwlist.h
|
$(GEN_KEYWORDLIST) --extern -o $(top_srcdir)/src/include/parser $(top_srcdir)/src/include/parser/kwlist.h
|
||||||
|
|
||||||
.PHONY: submake-libpq submake-libpgport submake-libplpgsql submake-libalarmclient submake-pagecompression submake-kwlist
|
.PHONY: submake-libpq submake-libpgport submake-libplpgsql submake-libalarmclient submake-pagecompression
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
|
@ -38,27 +38,26 @@ ifeq ($(enable_thread_check), yes)
|
|||||||
LIBS = -l$(SECURE_C_CHECK) -l$(MEMCHECK_LIB_NAME_TSAN) -pthread -D_REENTRANT -ldl -lm -lrt
|
LIBS = -l$(SECURE_C_CHECK) -l$(MEMCHECK_LIB_NAME_TSAN) -pthread -D_REENTRANT -ldl -lm -lrt
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all:
|
all: submake-libpgport
|
||||||
make clean
|
|
||||||
make scanEreport
|
make scanEreport
|
||||||
make gsqlerr
|
make gsqlerr
|
||||||
|
|
||||||
scanEreport: $(OBJS1) | submake-libpgport
|
scanEreport: $(OBJS1) $(top_srcdir)/ereport.txt $(top_srcdir)/src/common/backend/utils/errcodes.txt
|
||||||
$(CC) $(CXXFLAGS) $(OBJS1) $(LDFLAGS) $(LDFLAGS_EX) -o $@$(X) $(LIBS)
|
$(CC) $(CXXFLAGS) $(OBJS1) $(LDFLAGS) $(LDFLAGS_EX) -o $@$(X) $(LIBS)
|
||||||
ifeq ($(enable_multiple_nodes), yes)
|
ifeq ($(enable_multiple_nodes), yes)
|
||||||
$(top_builddir)/$(subdir)/scanEreport $(top_srcdir) ../distribute_ereport.txt $(top_srcdir)/src/common/backend/utils/errcodes.txt ../distribute_escan.txt distribute
|
$(top_builddir)/$(subdir)/scanEreport $(top_srcdir) ../distribute_ereport.txt $(top_srcdir)/src/common/backend/utils/errcodes.txt ../distribute_escan.txt distribute
|
||||||
endif
|
endif
|
||||||
$(top_builddir)/$(subdir)/scanEreport $(top_srcdir) ereport.txt $(top_srcdir)/src/common/backend/utils/errcodes.txt escan.txt
|
$(top_builddir)/$(subdir)/scanEreport $(top_srcdir) ereport.txt $(top_srcdir)/src/common/backend/utils/errcodes.txt escan.txt
|
||||||
utscanEreport: $(OBJS1) | submake-libpgport
|
utscanEreport: $(OBJS1)
|
||||||
$(CC) -fPIC -shared $(CXXFLAGS) $(OBJS1) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o libutscanEreport.so -l$(SECURE_C_CHECK)
|
$(CC) -fPIC -shared $(CXXFLAGS) $(OBJS1) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o libutscanEreport.so -l$(SECURE_C_CHECK)
|
||||||
mv libutscanEreport.so $(top_builddir)/../distribute/test/ut/lib
|
mv libutscanEreport.so $(top_builddir)/../distribute/test/ut/lib
|
||||||
|
|
||||||
OBJS= gsqlerr.o $(WIN32RES)
|
OBJS= gsqlerr.o $(WIN32RES)
|
||||||
|
|
||||||
gsqlerr: $(OBJS) | submake-libpgport
|
gsqlerr: $(OBJS)
|
||||||
$(CC) $(CXXFLAGS) $(OBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
|
$(CC) $(CXXFLAGS) $(OBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
|
||||||
|
|
||||||
utgsqlerr: $(OBJS) | submake-libpgport
|
utgsqlerr: $(OBJS)
|
||||||
$(CC) -fPIC -shared $(CXXFLAGS) $(OBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o libutgsqlerr.so -l$(SECURE_C_CHECK)
|
$(CC) -fPIC -shared $(CXXFLAGS) $(OBJS) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o libutgsqlerr.so -l$(SECURE_C_CHECK)
|
||||||
mv libutgsqlerr.so $(top_builddir)/../distribute/test/ut/lib
|
mv libutgsqlerr.so $(top_builddir)/../distribute/test/ut/lib
|
||||||
|
|
||||||
@ -81,6 +80,7 @@ clean distclean maintainer-clean:
|
|||||||
rm -f distribute_errmsg_result.txt
|
rm -f distribute_errmsg_result.txt
|
||||||
rm -f distribute_errmsg_new.txt
|
rm -f distribute_errmsg_new.txt
|
||||||
rm -f errmsg.log
|
rm -f errmsg.log
|
||||||
|
rm -f errmsg.h
|
||||||
rm -f errmsg_old.txt
|
rm -f errmsg_old.txt
|
||||||
rm -f errmsg_new.txt
|
rm -f errmsg_new.txt
|
||||||
rm -f errmsg_result.txt
|
rm -f errmsg_result.txt
|
||||||
|
@ -67,7 +67,7 @@ COMMON_OBJS = $(top_builddir)/src/lib/elog/elog.a
|
|||||||
EXTRA_OBJS = $(top_builddir)/src/gausskernel/cbb/utils/aes/aes.o
|
EXTRA_OBJS = $(top_builddir)/src/gausskernel/cbb/utils/aes/aes.o
|
||||||
KEYWRDOBJS = keywords.o kwlookup.o
|
KEYWRDOBJS = keywords.o kwlookup.o
|
||||||
|
|
||||||
keywords.o: submake-kwlist
|
keywords.o: $(top_srcdir)/src/include/parser/kwlist_d.h
|
||||||
|
|
||||||
kwlookup.cpp: % : $(top_srcdir)/src/common/backend/parser/%
|
kwlookup.cpp: % : $(top_srcdir)/src/common/backend/parser/%
|
||||||
rm -f $@ && $(LN_S) $< .
|
rm -f $@ && $(LN_S) $< .
|
||||||
|
@ -19,11 +19,13 @@ ifneq "$(MAKECMDGOALS)" "clean"
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
.PHONY: copy_cstrings
|
DEPENDENCY_PATH = $(top_builddir)/src/common/interfaces/libpq/client_logic_common/
|
||||||
copy_cstrings:
|
DEPENDENCY_FILE = cstrings_map.cpp
|
||||||
$(MAKE) -C $(top_builddir)/src/common/interfaces/libpq/client_logic_common cstrings_map.o
|
DEPENDENCY_FILE_O = $(patsubst %.cpp,%.o, $(DEPENDENCY_FILE))
|
||||||
cp $(top_builddir)/src/common/interfaces/libpq/client_logic_common/cstrings_map.o .
|
cstrings_map.o: $(DEPENDENCY_PATH)/$(DEPENDENCY_FILE)
|
||||||
cstrings_map.o: copy_cstrings
|
@echo $(DEPENDENCY_PATH)$(DEPENDENCY_FILE)
|
||||||
|
$(MAKE) -C $(DEPENDENCY_PATH) $(DEPENDENCY_FILE_O)
|
||||||
|
cp $(DEPENDENCY_PATH)$(DEPENDENCY_FILE_O) .
|
||||||
OBJS= client_logic.o cache.o cstrings_map.o client_logic_proc.o
|
OBJS= client_logic.o cache.o cstrings_map.o client_logic_proc.o
|
||||||
|
|
||||||
include $(top_srcdir)/src/gausskernel/common.mk
|
include $(top_srcdir)/src/gausskernel/common.mk
|
||||||
|
@ -91,7 +91,7 @@ else
|
|||||||
@$(missing) flex $< $@
|
@$(missing) flex $< $@
|
||||||
endif
|
endif
|
||||||
|
|
||||||
hint_gram.o keywords.o parser.o: hint_gram.hpp submake-kwlist
|
hint_gram.o keywords.o parser.o: hint_gram.hpp $(top_srcdir)/src/include/parser/kwlist_d.h
|
||||||
|
|
||||||
# gram.cpp, gram.hpp, and scan.inc are in the distribution tarball, so they
|
# gram.cpp, gram.hpp, and scan.inc are in the distribution tarball, so they
|
||||||
# are not cleaned here.
|
# are not cleaned here.
|
||||||
|
@ -90,7 +90,11 @@ VPATH += $(srcdir)/libstemmer
|
|||||||
NAME := dict_snowball
|
NAME := dict_snowball
|
||||||
rpath =
|
rpath =
|
||||||
|
|
||||||
all: all-shared-lib $(SQLSCRIPT)
|
all: all-shared-lib $(SQLSCRIPT) objfiles.txt
|
||||||
|
|
||||||
|
# generate snowball objfiles.txt to suspend duplicate make of gaussdb
|
||||||
|
objfiles.txt: $(OBJS)
|
||||||
|
@echo "" > objfiles.txt
|
||||||
|
|
||||||
include $(top_srcdir)/src/Makefile.shlib
|
include $(top_srcdir)/src/Makefile.shlib
|
||||||
|
|
||||||
@ -150,4 +154,4 @@ uninstall: uninstall-lib
|
|||||||
done
|
done
|
||||||
|
|
||||||
clean distclean maintainer-clean: clean-lib
|
clean distclean maintainer-clean: clean-lib
|
||||||
rm -f $(OBJS) $(SQLSCRIPT) *.depend
|
rm -f $(OBJS) $(SQLSCRIPT) *.depend objfiles.txt
|
||||||
|
@ -53,10 +53,6 @@ ifeq ($(PORTNAME), win32)
|
|||||||
SHLIB_LINK += -lshfolder
|
SHLIB_LINK += -lshfolder
|
||||||
endif
|
endif
|
||||||
|
|
||||||
execute.o: gram.hpp
|
|
||||||
gram.hpp:
|
|
||||||
$(MAKE) -C $(top_builddir)/src/common/interfaces/libpq/frontend_parser gram.hpp
|
|
||||||
|
|
||||||
all: all-lib
|
all: all-lib
|
||||||
|
|
||||||
.PHONY: submake-pgtypeslib
|
.PHONY: submake-pgtypeslib
|
||||||
|
@ -93,7 +93,7 @@ ecpg_kwlist_d.h: ecpg_kwlist.h $(GEN_KEYWORDLIST_DEPS)
|
|||||||
$(GEN_KEYWORDLIST) --varname ScanECPGKeywords $<
|
$(GEN_KEYWORDLIST) --varname ScanECPGKeywords $<
|
||||||
|
|
||||||
# Force these dependencies to be known even without dependency info built:
|
# Force these dependencies to be known even without dependency info built:
|
||||||
ecpg_keywords.o c_keywords.o keywords.o preproc.o parser.o: preproc.hpp submake-kwlist
|
ecpg_keywords.o c_keywords.o keywords.o preproc.o parser.o: preproc.hpp $(top_srcdir)/src/include/parser/kwlist_d.h
|
||||||
ecpg_keywords.o: ecpg_kwlist_d.h
|
ecpg_keywords.o: ecpg_kwlist_d.h
|
||||||
c_keywords.o: c_kwlist_d.h
|
c_keywords.o: c_kwlist_d.h
|
||||||
keywords.o: $(top_srcdir)/src/include/parser/kwlist.h
|
keywords.o: $(top_srcdir)/src/include/parser/kwlist.h
|
||||||
|
@ -32,6 +32,7 @@ endif
|
|||||||
|
|
||||||
ifeq "$(ENABLE_CE)" "1"
|
ifeq "$(ENABLE_CE)" "1"
|
||||||
override CPPFLAGS += -DHAVE_CE -DWORDS_BIGENDIAN
|
override CPPFLAGS += -DHAVE_CE -DWORDS_BIGENDIAN
|
||||||
|
override CPPFLAGS += -I"$(JAVA_HOME)/include" -I"$(JAVA_HOME)/include/linux"
|
||||||
ifneq ($(enable_multiple_nodes)_$(enable_privategauss), no_no)
|
ifneq ($(enable_multiple_nodes)_$(enable_privategauss), no_no)
|
||||||
ifneq ($(enable_lite_mode), yes)
|
ifneq ($(enable_lite_mode), yes)
|
||||||
override CPPFLAGS += -L$(top_builddir)/../distribute/bin/gs_ktool/ -lgs_ktool -L$(LIBKMC_LIB_PATH) -lkmc
|
override CPPFLAGS += -L$(top_builddir)/../distribute/bin/gs_ktool/ -lgs_ktool -L$(LIBKMC_LIB_PATH) -lkmc
|
||||||
@ -174,15 +175,21 @@ subsystem:
|
|||||||
#libpq.a: subsystem all-lib
|
#libpq.a: subsystem all-lib
|
||||||
|
|
||||||
ifneq "$(ENABLE_CE)" "1"
|
ifneq "$(ENABLE_CE)" "1"
|
||||||
all-lib-depends: frontend_parser_basic
|
all-lib-depends: frontend_parser_basic $(OBJS)
|
||||||
$(MAKE) all-lib
|
$(MAKE) all-lib
|
||||||
|
all: all-lib-depends | nce_objfiles.txt
|
||||||
|
nce_objfiles.txt: $(OBJS)
|
||||||
|
echo "" > nce_objfiles.txt
|
||||||
|
@if [ -e ce_objfiles.txt ]; then echo "echo "" > objfiles.txt" && echo "" > objfiles.txt; fi
|
||||||
else
|
else
|
||||||
all-lib-depends: gs_ktool libpq_ce subsystem
|
all-lib-depends: gs_ktool libpq_ce subsystem $(OBJS)
|
||||||
$(MAKE) all-lib
|
$(MAKE) all-lib
|
||||||
|
all: all-lib-depends | ce_objfiles.txt
|
||||||
|
ce_objfiles.txt: $(OBJS)
|
||||||
|
echo "" > ce_objfiles.txt
|
||||||
|
@if [ -e nce_objfiles.txt ]; then echo "echo "" > objfiles.txt" && echo "" > objfiles.txt; fi
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: all-lib-depends
|
|
||||||
|
|
||||||
utlibpq: all-lib
|
utlibpq: all-lib
|
||||||
cp libpq.so $(top_builddir)/../distribute/test/ut/lib/libutlibpq.so
|
cp libpq.so $(top_builddir)/../distribute/test/ut/lib/libutlibpq.so
|
||||||
|
|
||||||
@ -258,6 +265,7 @@ clean distclean: clean-lib
|
|||||||
rm -f $(OBJS) pthread.h libpq.rc
|
rm -f $(OBJS) pthread.h libpq.rc
|
||||||
# Might be left over from a Win32 client-only build
|
# Might be left over from a Win32 client-only build
|
||||||
rm -f pg_config_paths.h
|
rm -f pg_config_paths.h
|
||||||
|
rm -f ce_objfiles.txt nce_objfiles.txt objfiles.txt
|
||||||
rm -f inet_net_ntop.cpp noblock.cpp pgstrcasecmp.cpp thread.cpp cipher.cpp path.cpp
|
rm -f inet_net_ntop.cpp noblock.cpp pgstrcasecmp.cpp thread.cpp cipher.cpp path.cpp
|
||||||
rm -f chklocale.cpp crypt.cpp getaddrinfo.cpp getpeereid.cpp inet_aton.cpp open.cpp snprintf.cpp strerror.cpp strlcpy.cpp win32error.cpp win32setlocale.cpp
|
rm -f chklocale.cpp crypt.cpp getaddrinfo.cpp getpeereid.cpp inet_aton.cpp open.cpp snprintf.cpp strerror.cpp strlcpy.cpp win32error.cpp win32setlocale.cpp
|
||||||
rm -f pgsleep.cpp
|
rm -f pgsleep.cpp
|
||||||
|
@ -29,7 +29,7 @@ include $(top_builddir)/src/Makefile.global
|
|||||||
include $(top_builddir)/src/Makefile.shlib
|
include $(top_builddir)/src/Makefile.shlib
|
||||||
parser.o gram.o: scan.cpp
|
parser.o gram.o: scan.cpp
|
||||||
gram.hpp: gram.cpp
|
gram.hpp: gram.cpp
|
||||||
gram.o kwlookup.o parser.o: gram.hpp submake-kwlist
|
gram.o kwlookup.o parser.o: gram.hpp $(top_srcdir)/src/include/parser/kwlist_d.h
|
||||||
scan.o: gram.hpp scan.cpp
|
scan.o: gram.hpp scan.cpp
|
||||||
#gram.cpp: build-parser
|
#gram.cpp: build-parser
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
subdir = src/gausskernel/optimizer/path
|
subdir = src/gausskernel/optimizer/path
|
||||||
top_builddir = ../../../..
|
top_builddir = ../../../..
|
||||||
include $(top_builddir)/src/Makefile.global
|
include $(top_builddir)/src/Makefile.global
|
||||||
$(info $(CPPFLAGS))
|
|
||||||
|
|
||||||
ifneq "$(MAKECMDGOALS)" "clean"
|
ifneq "$(MAKECMDGOALS)" "clean"
|
||||||
ifneq "$(MAKECMDGOALS)" "distclean"
|
ifneq "$(MAKECMDGOALS)" "distclean"
|
||||||
|
Reference in New Issue
Block a user