From: Thomas Rast <trast@inf.ethz.ch>
To: Stefano Lattarini <stefano.lattarini@gmail.com>
Cc: <git@vger.kernel.org>
Subject: Re: [RFC/PATCH] build: avoid possible confusion between GNU/XPG4 make on Solaris
Date: Fri, 2 Mar 2012 10:34:31 +0100 [thread overview]
Message-ID: <87obsfcpnc.fsf@thomas.inf.ethz.ch> (raw)
In-Reply-To: <df98ed215324f521f3aaff7fa4ba41ba2a1894dc.1330679536.git.stefano.lattarini@gmail.com> (Stefano Lattarini's message of "Fri, 2 Mar 2012 10:13:00 +0100")
Stefano Lattarini <stefano.lattarini@gmail.com> writes:
> +# FIXME: this is ugly, and which(1) is quite unportable. Find a better
> +# way to obtain the same effect.
> +MAKE := $(shell set $(MAKE); m1=$$1; shift; \
> + m2=`which $$m1 2>/dev/null` && test -n "$$m2" || m2=$$m1; \
> + echo "$$m2 $$*")
There's 'command -v make'. 'man 1p command' on my system (opensuse
installs a bunch of POSIX reference material) says
-v (On systems supporting the User Portability Utilities
option.) Write a string to standard output that indicates
the pathname or command that will be used by the shell, in
the current shell execution environment (see Shell Execu-
tion Environment ), to invoke command_name, but do not
invoke command_name.
* Utilities, regular built-in utilities, command_names
including a slash character, and any implementation-
defined functions that are found using the PATH vari-
able (as described in Command Search and Execution ),
shall be written as absolute pathnames.
So perhaps enough systems including Solaris "support the User
Portability Utilities option", and you can use this?
--
Thomas Rast
trast@{inf,student}.ethz.ch
next prev parent reply other threads:[~2012-03-02 9:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-02 9:13 [RFC/PATCH] build: avoid possible confusion between GNU/XPG4 make on Solaris Stefano Lattarini
2012-03-02 9:34 ` Thomas Rast [this message]
2012-03-02 9:41 ` Stefano Lattarini
2012-03-02 10:18 ` [PATCH v2] " Stefano Lattarini
2012-03-02 18:35 ` [RFC/PATCH] " Junio C Hamano
2012-03-02 19:00 ` Stefano Lattarini
2012-03-02 19:46 ` Junio C Hamano
2012-03-09 12:43 ` [PATCH] configure: allow user to prevent $PATH "sanitization" " Stefano Lattarini
2012-03-09 16:29 ` Junio C Hamano
2012-03-09 19:46 ` Junio C Hamano
2012-03-09 21:46 ` Stefano Lattarini
2012-03-09 21:59 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87obsfcpnc.fsf@thomas.inf.ethz.ch \
--to=trast@inf.ethz.ch \
--cc=git@vger.kernel.org \
--cc=stefano.lattarini@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).