> cat Makefile
SEED := ${shell perl -e 'print int rand 10_000'}
.EXPORT_ALL_VARIABLES:
.PHONY: all
all:
@perl proc0
@perl proc1
####
> cat proc0
use warnings;
use strict;
if (exists $ENV{SEED}) {
srand $ENV{SEED};
}
else {
die "Error: need a seed.\n";
}
print "$0 ", rand, "\n";
####
> cat proc1
use warnings;
use strict;
if (exists $ENV{SEED}) {
srand $ENV{SEED};
}
else {
die "Error: need a seed.\n";
}
print "$0 ", rand, "\n";
####
> make
proc0 0.0394185183840854
proc1 0.0394185183840854
> make
proc0 0.821407354044826
proc1 0.821407354044826
> make
proc0 0.697487873098911
proc1 0.697487873098911