Discussion:
[oi-dev] Whitespace in Makefiles in oi-userland keep causing Problems
Reginald Beardsley via oi-dev
2018-09-27 23:45:23 UTC
Permalink
Whitespace in Makefiles has been a mess from the start. The story is that Feldman realized that making distinctions between types of white space was a bad idea. But he had a dozen users and didn't want to break their Makefiles. And the Bourne shell is not much better on that score. What you can't see can have devastating consequences,


--------------------------------------------
On Thu, 9/27/18, Till Wegmüller <***@gmail.com> wrote:

Subject: [oi-dev] Whitespace in Makefiles in oi-userland keep causing Problems
To: "OpenIndiana Developer mailing list" <oi-***@openindiana.org>
Date: Thursday, September 27, 2018, 2:03 PM

Hello Fellow developers.

I have a confusing Problem with our
buildsystem.
Since today it keeps behaving
Inconsistently when I have a Whitespace in
a Value of a variable.

A Makefile like so:

<snip>
COMPONENT_NAME=salt
COMPONENT_VERSION=2018.3.2
COMPONENT_SUMMARY='Portable,
distributed, remote execution and
configuration management system'
COMPONENT_PROJECT_URL=http://saltstack.com
COMPONENT_FMRI=system/management/$(COMPONENT_NAME)
COMPONENT_CLASSIFICATION='System/Administration
and Configuration'
<snip>

Something like COMPONENT_CLASSIFICATION
would break pkgmogrify with:
pkgmogrify: File
/export/home/toast/workspace/openindiana/userland/components/python/salt/build/manifest-i386-salt-27.p5m
line 18: Malformed action at position:
90: whitespace in key:
    set
name=info.classification
value=org.opensolaris.category.2008:System/Administration
and Configuration

I could manage to supress this by using
escape characters like " or '.
But not in all cases. And with the
Classification the Whitespaces are
required as that Category has
Whitespaces in their name. Thus it won't
publish.

I remember that Whitespaces where no
problem not long ago. How will we
handle this? Packages like puppet and
many others have also Whitespaces
in the Makefiles.

Greetings
Till

_______________________________________________
oi-dev mailing list
oi-***@openindiana.org
https://openindiana.org/mailman/listinfo/oi-dev
Joerg Schilling
2018-09-28 10:37:06 UTC
Permalink
Post by Reginald Beardsley via oi-dev
Whitespace in Makefiles has been a mess from the start. The story is that Feldman realized that making distinctions between types of white space was a bad idea. But he had a dozen users and didn't want to break their Makefiles. And the Bourne shell is not much better on that score. What you can't see can have devastating consequences,
Looks like you missunderstood the concept.

Some people have been unhappy with the concept that action lines need to start
with an intial TAB.

White space in variables is well defined:

- initial whitespace is skipped

- trailing whitespace is removed by SunPro Make but kept by gmake and
smake, so be careful with # comment at the end of a variable
assignement line.

- white space in the middle is required by POSIX to be kept intact
but gmake e.g. shrinks multiple white space to a single white space

The reported problem does not seem to be related to these white space problems.

Jörg
--
EMail:***@schily.net (home) Jörg Schilling D-13353 Berlin
***@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.org/private/ http://sf.net/projects/schilytools/files/'
Loading...