]> git.ipfire.org Git - thirdparty/git.git/blobdiff - Makefile
Rename git-browse-help helper to git-browse--help
[thirdparty/git.git] / Makefile
index e869b85b952f4945403b7f8fae6a78d5f74aa4ec..43d6197495f6cde1be725388902e557884b81917 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -154,9 +154,12 @@ STRIP ?= strip
 
 prefix = $(HOME)
 bindir = $(prefix)/bin
+mandir = $(prefix)/share/man
+infodir = $(prefix)/share/info
 gitexecdir = $(bindir)
 sharedir = $(prefix)/share
 template_dir = $(sharedir)/git-core/templates
+htmldir=$(sharedir)/doc/git-doc
 ifeq ($(prefix),/usr)
 sysconfdir = /etc
 else
@@ -183,7 +186,7 @@ GITWEB_FAVICON = git-favicon.png
 GITWEB_SITE_HEADER =
 GITWEB_SITE_FOOTER =
 
-export prefix bindir gitexecdir sharedir template_dir sysconfdir
+export prefix bindir gitexecdir sharedir template_dir htmldir sysconfdir
 
 CC = gcc
 AR = ar
@@ -213,7 +216,7 @@ BASIC_LDFLAGS =
 
 SCRIPT_SH = \
        git-bisect.sh git-checkout.sh \
-       git-clone.sh git-commit.sh \
+       git-clone.sh \
        git-merge-one-file.sh git-mergetool.sh git-parse-remote.sh \
        git-pull.sh git-rebase.sh git-rebase--interactive.sh \
        git-repack.sh git-request-pull.sh \
@@ -223,7 +226,8 @@ SCRIPT_SH = \
        git-merge-resolve.sh \
        git-lost-found.sh git-quiltimport.sh git-submodule.sh \
        git-filter-branch.sh \
-       git-stash.sh
+       git-stash.sh \
+       git-browse--help.sh
 
 SCRIPT_PERL = \
        git-add--interactive.perl \
@@ -233,7 +237,7 @@ SCRIPT_PERL = \
 
 SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
          $(patsubst %.perl,%,$(SCRIPT_PERL)) \
-         git-status git-instaweb
+         git-instaweb
 
 # ... and all the rest that could be moved out of bindir to gitexecdir
 PROGRAMS = \
@@ -259,7 +263,7 @@ EXTRA_PROGRAMS =
 BUILT_INS = \
        git-format-patch$X git-show$X git-whatchanged$X git-cherry$X \
        git-get-tar-commit-id$X git-init$X git-repo-config$X \
-       git-fsck-objects$X git-cherry-pick$X \
+       git-fsck-objects$X git-cherry-pick$X git-peek-remote$X git-status$X \
        $(patsubst builtin-%.o,git-%$X,$(BUILTIN_OBJS))
 
 # what 'all' will build and 'install' will install, in gitexecdir
@@ -269,9 +273,6 @@ ALL_PROGRAMS += git-merge-subtree$X
 
 # what 'all' will build but not install in gitexecdir
 OTHER_PROGRAMS = git$X gitweb/gitweb.cgi
-ifndef NO_TCLTK
-OTHER_PROGRAMS += gitk-wish
-endif
 
 # Set paths to tools early so that they can be used for version tests.
 ifndef SHELL_PATH
@@ -315,7 +316,7 @@ LIB_OBJS = \
        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 \
        convert.o attr.o decorate.o progress.o mailmap.o symlinks.o remote.o \
-       transport.o bundle.o walker.o parse-options.o
+       transport.o bundle.o walker.o parse-options.o ws.o
 
 BUILTIN_OBJS = \
        builtin-add.o \
@@ -330,6 +331,7 @@ BUILTIN_OBJS = \
        builtin-checkout-index.o \
        builtin-check-ref-format.o \
        builtin-clean.o \
+       builtin-commit.o \
        builtin-commit-tree.o \
        builtin-count-objects.o \
        builtin-describe.o \
