From mboxrd@z Thu Jan 1 00:00:00 1970 From: Junio C Hamano Subject: Re: [PATCH] Fix compilation Date: Fri, 07 Jul 2006 13:02:35 -0700 Message-ID: <7vbqs1w5d0.fsf@assigned-by-dhcp.cox.net> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: git@vger.kernel.org, junkio@cox.net X-From: git-owner@vger.kernel.org Fri Jul 07 22:02:49 2006 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FywXA-0007hE-Mo for gcvg-git@gmane.org; Fri, 07 Jul 2006 22:02:41 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932300AbWGGUCh (ORCPT ); Fri, 7 Jul 2006 16:02:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932304AbWGGUCh (ORCPT ); Fri, 7 Jul 2006 16:02:37 -0400 Received: from fed1rmmtao02.cox.net ([68.230.241.37]:31166 "EHLO fed1rmmtao02.cox.net") by vger.kernel.org with ESMTP id S932300AbWGGUCh (ORCPT ); Fri, 7 Jul 2006 16:02:37 -0400 Received: from assigned-by-dhcp.cox.net ([68.4.9.127]) by fed1rmmtao02.cox.net (InterMail vM.6.01.06.01 201-2131-130-101-20060113) with ESMTP id <20060707200236.ISQR12581.fed1rmmtao02.cox.net@assigned-by-dhcp.cox.net>; Fri, 7 Jul 2006 16:02:36 -0400 To: Johannes Schindelin In-Reply-To: (Johannes Schindelin's message of "Fri, 7 Jul 2006 01:21:57 +0200 (CEST)") User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: Johannes Schindelin writes: > Note also, that this patch relies on the perl scripts not > caring if an additional command is shifted into the 2nd line. How about doing something like this instead, then? diff --git a/Makefile b/Makefile index 71657ec..01b9a94 100644 --- a/Makefile +++ b/Makefile @@ -550,9 +550,13 @@ common-cmds.h: Documentation/git-*.txt $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl rm -f $@ $@+ INSTLIBDIR=`$(MAKE) -C perl -s --no-print-directory instlibdir` && \ - sed -e '1s|#!.*perl|#!$(PERL_PATH_SQ)|1' \ - -e '2i\ - use lib (split(/:/, $$ENV{GITPERLLIB} || '\'"$$INSTLIBDIR"\''));' \ + sed -e '1{' \ + -e ' s|#!.*perl|#!$(PERL_PATH_SQ)|' \ + -e ' h' \ + -e ' s=.*=use lib (split(/:/, $$ENV{GITPERLLIB} || "@@INSTLIBDIR@@"));=' \ + -e ' H' \ + -e ' x' \ + -e '}' \ -e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \ -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ $@.perl >$@+