[Coco] Nitros9 make errors

Steven Hirsch snhirsch at gmail.com
Mon Jul 15 09:09:29 EDT 2013


On Mon, 15 Jul 2013, Gene Heskett wrote:

> Here I think we have a linux or bash bug.
>
> 1. I have an empry dsks subdir in my last build.
>
> The rules.mak appears to properly set $DSKDIR to $(NITROS9DIR/dsks, which
> would be a local variable for the life of the make since its not exported
> to the bash session that ran the make.
>
> 2. In trying to duplicate the DSKDIR setting from the cli, I cannot,
> getting the same error whether or not I use the scripts () around
> NITROS9DIR in the export statement.
>
> But by enough experimenting here, I find the export is space sensitive,
> as in it errors out if there are spaces around the = sign.
>
> So while this doesn't work:
> gene at coyote:/opt/nitros9$ export DSKDIR $(NITROS9DIR)/dsks
> NITROS9DIR: command not found
> bash: export: `/dsks': not a valid identifier
> gene at coyote:/opt/nitros9$ ls dsks
> gene at coyote:/opt/nitros9$ cd ..
> gene at coyote:/opt$ export DSKDIR $NITROS9DIR/dsks
> bash: export: `/opt/nitros9/dsks': not a valid identifier
> gene at coyote:/opt$ echo $DSKDIR
>
> gene at coyote:/opt$
>
> This does work:
> gene at coyote:/opt$ echo $NITROS9DIR
> /opt/nitros9
> gene at coyote:/opt$ export DSKDIR=$NITROS9DIR/dsks
> gene at coyote:/opt$ echo $DSKDIR
> /opt/nitros9/dsks
> gene at coyote:/opt$
>
> Switching to a different terminal to get a fresh environment:
> gene at coyote:~$ export DISKDIR = $(NITROS9DIR)/dsks
> NITROS9DIR: command not found
> bash: export: `=': not a valid identifier
> bash: export: `/dsks': not a valid identifier
>
> and
> gene at coyote:~$ export DISKDIR = $NITROS9DIR/dsks
> bash: export: `=': not a valid identifier
> bash: export: `/opt/nitros9/dsks': not a valid identifier
>
> The difference is the spaces around the = sign.

Shell scripting syntax requires that there be no whitespace.  So

gene at coyote:/opt$ export DSKDIR=$NITROS9DIR/dsks

is the only form that should be expected to work.


-- 




More information about the Coco mailing list