[Pkg-virtualbox-devel] () constructs in rules and exports

Loïc Minier lool at dooz.org
Wed Jul 2 15:17:14 UTC 2008


        Hey,

 While looking at the various debian/rules in pkg-virtualbox, I've seen
 subshell constructs like:
(LANG=C; lynx -force_html -dump $< | ./debian/lynx-dump-postprocess > $@.tmp)

 but AFAIK, make already spawns a subshell for each line of commands of
 a target, so it seems the () are not used.

 I'm tempted to drop them, but I prefer checking here if I'm missing an
 use case for the subshell.

 I'd also find it more cautious to export such vars like LANG as my test
 indicate that only some env vars are actually passed down:
foo:
        @export FOO=bar; bash -c 'echo FOO=$$FOO'
        @FOO=bar; bash -c 'echo FOO=$$FOO'
        @export LANG=bar; bash -c 'echo LANG=$$LANG'
        @LANG=bar; bash -c 'echo LANG=$$LANG'

 debian/rules foo

 FOO=bar
 FOO=
 LANG=bar
 LANG=bar

 So LANG is special but we'd best no rely on this.

   Bye,
-- 
Loïc Minier



More information about the Pkg-virtualbox-devel mailing list