Code

git-svn: cleanup: put SVN workarounds into their own namespace
[git.git] / Makefile
index 2407bbee49e1c2e94e81550d175a05f214f5db4a..fbe05f938ebbd713171234eaa6d956b23fba5e1d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -28,6 +28,10 @@ all::
 #
 # Define NO_STRLCPY if you don't have strlcpy.
 #
+# Define NO_STRTOUMAX if you don't have strtoumax in the C library.
+# If your compiler also does not support long long or does not have
+# strtoull, define NO_STRTOULL.
+#
 # Define NO_SETENV if you don't have setenv in the C library.
 #
 # Define NO_SYMLINK_HEAD if you never want .git/HEAD to be a symbolic link.
@@ -172,7 +176,7 @@ SCRIPT_SH = \
        git-merge-one-file.sh git-parse-remote.sh \
        git-pull.sh git-rebase.sh \
        git-repack.sh git-request-pull.sh git-reset.sh \
-       git-resolve.sh git-revert.sh git-sh-setup.sh \
+       git-revert.sh git-sh-setup.sh \
        git-tag.sh git-verify-tag.sh \
        git-applymbox.sh git-applypatch.sh git-am.sh \
        git-merge.sh git-merge-stupid.sh git-merge-octopus.sh \
@@ -219,8 +223,7 @@ BUILT_INS = \
        $(patsubst builtin-%.o,git-%$X,$(BUILTIN_OBJS))
 
 # what 'all' will build and 'install' will install, in gitexecdir
-ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS) \
-       git-merge-recur$X
+ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS)
 
 # Backward compatibility -- to be removed after 1.0
 PROGRAMS += git-ssh-pull$X git-ssh-push$X
@@ -263,7 +266,8 @@ LIB_OBJS = \
        revision.o pager.o tree-walk.o xdiff-interface.o \
        write_or_die.o trace.o list-objects.o grep.o \
        alloc.o merge-file.o path-list.o help.o unpack-trees.o $(DIFF_OBJS) \
-       color.o wt-status.o archive-zip.o archive-tar.o shallow.o utf8.o
+       color.o wt-status.o archive-zip.o archive-tar.o shallow.o utf8.o \
+       convert.o
 
 BUILTIN_OBJS = \
        builtin-add.o \
@@ -281,7 +285,6 @@ BUILTIN_OBJS = \
        builtin-diff.o \
        builtin-diff-files.o \
        builtin-diff-index.o \
-       builtin-diff-stages.o \
        builtin-diff-tree.o \
        builtin-fmt-merge-msg.o \
        builtin-for-each-ref.o \
@@ -293,6 +296,7 @@ BUILTIN_OBJS = \
        builtin-ls-tree.o \
        builtin-mailinfo.o \
        builtin-mailsplit.o \
+       builtin-merge-base.o \
        builtin-merge-file.o \
        builtin-mv.o \
        builtin-name-rev.o \
@@ -354,11 +358,13 @@ ifeq ($(uname_S),SunOS)
                NO_UNSETENV = YesPlease
                NO_SETENV = YesPlease
                NO_C99_FORMAT = YesPlease
+               NO_STRTOUMAX = YesPlease
        endif
        ifeq ($(uname_R),5.9)
                NO_UNSETENV = YesPlease
                NO_SETENV = YesPlease
                NO_C99_FORMAT = YesPlease
+               NO_STRTOUMAX = YesPlease
        endif
        INSTALL = ginstall
        TAR = gtar
@@ -518,6 +524,13 @@ ifdef NO_STRLCPY
        COMPAT_CFLAGS += -DNO_STRLCPY
        COMPAT_OBJS += compat/strlcpy.o
 endif
+ifdef NO_STRTOUMAX
+       COMPAT_CFLAGS += -DNO_STRTOUMAX
+       COMPAT_OBJS += compat/strtoumax.o
+endif
+ifdef NO_STRTOULL
+       COMPAT_CFLAGS += -DNO_STRTOULL
+endif
 ifdef NO_SETENV
        COMPAT_CFLAGS += -DNO_SETENV
        COMPAT_OBJS += compat/setenv.o
@@ -603,7 +616,7 @@ LIB_OBJS += $(COMPAT_OBJS)
 ALL_CFLAGS += $(BASIC_CFLAGS)
 ALL_LDFLAGS += $(BASIC_LDFLAGS)
 
-export prefix TAR INSTALL DESTDIR SHELL_PATH template_dir
+export prefix gitexecdir TAR INSTALL DESTDIR SHELL_PATH template_dir
 
 
 ### Build rules
@@ -614,6 +627,7 @@ ifneq (,$X)
 endif
 
 all::
+       $(MAKE) -C git-gui all
        $(MAKE) -C perl PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all
        $(MAKE) -C templates
 
@@ -627,9 +641,6 @@ git$X: git.c common-cmds.h $(BUILTIN_OBJS) $(GITLIBS) GIT-CFLAGS
 
 help.o: common-cmds.h
 
-git-merge-recur$X: git-merge-recursive$X
-       rm -f $@ && ln git-merge-recursive$X $@
-
 $(BUILT_INS): git$X
        rm -f $@ && ln git$X $@
 
@@ -847,6 +858,7 @@ install: all
        $(INSTALL) git$X gitk '$(DESTDIR_SQ)$(bindir_SQ)'
        $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
        $(MAKE) -C perl prefix='$(prefix_SQ)' install
+       $(MAKE) -C git-gui install
        if test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \
        then \
                ln -f '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \
@@ -880,8 +892,12 @@ dist: git.spec git-archive
        @mkdir -p $(GIT_TARNAME)
        @cp git.spec $(GIT_TARNAME)
        @echo $(GIT_VERSION) > $(GIT_TARNAME)/version
+       @$(MAKE) -C git-gui TARDIR=../$(GIT_TARNAME)/git-gui dist-version
        $(TAR) rf $(GIT_TARNAME).tar \
-               $(GIT_TARNAME)/git.spec $(GIT_TARNAME)/version
+               $(GIT_TARNAME)/git.spec \
+               $(GIT_TARNAME)/version \
+               $(GIT_TARNAME)/git-gui/version \
+               $(GIT_TARNAME)/git-gui/credits
        @rm -rf $(GIT_TARNAME)
        gzip -f -9 $(GIT_TARNAME).tar
 
@@ -922,6 +938,7 @@ clean:
        rm -f gitweb/gitweb.cgi
        $(MAKE) -C Documentation/ clean
        $(MAKE) -C perl clean
+       $(MAKE) -C git-gui clean
        $(MAKE) -C templates/ clean
        $(MAKE) -C t/ clean
        rm -f GIT-VERSION-FILE GIT-CFLAGS
@@ -936,12 +953,15 @@ check-docs::
        do \
                case "$$v" in \
                git-merge-octopus | git-merge-ours | git-merge-recursive | \
-               git-merge-resolve | git-merge-stupid | git-merge-recur | \
+               git-merge-resolve | git-merge-stupid | \
+               git-add--interactive | git-fsck-objects | git-init-db | \
+               git-repo-config | \
                git-ssh-pull | git-ssh-push ) continue ;; \
                esac ; \
                test -f "Documentation/$$v.txt" || \
                echo "no doc: $$v"; \
-               grep -q "^gitlink:$$v\[[0-9]\]::" Documentation/git.txt || \
+               sed -e '1,/^__DATA__/d' Documentation/cmd-list.perl | \
+               grep -q "^$$v[  ]" || \
                case "$$v" in \
                git) ;; \
                *) echo "no link: $$v";; \