Message ID | a7c855a973db9067c2e30569d86f9b2b2147c6b3.1568661443.git.liu.denton@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Makefile: run coccicheck on all non-upstream sources | expand |
Denton Liu <liu.denton@gmail.com> writes: > +# THIRD_PARTY_SOURCES is a list of patterns compatible with > +# the $(filter) and $(filter-out) family of functions That defines the format, but does it convey what they want to achieve to the readers? "... to catch the list of source files we borrowed from elsewhere" or something, perhaps? > +THIRD_PARTY_SOURCES += compat/inet_ntop.c > +THIRD_PARTY_SOURCES += compat/inet_pton.c > +THIRD_PARTY_SOURCES += compat/obstack.% > +THIRD_PARTY_SOURCES += compat/nedmalloc/% > +THIRD_PARTY_SOURCES += compat/poll/% > +THIRD_PARTY_SOURCES += compat/regex/% > +THIRD_PARTY_SOURCES += sha1collisiondetection/% > +THIRD_PARTY_SOURCES += sha1dc/% > + > GITLIBS = common-main.o $(LIB_FILE) $(XDIFF_LIB) > EXTLIBS =
diff --git a/Makefile b/Makefile index ea77198247..49839579ec 100644 --- a/Makefile +++ b/Makefile @@ -598,6 +598,7 @@ SCRIPT_SH = SCRIPT_LIB = TEST_BUILTINS_OBJS = TEST_PROGRAMS_NEED_X = +THIRD_PARTY_SOURCES = # Having this variable in your environment would break pipelines because # you cause "cd" to echo its destination to stdout. It can also take @@ -1146,6 +1147,17 @@ BUILTIN_OBJS += builtin/verify-tag.o BUILTIN_OBJS += builtin/worktree.o BUILTIN_OBJS += builtin/write-tree.o +# THIRD_PARTY_SOURCES is a list of patterns compatible with +# the $(filter) and $(filter-out) family of functions +THIRD_PARTY_SOURCES += compat/inet_ntop.c +THIRD_PARTY_SOURCES += compat/inet_pton.c +THIRD_PARTY_SOURCES += compat/obstack.% +THIRD_PARTY_SOURCES += compat/nedmalloc/% +THIRD_PARTY_SOURCES += compat/poll/% +THIRD_PARTY_SOURCES += compat/regex/% +THIRD_PARTY_SOURCES += sha1collisiondetection/% +THIRD_PARTY_SOURCES += sha1dc/% + GITLIBS = common-main.o $(LIB_FILE) $(XDIFF_LIB) EXTLIBS =
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> --- Makefile | 12 ++++++++++++ 1 file changed, 12 insertions(+)