[Coco] Nitros9 make errors
Lothan
lothan at newsguy.com
Mon Jul 15 17:58:58 EDT 2013
From: Gene Heskett
Sent: Monday, July 15, 2013 8:56 AM
To: coco at maltedmedia.com
Subject: Re: [Coco] Nitros9 make errors
> 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$
If you're at the bash prompt, $NITROS9DIR references the NITROS9DIR
environment variable whereas $(NITROS9DIR) references the output from the
NITROS9DIR command (if any). I think this explains the results you are
seeing above:
gene at coyote:/opt/nitros9$ export DSKDIR $(NITROS9DIR)/dsks
NITROS9DIR: command not found
gene at coyote:/opt$ echo $NITROS9DIR
/opt/nitros9
More information about the Coco
mailing list