Skip to content

Commit 5dedf7d

Browse files
Denton-Lgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cf6a2d2 commit 5dedf7d

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,7 @@ SCRIPT_SH =
598598
SCRIPT_LIB =
599599
TEST_BUILTINS_OBJS =
600600
TEST_PROGRAMS_NEED_X =
601+
THIRD_PARTY_SOURCES =
601602

602603
# Having this variable in your environment would break pipelines because
603604
# you cause "cd" to echo its destination to stdout. It can also take
@@ -1145,6 +1146,20 @@ BUILTIN_OBJS += builtin/verify-tag.o
11451146
BUILTIN_OBJS += builtin/worktree.o
11461147
BUILTIN_OBJS += builtin/write-tree.o
11471148

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+
11481163
GITLIBS = common-main.o $(LIB_FILE) $(XDIFF_LIB)
11491164
EXTLIBS =
11501165

0 commit comments

Comments
 (0)