summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2006-04-21 17:27:34 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-04-21 20:14:41 (GMT)
commit70827b15bfb11f7aea52c6995956be9d149233e1 (patch)
treecf4889fe3ce07829012993b5c7a64f5cd9569113 /Makefile
parent285755127a1ce800ce6a95516a37dd342c57c562 (diff)
downloadgit-70827b15bfb11f7aea52c6995956be9d149233e1.zip
git-70827b15bfb11f7aea52c6995956be9d149233e1.tar.gz
git-70827b15bfb11f7aea52c6995956be9d149233e1.tar.bz2
Split up builtin commands into separate files from git.c
Right now it split it into "builtin-log.c" for log-related commands ("log", "show" and "whatchanged"), and "builtin-help.c" for the informational commands (usage printing and "help" and "version"). This just makes things easier to read, I find. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 3ecd674..a83c502 100644
--- a/Makefile
+++ b/Makefile
@@ -213,6 +213,9 @@ LIB_OBJS = \
fetch-clone.o revision.o pager.o tree-walk.o xdiff-interface.o \
$(DIFF_OBJS)
+BUILTIN_OBJS = \
+ builtin-log.o builtin-help.o
+
GITLIBS = $(LIB_FILE) $(XDIFF_LIB)
LIBS = $(GITLIBS) -lz
@@ -462,10 +465,10 @@ all:
strip: $(PROGRAMS) git$X
$(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X
-git$X: git.c common-cmds.h $(GITLIBS)
+git$X: git.c common-cmds.h $(BUILTIN_OBJS) $(GITLIBS)
$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \
$(ALL_CFLAGS) -o $@ $(filter %.c,$^) \
- $(ALL_LDFLAGS) $(LIBS)
+ $(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
$(BUILT_INS): git$X
rm -f $@ && ln git$X $@
@@ -565,7 +568,7 @@ init-db.o: init-db.c
$(CC) -c $(ALL_CFLAGS) \
-DDEFAULT_GIT_TEMPLATE_DIR='"$(template_dir_SQ)"' $*.c
-$(LIB_OBJS): $(LIB_H)
+$(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H)
$(patsubst git-%$X,%.o,$(PROGRAMS)): $(GITLIBS)
$(DIFF_OBJS): diffcore.h