From: Junio C Hamano Date: Mon, 13 May 2019 14:50:33 +0000 (+0900) Subject: Merge branch 'jc/make-dedup-ls-files-output' X-Git-Tag: v2.22.0-rc0~7 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/a505f62f6f1ebdacab075f1ce52f949f33f7450f?ds=inline;hp=-c Merge branch 'jc/make-dedup-ls-files-output' A "ls-files" that emulates "find" to enumerate files in the working tree resulted in duplicated Makefile rules that caused the build to issue an unnecessary warning during a trial build after merge conflicts are resolved in working tree *.h files but before the resolved results are added to the index. This has been corrected. * jc/make-dedup-ls-files-output: Makefile: dedup list of files obtained from ls-files --- a505f62f6f1ebdacab075f1ce52f949f33f7450f diff --combined Makefile index af247878c5,c79e8ba759..6d433f8703 --- a/Makefile +++ b/Makefile @@@ -592,7 -592,6 +592,7 @@@ FUZZ_PROGRAMS LIB_OBJS = PROGRAM_OBJS = PROGRAMS = +EXCLUDED_PROGRAMS = SCRIPT_PERL = SCRIPT_PYTHON = SCRIPT_SH = @@@ -615,6 -614,7 +615,6 @@@ SCRIPT_SH += git-merge-resolve.s SCRIPT_SH += git-mergetool.sh SCRIPT_SH += git-quiltimport.sh SCRIPT_SH += git-legacy-stash.sh -SCRIPT_SH += git-remote-testgit.sh SCRIPT_SH += git-request-pull.sh SCRIPT_SH += git-submodule.sh SCRIPT_SH += git-web--browse.sh @@@ -637,11 -637,17 +637,11 @@@ SCRIPT_PERL += git-svn.per SCRIPT_PYTHON += git-p4.py -NO_INSTALL += git-remote-testgit - # Generated files for scripts SCRIPT_SH_GEN = $(patsubst %.sh,%,$(SCRIPT_SH)) SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL)) SCRIPT_PYTHON_GEN = $(patsubst %.py,%,$(SCRIPT_PYTHON)) -SCRIPT_SH_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_SH_GEN)) -SCRIPT_PERL_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_PERL_GEN)) -SCRIPT_PYTHON_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_PYTHON_GEN)) - # Individual rules to allow e.g. # "make -C ../.. SCRIPT_PERL=contrib/foo/bar.perl build-perl-script" # from subdirectories like contrib/*/ @@@ -651,11 -657,11 +651,11 @@@ build-sh-script: $(SCRIPT_SH_GEN build-python-script: $(SCRIPT_PYTHON_GEN) .PHONY: install-perl-script install-sh-script install-python-script -install-sh-script: $(SCRIPT_SH_INS) +install-sh-script: $(SCRIPT_SH_GEN) $(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' -install-perl-script: $(SCRIPT_PERL_INS) +install-perl-script: $(SCRIPT_PERL_GEN) $(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' -install-python-script: $(SCRIPT_PYTHON_INS) +install-python-script: $(SCRIPT_PYTHON_GEN) $(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' .PHONY: clean-perl-script clean-sh-script clean-python-script @@@ -666,9 -672,9 +666,9 @@@ clean-perl-script clean-python-script: $(RM) $(SCRIPT_PYTHON_GEN) -SCRIPTS = $(SCRIPT_SH_INS) \ - $(SCRIPT_PERL_INS) \ - $(SCRIPT_PYTHON_INS) \ +SCRIPTS = $(SCRIPT_SH_GEN) \ + $(SCRIPT_PERL_GEN) \ + $(SCRIPT_PYTHON_GEN) \ git-instaweb ETAGS_TARGET = TAGS @@@ -738,7 -744,6 +738,7 @@@ TEST_BUILTINS_OBJS += test-repository. TEST_BUILTINS_OBJS += test-revision-walking.o TEST_BUILTINS_OBJS += test-run-command.o TEST_BUILTINS_OBJS += test-scrap-cache-tree.o +TEST_BUILTINS_OBJS += test-serve-v2.o TEST_BUILTINS_OBJS += test-sha1.o TEST_BUILTINS_OBJS += test-sha1-array.o TEST_BUILTINS_OBJS += test-sha256.o @@@ -817,12 -822,12 +817,12 @@@ VCSSVN_LIB = vcs-svn/lib. GENERATED_H += command-list.h - LIB_H := $(shell git ls-files '*.h' ':!t/' ':!Documentation/' 2>/dev/null || \ + LIB_H := $(sort $(shell git ls-files '*.h' ':!t/' ':!Documentation/' 2>/dev/null || \ $(FIND) . \ -name .git -prune -o \ -name t -prune -o \ -name Documentation -prune -o \ - -name '*.h' -print) + -name '*.h' -print)) LIB_OBJS += abspath.o LIB_OBJS += advice.o @@@ -999,7 -1004,6 +999,7 @@@ LIB_OBJS += trace2/tr2_cfg. LIB_OBJS += trace2/tr2_cmd_name.o LIB_OBJS += trace2/tr2_dst.o LIB_OBJS += trace2/tr2_sid.o +LIB_OBJS += trace2/tr2_sysenv.o LIB_OBJS += trace2/tr2_tbuf.o LIB_OBJS += trace2/tr2_tgt_event.o LIB_OBJS += trace2/tr2_tgt_normal.o @@@ -1121,6 -1125,7 +1121,6 @@@ BUILTIN_OBJS += builtin/rev-parse. BUILTIN_OBJS += builtin/revert.o BUILTIN_OBJS += builtin/rm.o BUILTIN_OBJS += builtin/send-pack.o -BUILTIN_OBJS += builtin/serve.o BUILTIN_OBJS += builtin/shortlog.o BUILTIN_OBJS += builtin/show-branch.o BUILTIN_OBJS += builtin/show-index.o @@@ -1337,7 -1342,6 +1337,7 @@@ ifdef NO_CUR REMOTE_CURL_PRIMARY = REMOTE_CURL_ALIASES = REMOTE_CURL_NAMES = + EXCLUDED_PROGRAMS += git-http-fetch git-http-push else ifdef CURLDIR # Try "-Wl,-rpath=$(CURLDIR)/$(lib)" in such a case. @@@ -1362,11 -1366,7 +1362,11 @@@ endi ifeq "$(curl_check)" "070908" ifndef NO_EXPAT PROGRAM_OBJS += http-push.o + else + EXCLUDED_PROGRAMS += git-http-push endif + else + EXCLUDED_PROGRAMS += git-http-push endif curl_check := $(shell (echo 072200; $(CURL_CONFIG) --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p) ifeq "$(curl_check)" "072200" @@@ -1614,7 -1614,6 +1614,7 @@@ ifdef NO_INET_PTO endif ifdef NO_UNIX_SOCKETS BASIC_CFLAGS += -DNO_UNIX_SOCKETS + EXCLUDED_PROGRAMS += git-credential-cache git-credential-cache--daemon else LIB_OBJS += unix-socket.o PROGRAM_OBJS += credential-cache.o @@@ -2134,9 -2133,7 +2134,9 @@@ $(BUILT_INS): git$ command-list.h: generate-cmdlist.sh command-list.txt command-list.h: $(wildcard Documentation/git*.txt) Documentation/*config.txt Documentation/config/*.txt - $(QUIET_GEN)$(SHELL_PATH) ./generate-cmdlist.sh command-list.txt >$@+ && mv $@+ $@ + $(QUIET_GEN)$(SHELL_PATH) ./generate-cmdlist.sh \ + $(patsubst %,--exclude-program %,$(EXCLUDED_PROGRAMS)) \ + command-list.txt >$@+ && mv $@+ $@ SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\ $(localedir_SQ):$(NO_CURL):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\ @@@ -2469,14 -2466,6 +2469,14 @@@ $(VCSSVN_LIB): $(VCSSVN_OBJS export DEFAULT_EDITOR DEFAULT_PAGER +Documentation/GIT-EXCLUDED-PROGRAMS: FORCE + @EXCLUDED='EXCLUDED_PROGRAMS := $(EXCLUDED_PROGRAMS)'; \ + if test x"$$EXCLUDED" != \ + x"`cat Documentation/GIT-EXCLUDED-PROGRAMS 2>/dev/null`" ; then \ + echo >&2 " * new documentation flags"; \ + echo "$$EXCLUDED" >Documentation/GIT-EXCLUDED-PROGRAMS; \ + fi + .PHONY: doc man man-perl html info pdf doc: man-perl $(MAKE) -C Documentation all @@@ -2715,6 -2704,7 +2715,6 @@@ endi test_bindir_programs := $(patsubst %,bin-wrappers/%,$(BINDIR_PROGRAMS_NEED_X) $(BINDIR_PROGRAMS_NO_X) $(TEST_PROGRAMS_NEED_X)) all:: $(TEST_PROGRAMS) $(test_bindir_programs) -all:: $(NO_INSTALL) bin-wrappers/%: wrap-for-bin.sh @mkdir -p bin-wrappers @@@ -3001,7 -2991,7 +3001,7 @@@ rpm: artifacts-tar:: $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) $(OTHER_PROGRAMS) \ GIT-BUILD-OPTIONS $(TEST_PROGRAMS) $(test_bindir_programs) \ - $(NO_INSTALL) $(MOFILES) + $(MOFILES) $(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1) \ SHELL_PATH='$(SHELL_PATH_SQ)' PERL_PATH='$(PERL_PATH_SQ)' test -n "$(ARTIFACTS_DIRECTORY)" @@@ -3050,7 -3040,7 +3050,7 @@@ clean: profile-clean coverage-clean coc $(RM) $(OBJECTS) $(RM) $(LIB_FILE) $(XDIFF_LIB) $(VCSSVN_LIB) $(RM) $(ALL_PROGRAMS) $(SCRIPT_LIB) $(BUILT_INS) git$X - $(RM) $(TEST_PROGRAMS) $(NO_INSTALL) + $(RM) $(TEST_PROGRAMS) $(RM) $(FUZZ_PROGRAMS) $(RM) -r bin-wrappers $(dep_dirs) $(RM) -r po/build/ @@@ -3059,7 -3049,6 +3059,7 @@@ $(RM) $(GIT_TARNAME).tar.gz git-core_$(GIT_VERSION)-*.tar.gz $(RM) $(htmldocs).tar.gz $(manpages).tar.gz $(MAKE) -C Documentation/ clean + $(RM) Documentation/GIT-EXCLUDED-PROGRAMS ifndef NO_PERL $(MAKE) -C gitweb clean $(RM) -r perl/build/ @@@ -3095,7 -3084,7 +3095,7 @@@ check-docs: git-merge-octopus | git-merge-ours | git-merge-recursive | \ git-merge-resolve | git-merge-subtree | \ git-fsck-objects | git-init-db | \ - git-remote-* | git-stage | \ + git-remote-* | git-stage | git-legacy-* | \ git-?*--?* ) continue ;; \ esac ; \ test -f "Documentation/$$v.txt" || \ @@@ -3119,7 -3108,7 +3119,7 @@@ -e 's/\.txt//'; \ ) | while read how cmd; \ do \ - case " $(patsubst %$X,%,$(ALL_COMMANDS)) " in \ + case " $(patsubst %$X,%,$(ALL_COMMANDS) $(EXCLUDED_PROGRAMS)) " in \ *" $$cmd "*) ;; \ *) echo "removed but $$how: $$cmd" ;; \ esac; \