Skip to content

Commit 60d24dd

Browse files
jrngitster
authored andcommitted
Makefile: fold XDIFF_H and VCSSVN_H into LIB_H
Just like MISC_H (see previous commit), there is no reason to track xdiff and vcs-svn headers separately from the rest of the headers. The only purpose of these variables is to keep track of recompilation dependencies. As a pleasant side effect, folding these into LIB_H lets us stop tracking GIT_OBJS and VCSSVN_TEST_OBJS separately from the list of all OBJECTS. Signed-off-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b8ba629 commit 60d24dd

File tree

1 file changed

+25
-37
lines changed

1 file changed

+25
-37
lines changed

Makefile

Lines changed: 25 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -392,11 +392,8 @@ BUILTIN_OBJS =
392392
BUILT_INS =
393393
COMPAT_CFLAGS =
394394
COMPAT_OBJS =
395-
XDIFF_H =
396395
XDIFF_OBJS =
397-
VCSSVN_H =
398396
VCSSVN_OBJS =
399-
VCSSVN_TEST_OBJS =
400397
GENERATED_H =
401398
EXTRA_CPPFLAGS =
402399
LIB_H =
@@ -558,21 +555,21 @@ LIB_FILE=libgit.a
558555
XDIFF_LIB=xdiff/lib.a
559556
VCSSVN_LIB=vcs-svn/lib.a
560557

561-
XDIFF_H += xdiff/xinclude.h
562-
XDIFF_H += xdiff/xmacros.h
563-
XDIFF_H += xdiff/xdiff.h
564-
XDIFF_H += xdiff/xtypes.h
565-
XDIFF_H += xdiff/xutils.h
566-
XDIFF_H += xdiff/xprepare.h
567-
XDIFF_H += xdiff/xdiffi.h
568-
XDIFF_H += xdiff/xemit.h
569-
570-
VCSSVN_H += vcs-svn/line_buffer.h
571-
VCSSVN_H += vcs-svn/sliding_window.h
572-
VCSSVN_H += vcs-svn/repo_tree.h
573-
VCSSVN_H += vcs-svn/fast_export.h
574-
VCSSVN_H += vcs-svn/svndiff.h
575-
VCSSVN_H += vcs-svn/svndump.h
558+
LIB_H += xdiff/xinclude.h
559+
LIB_H += xdiff/xmacros.h
560+
LIB_H += xdiff/xdiff.h
561+
LIB_H += xdiff/xtypes.h
562+
LIB_H += xdiff/xutils.h
563+
LIB_H += xdiff/xprepare.h
564+
LIB_H += xdiff/xdiffi.h
565+
LIB_H += xdiff/xemit.h
566+
567+
LIB_H += vcs-svn/line_buffer.h
568+
LIB_H += vcs-svn/sliding_window.h
569+
LIB_H += vcs-svn/repo_tree.h
570+
LIB_H += vcs-svn/fast_export.h
571+
LIB_H += vcs-svn/svndiff.h
572+
LIB_H += vcs-svn/svndump.h
576573

577574
GENERATED_H += common-cmds.h
578575

@@ -2110,13 +2107,6 @@ version.o git.spec \
21102107
$(patsubst %.perl,%,$(SCRIPT_PERL)) \
21112108
: GIT-VERSION-FILE
21122109

2113-
TEST_OBJS := $(patsubst test-%$X,test-%.o,$(TEST_PROGRAMS))
2114-
GIT_OBJS := $(LIB_OBJS) $(BUILTIN_OBJS) $(PROGRAM_OBJS) $(TEST_OBJS) \
2115-
git.o
2116-
ifndef NO_CURL
2117-
GIT_OBJS += http.o http-walker.o remote-curl.o
2118-
endif
2119-
21202110
XDIFF_OBJS += xdiff/xdiffi.o
21212111
XDIFF_OBJS += xdiff/xprepare.o
21222112
XDIFF_OBJS += xdiff/xutils.o
@@ -2132,9 +2122,14 @@ VCSSVN_OBJS += vcs-svn/fast_export.o
21322122
VCSSVN_OBJS += vcs-svn/svndiff.o
21332123
VCSSVN_OBJS += vcs-svn/svndump.o
21342124

2135-
VCSSVN_TEST_OBJS += test-line-buffer.o
2136-
2137-
OBJECTS := $(GIT_OBJS) $(XDIFF_OBJS) $(VCSSVN_OBJS)
2125+
TEST_OBJS := $(patsubst test-%$X,test-%.o,$(TEST_PROGRAMS))
2126+
OBJECTS := $(LIB_OBJS) $(BUILTIN_OBJS) $(PROGRAM_OBJS) $(TEST_OBJS) \
2127+
$(XDIFF_OBJS) \
2128+
$(VCSSVN_OBJS) \
2129+
git.o
2130+
ifndef NO_CURL
2131+
OBJECTS += http.o http-walker.o remote-curl.o
2132+
endif
21382133

21392134
dep_files := $(foreach f,$(OBJECTS),$(dir $f).depend/$(notdir $f).d)
21402135
dep_dirs := $(addsuffix .depend,$(sort $(dir $(OBJECTS))))
@@ -2233,15 +2228,8 @@ else
22332228
# Dependencies on automatically generated headers such as common-cmds.h
22342229
# should _not_ be included here, since they are necessary even when
22352230
# building an object for the first time.
2236-
#
2237-
# XXX. Please check occasionally that these include all dependencies
2238-
# gcc detects!
2239-
2240-
$(GIT_OBJS): $(LIB_H)
2241-
2242-
xdiff-interface.o $(XDIFF_OBJS): $(XDIFF_H)
22432231

2244-
$(VCSSVN_OBJS) $(VCSSVN_TEST_OBJS): $(LIB_H) $(VCSSVN_H)
2232+
$(OBJECTS): $(LIB_H)
22452233
endif
22462234

22472235
exec_cmd.sp exec_cmd.s exec_cmd.o: EXTRA_CPPFLAGS = \
@@ -2334,7 +2322,7 @@ XGETTEXT_FLAGS_C = $(XGETTEXT_FLAGS) --language=C \
23342322
--keyword=_ --keyword=N_ --keyword="Q_:1,2"
23352323
XGETTEXT_FLAGS_SH = $(XGETTEXT_FLAGS) --language=Shell
23362324
XGETTEXT_FLAGS_PERL = $(XGETTEXT_FLAGS) --keyword=__ --language=Perl
2337-
LOCALIZED_C := $(C_OBJ:o=c) $(LIB_H) $(XDIFF_H) $(VCSSVN_H) $(GENERATED_H)
2325+
LOCALIZED_C := $(C_OBJ:o=c) $(LIB_H) $(GENERATED_H)
23382326
LOCALIZED_SH := $(SCRIPT_SH)
23392327
LOCALIZED_PERL := $(SCRIPT_PERL)
23402328

0 commit comments

Comments
 (0)