builtin-help: make some internal functions available to other builtins
[gitweb.git] / Makefile
index fceca9218416826e09be3106c37df19ce5a7fcf2..83d79afd9c5efd560a0f3f88061d7c1b5c077f65 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -293,7 +293,6 @@ PROGRAMS += git-pack-redundant$X
 PROGRAMS += git-patch-id$X
 PROGRAMS += git-receive-pack$X
 PROGRAMS += git-send-pack$X
-PROGRAMS += git-shell$X
 PROGRAMS += git-show-index$X
 PROGRAMS += git-unpack-file$X
 PROGRAMS += git-update-server-info$X
@@ -356,6 +355,7 @@ LIB_H += git-compat-util.h
 LIB_H += graph.h
 LIB_H += grep.h
 LIB_H += hash.h
+LIB_H += help.h
 LIB_H += list-objects.h
 LIB_H += ll-merge.h
 LIB_H += log-tree.h
@@ -756,6 +756,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))
        COMPAT_OBJS += compat/mingw.o compat/fnmatch.o compat/regex.o compat/winansi.o
        EXTLIBS += -lws2_32
        X = .exe
+       gitexecdir = ../libexec/git-core
        template_dir = ../share/git-core/templates/
        ETC_GITCONFIG = ../etc/gitconfig
 endif
@@ -822,6 +823,7 @@ EXTLIBS += -lz
 ifndef NO_POSIX_ONLY_PROGRAMS
        PROGRAMS += git-daemon$X
        PROGRAMS += git-imap-send$X
+       PROGRAMS += git-shell$X
 endif
 ifndef NO_OPENSSL
        OPENSSL_LIBSSL = -lssl
@@ -1066,7 +1068,7 @@ endif
 
 all::
 ifndef NO_TCLTK
-       $(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) all
+       $(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) gitexecdir='$(gitexec_instdir_SQ)' all
        $(QUIET_SUBDIR0)gitk-git $(QUIET_SUBDIR1) all
 endif
        $(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' all
@@ -1361,8 +1363,11 @@ endif
                cp "$$bindir/git$X" "$$execdir/git$X"; \
        fi && \
        { $(foreach p,$(BUILT_INS), $(RM) "$$execdir/$p" && ln "$$execdir/git$X" "$$execdir/$p" ;) } && \
-       $(RM) "$$execdir/git$X" && \
-       ./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-shell$X"
+       if test "z$$bindir" != "z$$execdir"; \
+       then \
+               $(RM) "$$execdir/git$X"; \
+       fi && \
+       ./check_bindir "z$$bindir" "z$$execdir" "$$bindir/git-add$X"
 
 install-doc:
        $(MAKE) -C Documentation install