in reply to Parameters to make-invoked script

I am only familiar with GNU make, but there you can set/override variables when calling make. Not sure if this work with other make flavours?
For example (tested with GNU make 3.81):
pb:/tmp> cat Makefile testing: @echo "extern : myvar='$(myvar)'" @echo "default: CPP='$(CPP)'" pb:/tmp> make extern : myvar='' default: CPP='cc -E' pb:/tmp> make myvar=Tim\ Towdy extern : myvar='Tim Towdy' default: CPP='cc -E' pb:/tmp> make myvar=gcc CPP='$(myvar)' extern : myvar='gcc' default: CPP='gcc'

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

    Hell yeah, I was looking for exactly this. I'll add this mechanism and keep the environment variables for compatibility with dumber make's. Thanks pal.

    Update: Oh wait, can I add this functionality from Makefile.PL?

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