-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Obtain parrot configuration from 'parrot' executable instead of
'parrot_config'. Option --parrot-config is now --with-parrot.
- Loading branch information
Showing
4 changed files
with
88 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/env parrot | ||
|
||
=head1 NAME | ||
|
||
parrot-config.pir - display Parrot configuration for NQP | ||
|
||
=head1 SYNOPSIS | ||
|
||
./parrot parrot-config.pir ccflags | ||
|
||
=head1 DESCRIPTION | ||
|
||
Display the contents of Parrot's IGLOBALS_CONFIG_HASH, prefacing each | ||
key with "parrot::". | ||
Print out configuration items. | ||
=cut | ||
.include 'iglobals.pasm' | ||
.sub "main" :main | ||
.local pmc interp, config_hash, config_iter | ||
interp = getinterp | ||
config_hash = interp[.IGLOBALS_CONFIG_HASH] | ||
config_iter = iter config_hash | ||
config_loop: | ||
unless config_iter goto config_done | ||
$P0 = shift config_iter | ||
print "parrot::" | ||
$S0 = $P0.'key'() | ||
print $S0 | ||
print "=" | ||
$S0 = $P0.'value'() | ||
print $S0 | ||
print "\n" | ||
goto config_loop | ||
config_done: | ||
.return () | ||
.end | ||
# Local Variables: | ||
# mode: pir | ||
# fill-column: 100 | ||
# End: | ||
# vim: expandtab shiftwidth=4 ft=pir: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters