From: Junio C Hamano Date: Thu, 11 Sep 2014 17:33:29 +0000 (-0700) Subject: Merge branch 'jk/make-simplify-dependencies' X-Git-Tag: v2.2.0-rc0~142 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/683b4d828c145594d5ef8dfbefb847dbe23c2c14?ds=inline;hp=-c Merge branch 'jk/make-simplify-dependencies' Admit that keeping LIB_H up-to-date, only for those that do not use the automatically generated dependencies, is a losing battle, and make it conservative by making everything depend on anything. * jk/make-simplify-dependencies: Makefile: drop CHECK_HEADER_DEPENDENCIES code Makefile: use `find` to determine static header dependencies i18n: treat "make pot" as an explicitly-invoked target --- 683b4d828c145594d5ef8dfbefb847dbe23c2c14 diff --combined Makefile index 30cc622f08,8f2ba8f048..e0f15a3df3 --- a/Makefile +++ b/Makefile @@@ -317,9 -317,6 +317,6 @@@ all: # dependency rules. The default is "auto", which means to use computed header # dependencies if your compiler is detected to support it. # - # Define CHECK_HEADER_DEPENDENCIES to check for problems in the hard-coded - # dependency rules. - # # Define NATIVE_CRLF if your platform uses CRLF for line endings. # # Define XDL_FAST_HASH to use an alternative line-hashing method in @@@ -432,7 -429,6 +429,6 @@@ XDIFF_OBJS VCSSVN_OBJS = GENERATED_H = EXTRA_CPPFLAGS = - LIB_H = LIB_OBJS = PROGRAM_OBJS = PROGRAMS = @@@ -551,7 -547,6 +547,7 @@@ PROGRAMS += $(patsubst %.o,git-%$X,$(PR TEST_PROGRAMS_NEED_X += test-chmtime TEST_PROGRAMS_NEED_X += test-ctype +TEST_PROGRAMS_NEED_X += test-config TEST_PROGRAMS_NEED_X += test-date TEST_PROGRAMS_NEED_X += test-delta TEST_PROGRAMS_NEED_X += test-dump-cache-tree @@@ -632,131 -627,11 +628,11 @@@ VCSSVN_LIB = vcs-svn/lib. GENERATED_H += common-cmds.h - LIB_H += advice.h - LIB_H += archive.h - LIB_H += argv-array.h - LIB_H += attr.h - LIB_H += bisect.h - LIB_H += blob.h - LIB_H += branch.h - LIB_H += builtin.h - LIB_H += bulk-checkin.h - LIB_H += bundle.h - LIB_H += cache-tree.h - LIB_H += cache.h - LIB_H += color.h - LIB_H += column.h - LIB_H += commit.h - LIB_H += compat/bswap.h - LIB_H += compat/mingw.h - LIB_H += compat/obstack.h - LIB_H += compat/poll/poll.h - LIB_H += compat/precompose_utf8.h - LIB_H += compat/terminal.h - LIB_H += compat/win32/dirent.h - LIB_H += compat/win32/pthread.h - LIB_H += compat/win32/syslog.h - LIB_H += connected.h - LIB_H += convert.h - LIB_H += credential.h - LIB_H += csum-file.h - LIB_H += decorate.h - LIB_H += delta.h - LIB_H += diff.h - LIB_H += diffcore.h - LIB_H += dir.h - LIB_H += exec_cmd.h - LIB_H += ewah/ewok.h - LIB_H += ewah/ewok_rlw.h - LIB_H += fetch-pack.h - LIB_H += fmt-merge-msg.h - LIB_H += fsck.h - LIB_H += gettext.h - LIB_H += git-compat-util.h - LIB_H += gpg-interface.h - LIB_H += graph.h - LIB_H += grep.h - LIB_H += hashmap.h - LIB_H += help.h - LIB_H += http.h - LIB_H += kwset.h - LIB_H += levenshtein.h - LIB_H += line-log.h - LIB_H += line-range.h - LIB_H += list-objects.h - LIB_H += ll-merge.h - LIB_H += log-tree.h - LIB_H += mailmap.h - LIB_H += merge-blobs.h - LIB_H += merge-recursive.h - LIB_H += mergesort.h - LIB_H += notes-cache.h - LIB_H += notes-merge.h - LIB_H += notes-utils.h - LIB_H += notes.h - LIB_H += object.h - LIB_H += pack-objects.h - LIB_H += pack-revindex.h - LIB_H += pack.h - LIB_H += pack-bitmap.h - LIB_H += parse-options.h - LIB_H += patch-ids.h - LIB_H += pathspec.h - LIB_H += pkt-line.h - LIB_H += prio-queue.h - LIB_H += progress.h - LIB_H += prompt.h - LIB_H += quote.h - LIB_H += reachable.h - LIB_H += reflog-walk.h - LIB_H += refs.h - LIB_H += remote.h - LIB_H += rerere.h - LIB_H += resolve-undo.h - LIB_H += revision.h - LIB_H += run-command.h - LIB_H += send-pack.h - LIB_H += sequencer.h - LIB_H += sha1-array.h - LIB_H += sha1-lookup.h - LIB_H += shortlog.h - LIB_H += sideband.h - LIB_H += sigchain.h - LIB_H += strbuf.h - LIB_H += streaming.h - LIB_H += string-list.h - LIB_H += submodule.h - LIB_H += tag.h - LIB_H += tar.h - LIB_H += thread-utils.h - LIB_H += transport.h - LIB_H += tree-walk.h - LIB_H += tree.h - LIB_H += unpack-trees.h - LIB_H += unicode_width.h - LIB_H += url.h - LIB_H += urlmatch.h - LIB_H += userdiff.h - LIB_H += utf8.h - LIB_H += varint.h - LIB_H += vcs-svn/fast_export.h - LIB_H += vcs-svn/line_buffer.h - LIB_H += vcs-svn/repo_tree.h - LIB_H += vcs-svn/sliding_window.h - LIB_H += vcs-svn/svndiff.h - LIB_H += vcs-svn/svndump.h - LIB_H += walker.h - LIB_H += wildmatch.h - LIB_H += wt-status.h - LIB_H += xdiff-interface.h - LIB_H += xdiff/xdiff.h - LIB_H += xdiff/xdiffi.h - LIB_H += xdiff/xemit.h - LIB_H += xdiff/xinclude.h - LIB_H += xdiff/xmacros.h - LIB_H += xdiff/xprepare.h - LIB_H += xdiff/xtypes.h - LIB_H += xdiff/xutils.h + LIB_H = $(shell $(FIND) . \ + -name .git -prune -o \ + -name t -prune -o \ + -name Documentation -prune -o \ + -name '*.h' -print) LIB_OBJS += abspath.o LIB_OBJS += advice.o @@@ -1026,11 -901,6 +902,6 @@@ sysconfdir = et endif endif - ifdef CHECK_HEADER_DEPENDENCIES - COMPUTE_HEADER_DEPENDENCIES = no - USE_COMPUTED_HEADER_DEPENDENCIES = - endif - ifndef COMPUTE_HEADER_DEPENDENCIES COMPUTE_HEADER_DEPENDENCIES = auto endif @@@ -1382,7 -1252,6 +1253,6 @@@ ifdef NO_INET_PTO endif ifndef NO_UNIX_SOCKETS LIB_OBJS += unix-socket.o - LIB_H += unix-socket.h PROGRAM_OBJS += credential-cache.o PROGRAM_OBJS += credential-cache--daemon.o endif @@@ -1406,12 -1275,10 +1276,10 @@@ endi ifdef BLK_SHA1 SHA1_HEADER = "block-sha1/sha1.h" LIB_OBJS += block-sha1/sha1.o - LIB_H += block-sha1/sha1.h else ifdef PPC_SHA1 SHA1_HEADER = "ppc/sha1.h" LIB_OBJS += ppc/sha1.o ppc/sha1ppc.o - LIB_H += ppc/sha1.h else ifdef APPLE_COMMON_CRYPTO COMPAT_CFLAGS += -DCOMMON_DIGEST_FOR_OPENSSL @@@ -1660,11 -1527,7 +1528,11 @@@ endi profile:: profile-clean $(MAKE) PROFILE=GEN all $(MAKE) PROFILE=GEN -j1 test - $(MAKE) PROFILE=GEN -j1 perf + @if test -n "$$GIT_PERF_REPO" || test -d .git; then \ + $(MAKE) PROFILE=GEN -j1 perf; \ + else \ + echo "Skipping profile of perf tests..."; \ + fi $(MAKE) PROFILE=USE all profile-fast: profile-clean @@@ -1938,29 -1801,13 +1806,13 @@@ $(dep_dirs) missing_dep_dirs := $(filter-out $(wildcard $(dep_dirs)),$(dep_dirs)) dep_file = $(dir $@).depend/$(notdir $@).d dep_args = -MF $(dep_file) -MQ $@ -MMD -MP - ifdef CHECK_HEADER_DEPENDENCIES - $(error cannot compute header dependencies outside a normal build. \ - Please unset CHECK_HEADER_DEPENDENCIES and try again) - endif endif ifneq ($(COMPUTE_HEADER_DEPENDENCIES),yes) - ifndef CHECK_HEADER_DEPENDENCIES dep_dirs = missing_dep_dirs = dep_args = endif - endif - - ifdef CHECK_HEADER_DEPENDENCIES - ifndef PRINT_HEADER_DEPENDENCIES - missing_deps = $(filter-out $(notdir $^), \ - $(notdir $(shell $(MAKE) -s $@ \ - CHECK_HEADER_DEPENDENCIES=YesPlease \ - USE_COMPUTED_HEADER_DEPENDENCIES=YesPlease \ - PRINT_HEADER_DEPENDENCIES=YesPlease))) - endif - endif ASM_SRC := $(wildcard $(OBJECTS:o=S)) ASM_OBJ := $(ASM_SRC:S=o) @@@ -1968,45 -1815,10 +1820,10 @@@ C_OBJ := $(filter-out $(ASM_OBJ),$(OBJE .SUFFIXES: - ifdef PRINT_HEADER_DEPENDENCIES - $(C_OBJ): %.o: %.c FORCE - echo $^ - $(ASM_OBJ): %.o: %.S FORCE - echo $^ - - ifndef CHECK_HEADER_DEPENDENCIES - $(error cannot print header dependencies during a normal build. \ - Please set CHECK_HEADER_DEPENDENCIES and try again) - endif - endif - - ifndef PRINT_HEADER_DEPENDENCIES - ifdef CHECK_HEADER_DEPENDENCIES - $(C_OBJ): %.o: %.c $(dep_files) FORCE - @set -e; echo CHECK $@; \ - missing_deps="$(missing_deps)"; \ - if test "$$missing_deps"; \ - then \ - echo missing dependencies: $$missing_deps; \ - false; \ - fi - $(ASM_OBJ): %.o: %.S $(dep_files) FORCE - @set -e; echo CHECK $@; \ - missing_deps="$(missing_deps)"; \ - if test "$$missing_deps"; \ - then \ - echo missing dependencies: $$missing_deps; \ - false; \ - fi - endif - endif - - ifndef CHECK_HEADER_DEPENDENCIES $(C_OBJ): %.o: %.c GIT-CFLAGS $(missing_dep_dirs) $(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $< $(ASM_OBJ): %.o: %.S GIT-CFLAGS $(missing_dep_dirs) $(QUIET_CC)$(CC) -o $*.o -c $(dep_args) $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $< - endif %.s: %.c GIT-CFLAGS FORCE $(QUIET_CC)$(CC) -o $@ -S $(ALL_CFLAGS) $(EXTRA_CPPFLAGS) $< @@@ -2133,9 -1945,9 +1950,9 @@@ XGETTEXT_FLAGS_C = $(XGETTEXT_FLAGS) -- XGETTEXT_FLAGS_SH = $(XGETTEXT_FLAGS) --language=Shell \ --keyword=gettextln --keyword=eval_gettextln XGETTEXT_FLAGS_PERL = $(XGETTEXT_FLAGS) --keyword=__ --language=Perl - LOCALIZED_C := $(C_OBJ:o=c) $(LIB_H) $(GENERATED_H) - LOCALIZED_SH := $(SCRIPT_SH) - LOCALIZED_PERL := $(SCRIPT_PERL) + LOCALIZED_C = $(C_OBJ:o=c) $(LIB_H) $(GENERATED_H) + LOCALIZED_SH = $(SCRIPT_SH) + LOCALIZED_PERL = $(SCRIPT_PERL) ifdef XGETTEXT_INCLUDE_TESTS LOCALIZED_C += t/t0200/test.c @@@ -2143,7 -1955,7 +1960,7 @@@ LOCALIZED_SH += t/t0200/test.s LOCALIZED_PERL += t/t0200/test.perl endif - po/git.pot: $(LOCALIZED_C) + po/git.pot: $(GENERATED_H) FORCE $(QUIET_XGETTEXT)$(XGETTEXT) -o$@+ $(XGETTEXT_FLAGS_C) $(LOCALIZED_C) $(QUIET_XGETTEXT)$(XGETTEXT) -o$@+ --join-existing $(XGETTEXT_FLAGS_SH) \ $(LOCALIZED_SH)