From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eygene Ryabinkin Subject: [PATCH] Add the WITH_P4IMPORT knob to the Makefile. Date: Tue, 27 Mar 2007 14:26:01 +0400 Message-ID: <20070327102601.GN14837@codelabs.ru> References: <20070321115004.GB14837@codelabs.ru> <20070321144008.GE14837@codelabs.ru> <20070321160126.GH14837@codelabs.ru> <7v1wji371q.fsf@assigned-by-dhcp.cox.net> <20070326073143.GB44578@codelabs.ru> <20070326073250.GC44578@codelabs.ru> <7v1wjcz9x1.fsf@assigned-by-dhcp.cox.net> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Cc: Johannes Schindelin , Jakub Narebski , git@vger.kernel.org To: Junio C Hamano X-From: git-owner@vger.kernel.org Tue Mar 27 12:26:27 2007 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1HW8sc-0007z1-Bx for gcvg-git@gmane.org; Tue, 27 Mar 2007 12:26:18 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753729AbXC0K0Q (ORCPT ); Tue, 27 Mar 2007 06:26:16 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753693AbXC0K0P (ORCPT ); Tue, 27 Mar 2007 06:26:15 -0400 Received: from pobox.codelabs.ru ([144.206.177.45]:61614 "EHLO pobox.codelabs.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753536AbXC0K0P (ORCPT ); Tue, 27 Mar 2007 06:26:15 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Message-ID:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender:X-Spam-Status:Subject; b=pQnSkmlTmXdzf/MxueTXGqrww9QS4rg+lz0nRRIzKlD9VHIdfNyOeTWsxY5ynE6+pu3mdORsyo3ADRIhM/siOvV1T/NDHvbDmX1uJxFL55/lIoSId3i3NPCsloWfK0FTIHVVvmZxLXT3SuTQ/UO++pgjvOsa0XZDvLSsbhqtC2s=; Received: from codelabs.ru (pobox.codelabs.ru [144.206.177.45]) by pobox.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1HW8sU-000DZg-9H; Tue, 27 Mar 2007 14:26:10 +0400 Content-Disposition: inline In-Reply-To: <7v1wjcz9x1.fsf@assigned-by-dhcp.cox.net> X-Spam-Status: No, score=-1.9 required=4.0 tests=ALL_TRUSTED,AWL,BAYES_50 Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: WITH_P4IMPORT: enables the installation of the Perforce import script. Signed-off-by: Eygene Ryabinkin --- 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