Makefile: define THIRD_PARTY_SOURCES
Some files in our codebase are borrowed from other projects, and minimally updated to suit our own needs. We'd sometimes need to tell our own sources and these third-party sources apart for management purposes (e.g. we may want to be less strict about coding style and other issues on third-party files). Define the $(MAKE) variable THIRD_PARTY_SOURCES that can be used to match names of third-party sources. Signed-off-by: Denton Liu <liu.denton@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Denton Liu committed
Sep 16, 2019 at 12:23 UTC
5dedf7de539a96bce6d44e6e55d104e7700fb80b
1 file changed
+15
Makefile
+15
@@ -598,6 +598,7 @@ SCRIPT_SH =
598
SCRIPT_LIB =
599
TEST_BUILTINS_OBJS =
600
TEST_PROGRAMS_NEED_X =
601
+THIRD_PARTY_SOURCES =
602
603
# Having this variable in your environment would break pipelines because
604
# you cause "cd" to echo its destination to stdout. It can also take
@@ -1145,6 +1146,20 @@ BUILTIN_OBJS += builtin/verify-tag.o
1146
BUILTIN_OBJS += builtin/worktree.o
1147
BUILTIN_OBJS += builtin/write-tree.o
1148
1149
+# THIRD_PARTY_SOURCES is a list of patterns compatible with the
1150
+# $(filter) and $(filter-out) family of functions. They specify source
1151
+# files which are taken from some third-party source where we want to be
1152
+# less strict about issues such as coding style so we don't diverge from
1153
+# upstream unnecessarily (making merging in future changes easier).
1154
+THIRD_PARTY_SOURCES += compat/inet_ntop.c
1155
+THIRD_PARTY_SOURCES += compat/inet_pton.c
1156
+THIRD_PARTY_SOURCES += compat/nedmalloc/%
1157
+THIRD_PARTY_SOURCES += compat/obstack.%
1158
+THIRD_PARTY_SOURCES += compat/poll/%
1159
+THIRD_PARTY_SOURCES += compat/regex/%
1160
+THIRD_PARTY_SOURCES += sha1collisiondetection/%
1161
+THIRD_PARTY_SOURCES += sha1dc/%
1162
+
1163
GITLIBS = common-main.o $(LIB_FILE) $(XDIFF_LIB)
1164
EXTLIBS =
1165