After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 73381 - intltool.m4 uses $() feature not found in /bin/sh on Solaris
intltool.m4 uses $() feature not found in /bin/sh on Solaris
Status: RESOLVED FIXED
Product: intltool
Classification: Deprecated
Component: general
unspecified
Other opensolaris
: Normal blocker
: ---
Assigned To: intltool maintainers
intltool maintainers
Depends on:
Blocks:
 
 
Reported: 2002-03-04 15:25 UTC by Morten Welinder
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.0


Attachments
Patch to use backticks instead of $() (1.71 KB, patch)
2002-03-05 21:25 UTC, ÉRDI Gergõ
none Details | Review

Description Morten Welinder 2002-03-04 15:25:49 UTC
Someone is confusing Makefile syntax with shell syntax.  There is no
$(...) in the shell.   Use backquotes.

INTLTOOL_REQUIRED_VERSION_AS_INT=$(echo $1 | awk -F. '{ printf "%d", $[1] *
100 + $[2]; }')
Comment 1 Darin Adler 2002-03-04 16:13:38 UTC
Kenneth?
Comment 2 Kenneth Rohde Christiansen 2002-03-05 11:26:13 UTC
Ok, In the beginning I used back quotes, but I couldn't escape the awk
code properly, so it didn't work. Cactus told me that this was the way
to do it, so that is what I did. If you can tell me how to get it
working with backquotes, I am happy to change it
Comment 3 ÉRDI Gergõ 2002-03-05 19:00:06 UTC
If you read this:
http://perso.club-internet.fr/thedech/unix/ksh/appa_02.htm

especially this part:

However, the Korn shell did contribute a few of its features to the
POSIX standard, including:
    [...]
    * $(...) syntax for command substitution [...]


it implies that $() is, in fact, a POSIX-standard way of doing this in
a shell.

I'm sure you can look up more formal definitions -- this is just the
first page I found on Google.
Comment 4 Morten Welinder 2002-03-05 19:18:01 UTC
I stand corrected as far as the standardness is concerned.  However...

It does not matter much if it's a standard if that standard is not
yet widely enough deployed.  /bin/sh on Solaris does not seem to
support it and although Solaris undoubtedly has other shells that
do, configure is a /bin/sh script.

A version of Digital unix just tested does not support it either.
Comment 5 Gregory Leblanc 2002-03-05 20:01:02 UTC
I'm fairly sure that $(...) isn't POSIX shell.  Even if it is, it's
-not- among the portable shell constructs.  Check out the autobook,
namely
http://sources.redhat.com/autobook/autobook/autobook_217.html#SEC217

Ah, it seems that it IS POSIX, just "not remotely portable".
Comment 6 Darin Adler 2002-03-05 20:38:29 UTC
OK. Lets port this so it doesn't require this $() feature.

Can someone tackle this?
Comment 7 Kenneth Rohde Christiansen 2002-03-05 20:54:10 UTC
The original problem wasn't with the line shown in the bugreport, so
the $( ... ) can easily be removed from all but one line.

The problem was that I didn't know how to escape the ['s in m4,
because [ is used to escape strings like '$1' by doing '$[1]'

Suggestions are more than welcome
Comment 8 Morten Welinder 2002-03-05 20:57:06 UTC
In M4, use "[[" instead of "[".
Comment 9 ÉRDI Gergõ 2002-03-05 21:06:56 UTC
I've sent Kenneth a patch that solves the real issue at hand (which is
_NOT_ "use [[ instead of [" -- maybe next time you should consider
looking at the code before suggesting bogus non-fixes)
Comment 10 Darin Adler 2002-03-05 21:12:20 UTC
You could also attach the patch here, rather than just sending it
to Kenneth. I'd like to see it.
Comment 11 ÉRDI Gergõ 2002-03-05 21:25:41 UTC
Created attachment 6992 [details] [review]
Patch to use backticks instead of $()
Comment 12 ÉRDI Gergõ 2002-03-05 21:26:19 UTC
here it is (it's NOT tested, that's why I've only sent it to Kenneth)
Comment 13 jacob berkman 2002-03-05 22:54:14 UTC
i ran into this problem too, and had already done the above patch.

i've built up to gnome-vfs w/o problems.
Comment 14 Morten Welinder 2002-03-11 14:58:54 UTC
Seems fixed.