Code

gitview: Fix the blame interface.
[git.git] / Makefile
index a11ff6054926a92e49939eb53ab342c90704b295..a70277b4417c8994156ff5c92e801791002ce069 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -144,8 +144,8 @@ STRIP ?= strip
 prefix = $(HOME)
 bindir = $(prefix)/bin
 gitexecdir = $(bindir)
-sharedir = $(prefix)/share/
-template_dir = $(sharedir)/git-core/templates/
+sharedir = $(prefix)/share
+template_dir = $(sharedir)/git-core/templates
 ifeq ($(prefix),/usr)
 sysconfdir = /etc
 else
@@ -238,7 +238,6 @@ PROGRAMS = \
        git-convert-objects$X git-fetch-pack$X \
        git-hash-object$X git-index-pack$X git-local-fetch$X \
        git-fast-import$X \
-       git-merge-base$X \
        git-daemon$X \
        git-merge-index$X git-mktag$X git-mktree$X git-patch-id$X \
        git-peek-remote$X git-receive-pack$X \
@@ -736,9 +735,13 @@ gitk-wish: gitk GIT-GUI-VARS
        chmod +x $@+ && \
        mv -f $@+ $@
 
-git$X: git.c common-cmds.h $(BUILTIN_OBJS) $(GITLIBS) GIT-CFLAGS
+git.o: git.c common-cmds.h GIT-CFLAGS
+       $(QUIET_CC)$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \
+               $(ALL_CFLAGS) -c $(filter %.c,$^)
+
+git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
        $(QUIET_LINK)$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \
-               $(ALL_CFLAGS) -o $@ $(filter %.c,$^) \
+               $(ALL_CFLAGS) -o $@ $(filter %.c,$^) git.o \
                $(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
 
 help.o: common-cmds.h
@@ -749,6 +752,8 @@ git-merge-subtree$X: git-merge-recursive$X
 $(BUILT_INS): git$X
        $(QUIET_BUILT_IN)rm -f $@ && ln git$X $@
 
+common-cmds.h: ./generate-cmdlist.sh
+
 common-cmds.h: $(wildcard Documentation/git-*.txt)
        $(QUIET_GEN)./generate-cmdlist.sh > $@+ && mv $@+ $@
 
@@ -846,6 +851,8 @@ git$X git.spec \
 
 %.o: %.c GIT-CFLAGS
        $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
+%.s: %.c GIT-CFLAGS
+       $(QUIET_CC)$(CC) -S $(ALL_CFLAGS) $<
 %.o: %.S
        $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) $<
 
@@ -1051,8 +1058,9 @@ dist-doc:
 
 clean:
        rm -f *.o mozilla-sha1/*.o arm/*.o ppc/*.o compat/*.o xdiff/*.o \
-               test-chmtime$X test-genrandom$X $(LIB_FILE) $(XDIFF_LIB)
+               $(LIB_FILE) $(XDIFF_LIB)
        rm -f $(ALL_PROGRAMS) $(BUILT_INS) git$X
+       rm -f $(TEST_PROGRAMS)
        rm -f *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags
        rm -rf autom4te.cache
        rm -f configure config.log config.mak.autogen config.mak.append config.status config.cache