@@ -337,6 +339,7 @@ BUILTIN_OBJS = \
        builtin-diff-files.o \
        builtin-diff-index.o \
        builtin-diff-tree.o \
+       builtin-fast-export.o \
        builtin-fetch.o \
        builtin-fetch-pack.o \
        builtin-fetch--tool.o \
@@ -371,7 +374,6 @@ BUILTIN_OBJS = \
        builtin-rev-parse.o \
        builtin-revert.o \
        builtin-rm.o \
-       builtin-runstatus.o \
        builtin-shortlog.o \
        builtin-show-branch.o \
        builtin-stripspace.o \
@@ -408,7 +410,9 @@ endif
 ifeq ($(uname_S),Darwin)
        NEEDS_SSL_WITH_CRYPTO = YesPlease
        NEEDS_LIBICONV = YesPlease
-       OLD_ICONV = UnfortunatelyYes
+       ifneq ($(shell expr "$(uname_R)" : '9\.'),2)
+               OLD_ICONV = UnfortunatelyYes
+       endif
        NO_STRLCPY = YesPlease
        NO_MEMMEM = YesPlease
 endif
@@ -446,6 +450,7 @@ ifeq ($(uname_O),Cygwin)
        NEEDS_LIBICONV = YesPlease
        NO_FAST_WORKING_DIRECTORY = UnfortunatelyYes
        NO_TRUSTABLE_FILEMODE = UnfortunatelyYes
+       OLD_ICONV = UnfortunatelyYes
        # There are conflicting reports about this.
        # On some boxes NO_MMAP is needed, and not so elsewhere.
        # Try commenting this out if you suspect MMAP is more efficient
@@ -745,8 +750,11 @@ ETC_GITCONFIG_SQ = $(subst ','\'',$(ETC_GITCONFIG))
 
 DESTDIR_SQ = $(subst ','\'',$(DESTDIR))
 bindir_SQ = $(subst ','\'',$(bindir))
+mandir_SQ = $(subst ','\'',$(mandir))
+infodir_SQ = $(subst ','\'',$(infodir))
 gitexecdir_SQ = $(subst ','\'',$(gitexecdir))
 template_dir_SQ = $(subst ','\'',$(template_dir))
+htmldir_SQ = $(subst ','\'',$(htmldir))
 prefix_SQ = $(subst ','\'',$(prefix))
 
 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
@@ -775,6 +783,7 @@ endif
 all::
 ifndef NO_TCLTK
        $(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) all
+       $(QUIET_SUBDIR0)gitk-git $(QUIET_SUBDIR1) all
 endif
        $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all
        $(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1)
