help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shell functions from env not available in make?


From: Paul D. Smith
Subject: Re: shell functions from env not available in make?
Date: Fri, 25 Oct 2002 00:39:21 -0400

%% gk <address@hidden> writes:

  g> I have sourced a function 'xmsubdirs' into my current shell and was
  g> expecting it to be available from a makefile rule but it is not.

This is a shell question, not a GNU make question.  If you do this:

  $ echo 'all:;@env' | make -f-

you'll see that make _does_ export the function variable to the
processes it invokes, just as it would any other environment variable.

If they don't show up in the subshell it means that the shell is not
processing them.  Perhaps bash ignores functions unless it's invoked as
an interactive shell.

You'll have to ask on the bash help/bug lists.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

[Prev in Thread] Current Thread [Next in Thread]