@@ -317,9 +317,6 @@ all::
317317# dependency rules. The default is "auto", which means to use computed header
318318# dependencies if your compiler is detected to support it.
319319#
320- # Define CHECK_HEADER_DEPENDENCIES to check for problems in the hard-coded
321- # dependency rules.
322- #
323320# Define NATIVE_CRLF if your platform uses CRLF for line endings.
324321#
325322# Define XDL_FAST_HASH to use an alternative line-hashing method in
@@ -432,7 +429,6 @@ XDIFF_OBJS =
432429VCSSVN_OBJS =
433430GENERATED_H =
434431EXTRA_CPPFLAGS =
435- LIB_H =
436432LIB_OBJS =
437433PROGRAM_OBJS =
438434PROGRAMS =
@@ -632,131 +628,11 @@ VCSSVN_LIB = vcs-svn/lib.a
632628
633629GENERATED_H += common-cmds.h
634630
635- LIB_H += advice.h
636- LIB_H += archive.h
637- LIB_H += argv-array.h
638- LIB_H += attr.h
639- LIB_H += bisect.h
640- LIB_H += blob.h
641- LIB_H += branch.h
642- LIB_H += builtin.h
643- LIB_H += bulk-checkin.h
644- LIB_H += bundle.h
645- LIB_H += cache-tree.h
646- LIB_H += cache.h
647- LIB_H += color.h
648- LIB_H += column.h
649- LIB_H += commit.h
650- LIB_H += compat/bswap.h
651- LIB_H += compat/mingw.h
652- LIB_H += compat/obstack.h
653- LIB_H += compat/poll/poll.h
654- LIB_H += compat/precompose_utf8.h
655- LIB_H += compat/terminal.h
656- LIB_H += compat/win32/dirent.h
657- LIB_H += compat/win32/pthread.h
658- LIB_H += compat/win32/syslog.h
659- LIB_H += connected.h
660- LIB_H += convert.h
661- LIB_H += credential.h
662- LIB_H += csum-file.h
663- LIB_H += decorate.h
664- LIB_H += delta.h
665- LIB_H += diff.h
666- LIB_H += diffcore.h
667- LIB_H += dir.h
668- LIB_H += exec_cmd.h
669- LIB_H += ewah/ewok.h
670- LIB_H += ewah/ewok_rlw.h
671- LIB_H += fetch-pack.h
672- LIB_H += fmt-merge-msg.h
673- LIB_H += fsck.h
674- LIB_H += gettext.h
675- LIB_H += git-compat-util.h
676- LIB_H += gpg-interface.h
677- LIB_H += graph.h
678- LIB_H += grep.h
679- LIB_H += hashmap.h
680- LIB_H += help.h
681- LIB_H += http.h
682- LIB_H += kwset.h
683- LIB_H += levenshtein.h
684- LIB_H += line-log.h
685- LIB_H += line-range.h
686- LIB_H += list-objects.h
687- LIB_H += ll-merge.h
688- LIB_H += log-tree.h
689- LIB_H += mailmap.h
690- LIB_H += merge-blobs.h
691- LIB_H += merge-recursive.h
692- LIB_H += mergesort.h
693- LIB_H += notes-cache.h
694- LIB_H += notes-merge.h
695- LIB_H += notes-utils.h
696- LIB_H += notes.h
697- LIB_H += object.h
698- LIB_H += pack-objects.h
699- LIB_H += pack-revindex.h
700- LIB_H += pack.h
701- LIB_H += pack-bitmap.h
702- LIB_H += parse-options.h
703- LIB_H += patch-ids.h
704- LIB_H += pathspec.h
705- LIB_H += pkt-line.h
706- LIB_H += prio-queue.h
707- LIB_H += progress.h
708- LIB_H += prompt.h
709- LIB_H += quote.h
710- LIB_H += reachable.h
711- LIB_H += reflog-walk.h
712- LIB_H += refs.h
713- LIB_H += remote.h
714- LIB_H += rerere.h
715- LIB_H += resolve-undo.h
716- LIB_H += revision.h
717- LIB_H += run-command.h
718- LIB_H += send-pack.h
719- LIB_H += sequencer.h
720- LIB_H += sha1-array.h
721- LIB_H += sha1-lookup.h
722- LIB_H += shortlog.h
723- LIB_H += sideband.h
724- LIB_H += sigchain.h
725- LIB_H += strbuf.h
726- LIB_H += streaming.h
727- LIB_H += string-list.h
728- LIB_H += submodule.h
729- LIB_H += tag.h
730- LIB_H += tar.h
731- LIB_H += thread-utils.h
732- LIB_H += transport.h
733- LIB_H += tree-walk.h
734- LIB_H += tree.h
735- LIB_H += unpack-trees.h
736- LIB_H += unicode_width.h
737- LIB_H += url.h
738- LIB_H += urlmatch.h
739- LIB_H += userdiff.h
740- LIB_H += utf8.h
741- LIB_H += varint.h
742- LIB_H += vcs-svn/fast_export.h
743- LIB_H += vcs-svn/line_buffer.h
744- LIB_H += vcs-svn/repo_tree.h
745- LIB_H += vcs-svn/sliding_window.h
746- LIB_H += vcs-svn/svndiff.h
747- LIB_H += vcs-svn/svndump.h
748- LIB_H += walker.h
749- LIB_H += wildmatch.h
750- LIB_H += wt-status.h
751- LIB_H += xdiff-interface.h
752- LIB_H += xdiff/xdiff.h
753- LIB_H += xdiff/xdiffi.h
754- LIB_H += xdiff/xemit.h
755- LIB_H += xdiff/xinclude.h
756- LIB_H += xdiff/xmacros.h
757- LIB_H += xdiff/xprepare.h
758- LIB_H += xdiff/xtypes.h
759- LIB_H += xdiff/xutils.h
631+ LIB_H = $(shell $(FIND ) . \
632+ -name .git -prune -o \
633+ -name t -prune -o \
634+ -name Documentation -prune -o \
635+ -name '* .h' -print)
760636
761637LIB_OBJS += abspath.o
762638LIB_OBJS += advice.o
@@ -1026,11 +902,6 @@ sysconfdir = etc
1026902endif
1027903endif
1028904
1029- ifdef CHECK_HEADER_DEPENDENCIES
1030- COMPUTE_HEADER_DEPENDENCIES = no
1031- USE_COMPUTED_HEADER_DEPENDENCIES =
1032- endif
1033-
1034905ifndef COMPUTE_HEADER_DEPENDENCIES
1035906COMPUTE_HEADER_DEPENDENCIES = auto
1036907endif
@@ -1382,7 +1253,6 @@ ifdef NO_INET_PTON
13821253endif
13831254ifndef NO_UNIX_SOCKETS
13841255 LIB_OBJS += unix-socket.o
1385- LIB_H += unix-socket.h
13861256 PROGRAM_OBJS += credential-cache.o
13871257 PROGRAM_OBJS += credential-cache--daemon.o
13881258endif
@@ -1406,12 +1276,10 @@ endif
14061276ifdef BLK_SHA1
14071277 SHA1_HEADER = "block-sha1/sha1.h"
14081278 LIB_OBJS += block-sha1/sha1.o
1409- LIB_H += block-sha1/sha1.h
14101279else
14111280ifdef PPC_SHA1
14121281 SHA1_HEADER = "ppc/sha1.h"
14131282 LIB_OBJS += ppc/sha1.o ppc/sha1ppc.o
1414- LIB_H += ppc/sha1.h
14151283else
14161284ifdef APPLE_COMMON_CRYPTO
14171285 COMPAT_CFLAGS += -DCOMMON_DIGEST_FOR_OPENSSL
@@ -1938,75 +1806,24 @@ $(dep_dirs):
19381806missing_dep_dirs := $(filter-out $(wildcard $(dep_dirs ) ) ,$(dep_dirs ) )
19391807dep_file = $(dir $@ ) .depend/$(notdir $@ ) .d
19401808dep_args = -MF $(dep_file ) -MQ $@ -MMD -MP
1941- ifdef CHECK_HEADER_DEPENDENCIES
1942- $(error cannot compute header dependencies outside a normal build. \
1943- Please unset CHECK_HEADER_DEPENDENCIES and try again)
1944- endif
19451809endif
19461810
19471811ifneq ($(COMPUTE_HEADER_DEPENDENCIES ) ,yes)
1948- ifndef CHECK_HEADER_DEPENDENCIES
19491812dep_dirs =
19501813missing_dep_dirs =
19511814dep_args =
19521815endif
1953- endif
1954-
1955- ifdef CHECK_HEADER_DEPENDENCIES
1956- ifndef PRINT_HEADER_DEPENDENCIES
1957- missing_deps = $(filter-out $(notdir $^ ) , \
1958- $(notdir $(shell $(MAKE ) -s $@ \
1959- CHECK_HEADER_DEPENDENCIES=YesPlease \
1960- USE_COMPUTED_HEADER_DEPENDENCIES=YesPlease \
1961- PRINT_HEADER_DEPENDENCIES=YesPlease) ) )
1962- endif
1963- endif
19641816
19651817ASM_SRC := $(wildcard $(OBJECTS:o=S ) )
19661818ASM_OBJ := $(ASM_SRC:S=o )
19671819C_OBJ := $(filter-out $(ASM_OBJ ) ,$(OBJECTS ) )
19681820
19691821.SUFFIXES :
19701822
1971- ifdef PRINT_HEADER_DEPENDENCIES
1972- $(C_OBJ ) : % .o: % .c FORCE
1973- echo $^
1974- $(ASM_OBJ ) : % .o: % .S FORCE
1975- echo $^
1976-
1977- ifndef CHECK_HEADER_DEPENDENCIES
1978- $(error cannot print header dependencies during a normal build. \
1979- Please set CHECK_HEADER_DEPENDENCIES and try again)
1980- endif
1981- endif
1982-
1983- ifndef PRINT_HEADER_DEPENDENCIES
1984- ifdef CHECK_HEADER_DEPENDENCIES
1985- $(C_OBJ ) : % .o: % .c $(dep_files ) FORCE
1986- @set -e; echo CHECK $@ ; \
1987- missing_deps=" $( missing_deps) " ; \
1988- if test " $$ missing_deps" ; \
1989- then \
1990- echo missing dependencies: $$ missing_deps; \
1991- false ; \
1992- fi
1993- $(ASM_OBJ ) : % .o: % .S $(dep_files ) FORCE
1994- @set -e; echo CHECK $@ ; \
1995- missing_deps=" $( missing_deps) " ; \
1996- if test " $$ missing_deps" ; \
1997- then \
1998- echo missing dependencies: $$ missing_deps; \
1999- false ; \
2000- fi
2001- endif
2002- endif
2003-
2004- ifndef CHECK_HEADER_DEPENDENCIES
20051823$(C_OBJ ) : % .o: % .c GIT-CFLAGS $(missing_dep_dirs )
20061824 $(QUIET_CC )$(CC ) -o $* .o -c $(dep_args ) $(ALL_CFLAGS ) $(EXTRA_CPPFLAGS ) $<
20071825$(ASM_OBJ ) : % .o: % .S GIT-CFLAGS $(missing_dep_dirs )
20081826 $(QUIET_CC )$(CC ) -o $* .o -c $(dep_args ) $(ALL_CFLAGS ) $(EXTRA_CPPFLAGS ) $<
2009- endif
20101827
20111828% .s : % .c GIT-CFLAGS FORCE
20121829 $(QUIET_CC )$(CC ) -o $@ -S $(ALL_CFLAGS ) $(EXTRA_CPPFLAGS ) $<
@@ -2133,17 +1950,17 @@ XGETTEXT_FLAGS_C = $(XGETTEXT_FLAGS) --language=C \
21331950XGETTEXT_FLAGS_SH = $(XGETTEXT_FLAGS ) --language=Shell \
21341951 --keyword=gettextln --keyword=eval_gettextln
21351952XGETTEXT_FLAGS_PERL = $(XGETTEXT_FLAGS ) --keyword=__ --language=Perl
2136- LOCALIZED_C : = $(C_OBJ:o=c ) $(LIB_H ) $(GENERATED_H )
2137- LOCALIZED_SH : = $(SCRIPT_SH )
2138- LOCALIZED_PERL : = $(SCRIPT_PERL )
1953+ LOCALIZED_C = $(C_OBJ:o=c ) $(LIB_H ) $(GENERATED_H )
1954+ LOCALIZED_SH = $(SCRIPT_SH )
1955+ LOCALIZED_PERL = $(SCRIPT_PERL )
21391956
21401957ifdef XGETTEXT_INCLUDE_TESTS
21411958LOCALIZED_C += t/t0200/test.c
21421959LOCALIZED_SH += t/t0200/test.sh
21431960LOCALIZED_PERL += t/t0200/test.perl
21441961endif
21451962
2146- po/git.pot : $(LOCALIZED_C )
1963+ po/git.pot : $(GENERATED_H ) FORCE
21471964 $(QUIET_XGETTEXT )$(XGETTEXT ) -o$@ + $(XGETTEXT_FLAGS_C ) $(LOCALIZED_C )
21481965 $(QUIET_XGETTEXT )$(XGETTEXT ) -o$@ + --join-existing $(XGETTEXT_FLAGS_SH ) \
21491966 $(LOCALIZED_SH )
0 commit comments