@@ -782,12 +791,6 @@ endif
 strip: $(PROGRAMS) git$X
        $(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X
 
-gitk-wish: gitk GIT-GUI-VARS
-       $(QUIET_GEN)$(RM) $@ $@+ && \
-       sed -e '1,3s|^exec .* "$$0"|exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' <gitk >$@+ && \
-       chmod +x $@+ && \
-       mv -f $@+ $@
-
 git.o: git.c common-cmds.h GIT-CFLAGS
        $(QUIET_CC)$(CC) -DGIT_VERSION='"$(GIT_VERSION)"' \
                $(ALL_CFLAGS) -c $(filter %.c,$^)
@@ -796,7 +799,10 @@ git$X: git.o $(BUILTIN_OBJS) $(GITLIBS)
        $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ git.o \
                $(BUILTIN_OBJS) $(ALL_LDFLAGS) $(LIBS)
 
-help.o: common-cmds.h
+help.o: help.c common-cmds.h GIT-CFLAGS
+       $(QUIET_CC)$(CC) -o $*.o -c $(ALL_CFLAGS) \
+               '-DGIT_MAN_PATH="$(mandir_SQ)"' \
+               '-DGIT_INFO_PATH="$(infodir_SQ)"' $<
 
 git-merge-subtree$X: git-merge-recursive$X
        $(QUIET_BUILT_IN)$(RM) $@ && ln git-merge-recursive$X $@
@@ -804,7 +810,7 @@ git-merge-subtree$X: git-merge-recursive$X
 $(BUILT_INS): git$X
        $(QUIET_BUILT_IN)$(RM) $@ && ln git$X $@
 
-common-cmds.h: ./generate-cmdlist.sh
+common-cmds.h: ./generate-cmdlist.sh command-list.txt
 
 common-cmds.h: $(wildcard Documentation/git-*.txt)
        $(QUIET_GEN)./generate-cmdlist.sh > $@+ && mv $@+ $@
@@ -815,6 +821,7 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
            -e 's|@@PERL@@|$(PERL_PATH_SQ)|g' \
            -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
            -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
+           -e 's|@@HTMLDIR@@|$(htmldir_SQ)|g' \
            $@.sh >$@+ && \
        chmod +x $@+ && \
        mv $@+ $@
@@ -840,9 +847,6 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
        chmod +x $@+ && \
        mv $@+ $@
 
-git-status: git-commit
-       $(QUIET_GEN)cp $< $@+ && mv $@+ $@
-
 gitweb/gitweb.cgi: gitweb/gitweb.perl
        $(QUIET_GEN)$(RM) $@ $@+ && \
        sed -e '1s|#!.*perl|#!$(PERL_PATH_SQ)|' \
@@ -1024,14 +1028,14 @@ remove-dashes:
 ### Installation rules
 
 install: all
-       $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(bindir_SQ)'
-       $(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'
+       $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(bindir_SQ)'
+       $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'
        $(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'
        $(INSTALL) git$X '$(DESTDIR_SQ)$(bindir_SQ)'
        $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
-       $(MAKE) -C perl prefix='$(prefix_SQ)' install
+       $(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
 ifndef NO_TCLTK
-       $(INSTALL) gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk
+       $(MAKE) -C gitk-git install
        $(MAKE) -C git-gui install
 endif
        if test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \
@@ -1124,7 +1128,7 @@ clean:
        $(MAKE) -C templates/ clean
        $(MAKE) -C t/ clean
 ifndef NO_TCLTK
-       $(RM) gitk-wish
+       $(MAKE) -C gitk-git clean
        $(MAKE) -C git-gui clean
 endif
        $(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-GUI-VARS
@@ -1140,13 +1144,12 @@ check-docs::
                case "$$v" in \
                git-merge-octopus | git-merge-ours | git-merge-recursive | \
                git-merge-resolve | git-merge-stupid | git-merge-subtree | \
-               git-add--interactive | git-fsck-objects | git-init-db | \
-               git-rebase--interactive | \
-               git-repo-config | git-fetch--tool ) continue ;; \
+               git-fsck-objects | git-init-db | git-repo-config | \
+               git-?*--?* ) continue ;; \
                esac ; \
                test -f "Documentation/$$v.txt" || \
                echo "no doc: $$v"; \
-               sed -e '1,/^__DATA__/d' Documentation/cmd-list.perl | \
+               sed -e '/^#/d' command-list.txt | \
                grep -q "^$$v[  ]" || \
                case "$$v" in \
                git) ;; \
@@ -1154,9 +1157,9 @@ check-docs::
                esac ; \
        done; \
        ( \
-               sed -e '1,/^__DATA__/d' \
+               sed -e '/^#/d' \
                    -e 's/[     ].*//' \
-                   -e 's/^/listed /' Documentation/cmd-list.perl; \
+                   -e 's/^/listed /' command-list.txt; \
                ls -1 Documentation/git*txt | \
                sed -e 's|Documentation/|documented |' \
                    -e 's/\.txt//'; \
@@ -1165,6 +1168,7 @@ check-docs::
                case "$$how,$$cmd" in \
                *,git-citool | \
                *,git-gui | \
+               *,git-help | \
                documented,gitattributes | \
                documented,gitignore | \
                documented,gitmodules | \