summaryrefslogtreecommitdiff
path: root/commit.c
diff options
context:
space:
mode:
authorJiang Xin <zhiyou.jx@alibaba-inc.com>2022-05-26 22:50:30 +0800
committerJunio C Hamano <gitster@pobox.com>2022-05-26 10:30:29 -0700
commit15fe4069d785414c6db85a2b805416f51395960c (patch)
tree96a34fc262739a426e7ba7a919176d716a637399 /commit.c
parent6dd9a91c324a696a0d547ff57c1fc7f4e5e9938c (diff)
Makefile: remove duplicate and unwanted files in FOUND_SOURCE_FILES
We get source files saved in "$(FOUND_SOURCE_FILES)" by running the command "git ls-files" or the command "find". We tried to have the both commands return the same list of files, but apparently the "find" command will return more files, such as the generated headers. We can filter out these generated headers to get closer results. In addition to this, "$(FOUND_SOURCE_FILES)" may contain duplicate files. E.g. "git-ls-files" may have duplicate entries for the same file in different staging areas if there are unresolved conflicts in the working tree. For this case, we can reduce duplicate entries by passing the option "--deduplicate" to git-ls-files. Junio reported that when running "make" in a working tree with unresolved conflicts, "make" may report warnings like below: Makefile:xxxx: target '.build/pot/po/FOO.c.po' given more than once in the same rule The duplicate targets are introduced by the following pattern rule we added in the preceding commit for incremental build of "po/git.pot". $(LOCALIZED_C_GEN_PO): .build/pot/po/%.po: % Although we have resolved this issue by sorting to create a unique $(LOCALIZED_C), other targets may benefit from this. Such as: tags, cscope.out, etc. Reported-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Jiang Xin <zhiyou.jx@alibaba-inc.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions