log and diff family: honor config even from subdirectories
[gitweb.git] / Makefile
index 3e085dfa6fbabf1bcf758b795f32ea50a40880c2..49eaa10b3be884a2aebdcea51ca50d0018e869f5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -116,6 +116,8 @@ template_dir = $(prefix)/share/git-core/templates/
 GIT_PYTHON_DIR = $(prefix)/share/git-core/python
 # DESTDIR=
 
+export prefix bindir gitexecdir template_dir GIT_PYTHON_DIR
+
 CC = gcc
 AR = ar
 TAR = tar
@@ -575,7 +577,7 @@ git-instaweb: git-instaweb.sh gitweb/gitweb.cgi gitweb/gitweb.css
            -e '/@@GITWEB_CGI@@/d' \
            -e '/@@GITWEB_CSS@@/r gitweb/gitweb.css' \
            -e '/@@GITWEB_CSS@@/d' \
-           $@.sh > $@+
+           $@.sh | sed "s|/usr/bin/git|$(bindir)/git|" > $@+
        chmod +x $@+
        mv $@+ $@
 
@@ -753,8 +755,8 @@ dist-doc:
        rm -fr .doc-tmp-dir
        mkdir .doc-tmp-dir .doc-tmp-dir/man1 .doc-tmp-dir/man7
        $(MAKE) -C Documentation DESTDIR=./ \
-               man1=../.doc-tmp-dir/man1 \
-               man7=../.doc-tmp-dir/man7 \
+               man1dir=../.doc-tmp-dir/man1 \
+               man7dir=../.doc-tmp-dir/man7 \
                install
        cd .doc-tmp-dir && $(TAR) cf ../$(manpages).tar .
        gzip -n -9 -f $(manpages).tar