From mboxrd@z Thu Jan 1 00:00:00 1970 From: Junio C Hamano Subject: Re: [PATCH] NO_PERL support Date: Fri, 03 Apr 2009 09:25:21 -0700 Message-ID: <7vljqhaemm.fsf@gitster.siamese.dyndns.org> References: <20090403T065545Z@curie.orbis-terrarum.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Git Mailing List To: "Robin H. Johnson" X-From: git-owner@vger.kernel.org Fri Apr 03 18:28:06 2009 Return-path: Envelope-to: gcvg-git-2@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1LpmFQ-0003SD-NX for gcvg-git-2@gmane.org; Fri, 03 Apr 2009 18:28:05 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932786AbZDCQZb (ORCPT ); Fri, 3 Apr 2009 12:25:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932532AbZDCQZb (ORCPT ); Fri, 3 Apr 2009 12:25:31 -0400 Received: from a-sasl-quonix.sasl.smtp.pobox.com ([208.72.237.25]:34190 "EHLO sasl.smtp.pobox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754394AbZDCQZa (ORCPT ); Fri, 3 Apr 2009 12:25:30 -0400 Received: from localhost.localdomain (unknown [127.0.0.1]) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTP id 69DB5BF02; Fri, 3 Apr 2009 12:25:25 -0400 (EDT) Received: from pobox.com (unknown [68.225.240.211]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by a-sasl-quonix.sasl.smtp.pobox.com (Postfix) with ESMTPSA id A86D1BF01; Fri, 3 Apr 2009 12:25:22 -0400 (EDT) User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) X-Pobox-Relay-ID: 096ABB5A-206C-11DE-8D09-781813508E2D-77302942!a-sasl-quonix.pobox.com Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: "Robin H. Johnson" writes: > diff --git a/Makefile b/Makefile > index 0675c43..0adb2b5 100644 > --- a/Makefile > +++ b/Makefile > @@ -139,6 +139,8 @@ all:: > # Define NO_PERL_MAKEMAKER if you cannot use Makefiles generated by perl's > # MakeMaker (e.g. using ActiveState under Cygwin). > # > +# Define NO_PERL if you do not want Perl scripts at all. > +# > # Define NO_TCLTK if you do not want Tcl/Tk GUI. > # > # The TCL_PATH variable governs the location of the Tcl interpreter > @@ -277,6 +279,8 @@ SCRIPT_SH += git-stash.sh > SCRIPT_SH += git-submodule.sh > SCRIPT_SH += git-web--browse.sh > > +SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) > +ifndef NO_PERL > SCRIPT_PERL += git-add--interactive.perl > SCRIPT_PERL += git-archimport.perl > SCRIPT_PERL += git-cvsexportcommit.perl > @@ -285,10 +289,11 @@ SCRIPT_PERL += git-cvsserver.perl > SCRIPT_PERL += git-relink.perl > SCRIPT_PERL += git-send-email.perl > SCRIPT_PERL += git-svn.perl > - > -SCRIPTS = $(patsubst %.sh,%,$(SCRIPT_SH)) \ > - $(patsubst %.perl,%,$(SCRIPT_PERL)) \ > - git-instaweb > +SCRIPTS += $(patsubst %.perl,%,$(SCRIPT_PERL)) \ > + git-instaweb > +else > +SCRIPT_PERL = > +endif > >... > +ifdef NO_PERL > + BASIC_CFLAGS += -DNO_PERL > +endif While I do not mind omitting whole programs in fringes like you did for archimport and relink, I *really* do not like this particular change (and any change to the C code). I'd rather see something along the lines of: if NO_PERL git-add--interactive: unimplemented.sh rm -f $@+ $@ cat $? >$@+ chmod +x $@+ mv $@+ $@ else git-add--interactive: git-add--interactive.perl ... usual .perl to script rule applies endif and ship: #!/bin/sh echo >&2 "Sorry $0 not available here" exit 1 in unimplemented.sh, *without* touching code that calls out to scripts that happen to be implemented in Perl.