parrotcode: Configuration Step Utilities | |
Contents | Perl Modules |
Parrot::Configure::Step - Configuration Step Utilities
The Parrot::Configure::Step
module contains utility functions for steps to use.
Note that the actual configuration step itself is NOT an instance of this class,
rather it is defined to be in the package
Configure::Step
.
See docs/configuration.pod for more information on how to create new configuration steps.
integrate($orig, $new)
$new
into $orig
.
Returns $orig
if $new
is undefined.prompt($message, $value)
ENTER
.file_checksum($filename, $ignore_pattern)
$ignore_pattern
are not included in the checksum.copy_if_diff($from, $to, $ignore_pattern)
$from
to the location specified by $to
if its contents have changed.$ignore_pattern
is passed to file_checksum()
when comparing the files.move_if_diff($from, $to, $ignore_pattern)
$from
to the location specified by $to
if its contents have changed.genfile($source, $target, %options)
@FOO@
with FOO
's value from the configuration system's data,
and writes the results to specified target file.comment_type
to '#',
replace_slashes
to enabled,
and conditioned_lines
to enabled.Makefile
,
this option defaults to true.#CONDITIONED_LINE(var):
are skipped if the var condition is false.
Lines that begin with #INVERSE_CONDITIONED_LINE(var):
are skipped if the var condition is true.
For instance: #CONDITIONED_LINE(win32): $(SRC_DIR)/atomic/gcc_x86$(O)
#
or /*
. If present and set to one of these two values, the generated file will contain a generated header that is commented out appropriately.#perl
forces the remaining lines of the file to be evaluated as perl code. Before this evaluation occurs, any substitution of @@ values is performed on the original text./
s in the file to automatically be replaced with an architecture appropriate slash. /
or \
. This is a very helpful option when writing Makefiles. $(wildcard PATTERN)
_run_command($command, $out, $err)
$out
, warnings and errors are directed to the file specified by $err
._build_compile_command( $cc, $ccflags, $cc_args )
cc_gen($source)
cc_build($cc_args, $link_args)
$cc, $ccflags, $ldout, $o, $link, $linkflags, $cc_exe_out, $exe, $libs
cc_run()
cc_run_capture()
cc_run()
except that warnings and errors are also directed to test.out.cc_clean()
capture_output($command)
check_progs([$programs])
$programs
may be either a scalar with the name of a single program or an array ref of programs to search the current PATH
for. The first matching program name is returned or undef
on failure. Note: this function only returns the name of the program and not its complete path.autoconf
's AC_CHECK_PROGS
macro._slurp($filename)
$filename
into memory and returns it as a string.
|