in reply to Parameters to make-invoked script

Hi,

The 'normal' way to pass run-time arguments to a make(1) script is via make(1) macros declared on the CLI e.g. if using Test::More, a verbose listing can be generated using either of the 2 following equivalent methods...

Assuming Windoze...

set TEST_VERBOSE=t dmake test

Assuming sh (or variant thereof:-)...

export TEST_VERBOSE=t dmake test

dmake test TEST_VERBOSE=t

Note that environment variables are referenced in the same way as macros within the make(1) script, hence CLI macros override any environment variable(s) of the same name.

HTH

At last, a user level that overstates my experience :-))

Replies are listed 'Best First'.
Re^2: Parameters to make-invoked script
by Sixtease (Friar) on Jul 23, 2008 at 11:14 UTC

    Wow, then this means that... I can assume environment variables in the script and then with no change to the makefile use the format

    make VAR=value

    and it will work!

    ... goes and tests it ...

    ... and it works! :-)

    Then my problem is solved and I need not do anything, only document it. :-)) Great, thanks.

    use strict; use warnings; print "Just Another Perl Hacker\n";