summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d8b6a1a)
raw | patch | inline | side by side (parent: d8b6a1a)
author | Eygene Ryabinkin <rea-git@codelabs.ru> | |
Tue, 27 Mar 2007 10:26:01 +0000 (14:26 +0400) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 1 Apr 2007 06:59:42 +0000 (23:59 -0700) |
WITH_P4IMPORT: enables the installation of the Perforce import
script.
Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
script.
Signed-off-by: Eygene Ryabinkin <rea-git@codelabs.ru>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Makefile | patch | blob | history |
diff --git a/Makefile b/Makefile
index b159ffd0ae49c28725de6549132e0ad3a3b69d20..bc8b70bf1cf622331370e94608d42c5580485fcd 100644 (file)
--- a/Makefile
+++ b/Makefile
# 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
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 = \
ifndef PERL_PATH
PERL_PATH = /usr/bin/perl
endif
+ifndef PYTHON_PATH
+ PYTHON_PATH = /usr/local/bin/python
+endif
export PERL_PATH
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
PERL_PATH_SQ = $(subst ','\'',$(PERL_PATH))
+PYTHON_PATH_SQ = $(subst ','\'',$(PYTHON_PATH))
LIBS = $(GITLIBS) $(EXTLIBS)
$(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)