зеркало из https://github.com/microsoft/git.git
Makefile: detect when PYTHON_PATH changes
When make is run, the python scripts are created from *.py files that are changed to use the python given by PYTHON_PATH. And PYTHON_PATH is set by default to /usr/bin/python on Linux. However, next time make is run with a different value in PYTHON_PATH, we failed to regenerate these scripts. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Родитель
f6f3921db6
Коммит
022250adfd
|
@ -3,6 +3,7 @@
|
|||
/GIT-LDFLAGS
|
||||
/GIT-GUI-VARS
|
||||
/GIT-PREFIX
|
||||
/GIT-PYTHON-VARS
|
||||
/GIT-SCRIPT-DEFINES
|
||||
/GIT-USER-AGENT
|
||||
/GIT-VERSION-FILE
|
||||
|
|
16
Makefile
16
Makefile
|
@ -2245,7 +2245,7 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : unimplemented.sh
|
|||
endif # NO_PERL
|
||||
|
||||
ifndef NO_PYTHON
|
||||
$(patsubst %.py,%,$(SCRIPT_PYTHON)): GIT-CFLAGS GIT-PREFIX
|
||||
$(patsubst %.py,%,$(SCRIPT_PYTHON)): GIT-CFLAGS GIT-PREFIX GIT-PYTHON-VARS
|
||||
$(patsubst %.py,%,$(SCRIPT_PYTHON)): % : %.py
|
||||
$(QUIET_GEN)$(RM) $@ $@+ && \
|
||||
INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C git_remote_helpers -s \
|
||||
|
@ -2636,6 +2636,18 @@ GIT-GUI-VARS: FORCE
|
|||
fi
|
||||
endif
|
||||
|
||||
### Detect Python interpreter path changes
|
||||
ifndef NO_PYTHON
|
||||
TRACK_PYTHON = $(subst ','\'',-DPYTHON_PATH='$(PYTHON_PATH_SQ)')
|
||||
|
||||
GIT-PYTHON-VARS: FORCE
|
||||
@VARS='$(TRACK_PYTHON)'; \
|
||||
if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \
|
||||
echo 1>&2 " * new Python interpreter location"; \
|
||||
echo "$$VARS" >$@; \
|
||||
fi
|
||||
endif
|
||||
|
||||
test_bindir_programs := $(patsubst %,bin-wrappers/%,$(BINDIR_PROGRAMS_NEED_X) $(BINDIR_PROGRAMS_NO_X) $(TEST_PROGRAMS_NEED_X))
|
||||
|
||||
all:: $(TEST_PROGRAMS) $(test_bindir_programs)
|
||||
|
@ -2911,7 +2923,7 @@ ifndef NO_TCLTK
|
|||
$(MAKE) -C git-gui clean
|
||||
endif
|
||||
$(RM) GIT-VERSION-FILE GIT-CFLAGS GIT-LDFLAGS GIT-GUI-VARS GIT-BUILD-OPTIONS
|
||||
$(RM) GIT-USER-AGENT GIT-PREFIX GIT-SCRIPT-DEFINES
|
||||
$(RM) GIT-USER-AGENT GIT-PREFIX GIT-SCRIPT-DEFINES GIT-PYTHON-VARS
|
||||
|
||||
.PHONY: all install profile-clean clean strip
|
||||
.PHONY: shell_compatibility_test please_set_SHELL_PATH_to_a_more_modern_shell
|
||||
|
|
Загрузка…
Ссылка в новой задаче