git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 1/3] Makefile: define THIRD_PARTY_SOURCES

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 12, 2019, 21:42 UTC
Message-ID
<xmqq5zlxfaz9.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<3878cb2598c677d139c8734b61772d0cdcfdb935.1568309119.git.liu.denton@gmail.com>
Denton Liu <liu.denton@gmail.com> writes:
> After looking through the source files in compat/ and investigating the
> files' content and/or its Git history, I've determined the list of files
> that were copied from a third-party source. Place the names of these
> files into the THIRD_PARTY_SOURCES variable in the Makefile.

Please make sure readers won't get fooled into thinking these are filenames. They are meant to be used in $(filter-out) as patterns to match the names of third-party source files.

Also, the paragraph before that talks about "I did this", but claiming credit is much less important than why we are doing this in the first place, which you forgot to say (perhaps because you were too deeply into the task and the motivation was too obvious to you).

So, if I were doing this patch, I'd justify the whole thing as such:
	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.
Show 9 quoted lines
>  
> +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/%

Before this block, please explain that this is meant to be a list of patterns suitable for $(filter-out) and friends in a comment.

Thanks.
Previous: Denton LiuNext: Denton Liu
Message 9 of 29 in “Makefile: run coccicheck on all non-upstream sources”
  1. 0/2 Makefile: run coccicheck on all non-upstream sourcesDenton Liu, Sep 10, 2019
  2. 1/2 Makefile: define UPSTREAM_SOURCESDenton Liu, Sep 10, 2019
  3. 2/2 Makefile: run coccicheck on more source filesDenton Liu, Sep 10, 2019
  4. SZEDER GáborSep 10, 2019
  5. Denton LiuSep 10, 2019
  6. SZEDER GáborSep 10, 2019
  7. 0/3 Makefile: run coccicheck on all non-upstream sourcesDenton Liu, Sep 12, 2019
  8. 1/3 Makefile: define THIRD_PARTY_SOURCESDenton Liu, Sep 12, 2019
  9. Junio C HamanoSep 12, 2019
  10. 2/3 Makefile: strip leading ./ in $(FIND_SOURCE_FILES)Denton Liu, Sep 12, 2019
  11. Junio C HamanoSep 12, 2019
  12. SZEDER GáborSep 13, 2019
  13. 3/3 Makefile: run coccicheck on more source filesDenton Liu, Sep 12, 2019
  14. Junio C HamanoSep 12, 2019
  15. SZEDER GáborSep 13, 2019
  16. Denton LiuSep 13, 2019
  17. SZEDER GáborSep 13, 2019
  18. Denton LiuSep 13, 2019
  19. Junio C HamanoSep 13, 2019
  20. 0/4 Makefile: run coccicheck on all non-upstream sourcesDenton Liu, Sep 16, 2019
  21. 1/4 Makefile: strip leading ./ in $(LIB_H)Denton Liu, Sep 16, 2019
  22. 2/4 Makefile: define THIRD_PARTY_SOURCESDenton Liu, Sep 16, 2019
  23. Junio C HamanoSep 16, 2019
  24. fixup! Makefile: define THIRD_PARTY_SOURCESDenton Liu, Sep 16, 2019
  25. 3/4 Makefile: strip leading ./ in $(FIND_SOURCE_FILES)Denton Liu, Sep 16, 2019
  26. 4/4 Makefile: run coccicheck on more source filesDenton Liu, Sep 16, 2019
  27. Junio C HamanoSep 16, 2019
  28. SZEDER GáborSep 17, 2019
  29. Junio C HamanoSep 17, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.