Re: [PATCH] Added options NO_TCLTK, WITH_P4IMPORT and --with-tcltk/--without-tcltk.

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] Added options NO_TCLTK, WITH_P4IMPORT and --with-tcltk/--without-tcltk.

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:01

Please do not mix P4IMPORT and TCLTK issues in the same patch.
As I am still not convinced about what to do with NO_TCLTK, this
forces people who might want to see P4IMPORT to wait longer than
necessary.

[PATCH] Add the WITH_P4IMPORT knob to the Makefile.

From: Eygene Ryabinkin <hidden>
Date: 2016-06-15 22:43:01

WITH_P4IMPORT: enables the installation of the Perforce import
script.

Signed-off-by: Eygene Ryabinkin <redacted>
---
 Makefile |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index 51c1fed..a294ec8 100644
--- a/Makefile
+++ b/Makefile
@@ -110,6 +110,8 @@ all::
 # Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's
 # MakeMaker (e.g. using ActiveState under Cygwin).
 #
+# Define WITH_P4IMPORT to build and install Python git-p4import script.
+#
 
 GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
 	@$(SHELL_PATH) ./GIT-VERSION-GEN
@@ -196,9 +198,20 @@ SCRIPT_PERL = \
 	git-svnimport.perl git-cvsexportcommit.perl \
 	git-send-email.perl git-svn.perl
 
+SCRIPT_PYTHON = \
+	git-p4import.py
+
+ifdef WITH_P4IMPORT
 SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
 	  $(patsubst %.perl,%,$(SCRIPT_PERL)) \
+	  $(patsubst %.py,%,$(SCRIPT_PYTHON)) \
 	  git-status git-instaweb
+else
+SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \
+	  $(patsubst %.perl,%,$(SCRIPT_PERL)) \
+	  git-status git-instaweb
+endif
+
 
 # ... and all the rest that could be moved out of bindir to gitexecdir
 PROGRAMS = \
@@ -241,6 +254,9 @@ endif
 ifndef PERL_PATH
 	PERL_PATH = /usr/bin/perl
 endif
+ifndef PYTHON_PATH
+	PYTHON_PATH = /usr/local/bin/python
+endif
 
 export PERL_PATH
 
@@ -646,6 +662,7 @@ prefix_SQ = $(subst ','\'',$(prefix))
 
 SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
 PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
+PYTHON_PATH_SQ = $(subst ','\'',$(PYTHON_PATH))
 
 LIBS = $(GITLIBS) $(EXTLIBS)
 
@@ -699,6 +716,15 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
 
 $(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
 
+$(patsubst %.py,%,$(SCRIPT_PYTHON)) : % : %.py
+	rm -f $@ $@+
+	sed -e '1s|#!.*/python|#!$(PYTHON_PATH_SQ)|' \
+	    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \
+	    -e 's/@@NO_CURL@@/$(NO_CURL)/g' \
+	    $@.py >$@+
+	chmod +x $@+
+	mv $@+ $@
+
 perl/perl.mak: GIT-CFLAGS
 	$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
 
-- 
1.5.0.3-dirty
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help