git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] NO_PERL support

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 3, 2009, 16:25 UTC
Message-ID
<7vljqhaemm.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20090403T065545Z@curie.orbis-terrarum.net>
"Robin H. Johnson" <robbat2@gentoo.org> writes:
Show 40 quoted lines
> 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.

Previous: Jeff KingNext: Jeff King
Message 13 of 30 in “NO_PERL support”
  1. NO_PERL supportRobin H. Johnson, Apr 3, 2009
  2. Jeff KingApr 3, 2009
  3. Johannes SchindelinApr 3, 2009
  4. Jeff KingApr 3, 2009
  5. Johannes SchindelinApr 3, 2009
  6. Miklos VajnaApr 3, 2009
  7. Jeff KingApr 3, 2009
  8. Johannes SixtApr 3, 2009
  9. Jeff KingApr 3, 2009
  10. Jeff KingApr 3, 2009
  11. Robin H. JohnsonApr 3, 2009
  12. Jeff KingApr 3, 2009
  13. Junio C HamanoApr 3, 2009
  14. Jeff KingApr 3, 2009
  15. Junio C HamanoApr 3, 2009
  16. Jeff KingApr 3, 2009
  17. 0/4 NO_PERL supportJeff King, Apr 3, 2009
  18. 1/4 commit: abort commit if interactive add failedJeff King, Apr 3, 2009
  19. 2/4 tests: remove exit after test_done callJeff King, Apr 3, 2009
  20. 3/4 Makefile: allow building without perlJeff King, Apr 3, 2009
  21. Robin H. JohnsonApr 4, 2009
  22. Jeff KingApr 4, 2009
  23. Robin H. JohnsonApr 4, 2009
  24. Jeff KingApr 4, 2009
  25. Robin H. JohnsonApr 5, 2009
  26. Jeff KingApr 7, 2009
  27. 4/4 tests: skip perl tests if NO_PERL is definedJeff King, Apr 3, 2009
  28. Robin H. JohnsonApr 4, 2009
  29. Jeff KingApr 4, 2009
  30. Jeff KingApr 7, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.