[svn:parrot] r48706 - in trunk: . compilers/data_json compilers/imcc compilers/pct compilers/pge compilers/tge config/auto/sizes config/auto/zlib config/gen/makefiles docs/book/draft docs/book/pct docs/dev docs/pdds docs/project examples/embed examples/languages/abc examples/languages/squaak examples/pge examples/tools ext/nqp-rx include/parrot lib/Parrot lib/Parrot/Configure/Step lib/Parrot/Docs/Section ports/cygwin ports/debian runtime/parrot/languages runtime/parrot/library runtime/parrot/library/Math src/call src/gc src/interp src/runcore t/codingstd t/compilers/tge t/examples t/oo t/pmc t/src t/steps/init/hints t/tools tools/build tools/dev tools/release tools/util
jkeenan at svn.parrot.org
jkeenan at svn.parrot.org
Sat Aug 28 02:39:26 UTC 2010
Author: jkeenan
Date: Sat Aug 28 02:39:25 2010
New Revision: 48706
URL: https://trac.parrot.org/parrot/changeset/48706
Log:
Merge tt677_toolsdirs branch into trunk. Restrict tools/build/ to programs called by 'make all'. Eliminate tools/util/. Create tools/release/. Move other programs to tools/dev/. See: http://trac.parrot.org/parrot/ticket/677.
Added:
trunk/tools/build/README (props changed)
- copied unchanged from r48705, branches/tt677_toolsdirs/tools/build/README
trunk/tools/dev/README (props changed)
- copied unchanged from r48705, branches/tt677_toolsdirs/tools/dev/README
trunk/tools/dev/addopstags.pl (props changed)
- copied unchanged from r48705, branches/tt677_toolsdirs/tools/dev/addopstags.pl
trunk/tools/dev/dump_pbc.pl (props changed)
- copied unchanged from r48705, branches/tt677_toolsdirs/tools/dev/dump_pbc.pl
trunk/tools/dev/headerizer.pl (props changed)
- copied unchanged from r48705, branches/tt677_toolsdirs/tools/dev/headerizer.pl
trunk/tools/dev/ncidef2pasm.pl (props changed)
- copied unchanged from r48705, branches/tt677_toolsdirs/tools/dev/ncidef2pasm.pl
trunk/tools/dev/parrot-config.pir (props changed)
- copied unchanged from r48705, branches/tt677_toolsdirs/tools/dev/parrot-config.pir
trunk/tools/dev/perlcritic-cage.conf (props changed)
- copied unchanged from r48705, branches/tt677_toolsdirs/tools/dev/perlcritic-cage.conf
trunk/tools/dev/perlcritic.conf (props changed)
- copied unchanged from r48705, branches/tt677_toolsdirs/tools/dev/perlcritic.conf
trunk/tools/dev/perltidy.conf (props changed)
- copied unchanged from r48705, branches/tt677_toolsdirs/tools/dev/perltidy.conf
trunk/tools/dev/update_copyright.pl (props changed)
- copied unchanged from r48705, branches/tt677_toolsdirs/tools/dev/update_copyright.pl
trunk/tools/release/
- copied from r48705, branches/tt677_toolsdirs/tools/release/
Replaced:
trunk/tools/release/README
- copied unchanged from r48705, branches/tt677_toolsdirs/tools/release/README
trunk/tools/release/crow.pir (props changed)
- copied unchanged from r48705, branches/tt677_toolsdirs/tools/release/crow.pir
trunk/tools/release/gen_release_info.pl (props changed)
- copied unchanged from r48705, branches/tt677_toolsdirs/tools/release/gen_release_info.pl
trunk/tools/release/inc_ver.pir (props changed)
- copied unchanged from r48705, branches/tt677_toolsdirs/tools/release/inc_ver.pir
trunk/tools/release/release.json (props changed)
- copied unchanged from r48705, branches/tt677_toolsdirs/tools/release/release.json
trunk/tools/release/templates.json (props changed)
- copied unchanged from r48705, branches/tt677_toolsdirs/tools/release/templates.json
Deleted:
trunk/tools/build/addopstags.pl
trunk/tools/build/headerizer.pl
trunk/tools/util/crow.pir
trunk/tools/util/dump_pbc.pl
trunk/tools/util/gen_release_info.pl
trunk/tools/util/inc_ver.pir
trunk/tools/util/ncidef2pasm.pl
trunk/tools/util/parrot-config.pir
trunk/tools/util/perlcritic-cage.conf
trunk/tools/util/perlcritic.conf
trunk/tools/util/perltidy.conf
trunk/tools/util/release.json
trunk/tools/util/templates.json
trunk/tools/util/update_copyright.pl
Modified:
trunk/ (props changed)
trunk/MANIFEST
trunk/compilers/data_json/Rules.mak (props changed)
trunk/compilers/imcc/Rules.in (props changed)
trunk/compilers/pct/Rules.mak (props changed)
trunk/compilers/pge/Rules.mak (props changed)
trunk/compilers/tge/Rules.mak (props changed)
trunk/config/auto/sizes/intval_maxmin_c.in (props changed)
trunk/config/auto/zlib/ (props changed)
trunk/config/gen/makefiles/root.in
trunk/docs/book/draft/README (props changed)
trunk/docs/book/draft/appa_glossary.pod (props changed)
trunk/docs/book/draft/appb_patch_submission.pod (props changed)
trunk/docs/book/draft/appc_command_line_options.pod (props changed)
trunk/docs/book/draft/appd_build_options.pod (props changed)
trunk/docs/book/draft/appe_source_code.pod (props changed)
trunk/docs/book/draft/ch01_introduction.pod (props changed)
trunk/docs/book/draft/ch02_getting_started.pod (props changed)
trunk/docs/book/draft/ch07_dynpmcs.pod (props changed)
trunk/docs/book/draft/ch08_dynops.pod (props changed)
trunk/docs/book/draft/ch10_opcode_reference.pod (props changed)
trunk/docs/book/draft/ch11_directive_reference.pod (props changed)
trunk/docs/book/draft/ch12_operator_reference.pod (props changed)
trunk/docs/book/draft/chXX_hlls.pod (props changed)
trunk/docs/book/draft/chXX_library.pod (props changed)
trunk/docs/book/draft/chXX_testing_and_debugging.pod (props changed)
trunk/docs/book/pct/ch01_introduction.pod (props changed)
trunk/docs/book/pct/ch02_getting_started.pod (props changed)
trunk/docs/book/pct/ch03_compiler_tools.pod (props changed)
trunk/docs/book/pct/ch04_pge.pod (props changed)
trunk/docs/book/pct/ch05_nqp.pod (props changed)
trunk/docs/dev/c_functions.pod (props changed)
trunk/docs/pdds/pdd30_install.pod (props changed)
trunk/docs/project/release_manager_guide.pod
trunk/examples/embed/cotorra.c (props changed)
trunk/examples/languages/abc/ (props changed)
trunk/examples/languages/squaak/ (props changed)
trunk/examples/pge/demo.pir (props changed)
trunk/examples/tools/pgegrep (props changed)
trunk/ext/nqp-rx/Rules.mak (props changed)
trunk/include/parrot/call.h (props changed)
trunk/include/parrot/gc_api.h (props changed)
trunk/include/parrot/runcore_api.h (props changed)
trunk/include/parrot/runcore_profiling.h (props changed)
trunk/include/parrot/runcore_trace.h (props changed)
trunk/lib/Parrot/Configure/Step/Test.pm (props changed)
trunk/lib/Parrot/Docs/Section/Tools.pm
trunk/lib/Parrot/H2inc.pm (props changed)
trunk/ports/cygwin/parrot-1.0.0-1.cygport (props changed)
trunk/ports/debian/libparrot-dev.install.in (props changed)
trunk/ports/debian/libparrot.install.in (props changed)
trunk/ports/debian/parrot-doc.install.in (props changed)
trunk/ports/debian/parrot.install.in (props changed)
trunk/ports/debian/rules
trunk/runtime/parrot/languages/ (props changed)
trunk/runtime/parrot/library/Math/Rand.pir (props changed)
trunk/runtime/parrot/library/Rules.mak (props changed)
trunk/src/call/ops.c (props changed)
trunk/src/call/pcc.c (props changed)
trunk/src/gc/alloc_memory.c (props changed)
trunk/src/gc/alloc_resources.c (props changed)
trunk/src/gc/api.c (props changed)
trunk/src/gc/malloc.c (props changed)
trunk/src/gc/malloc_trace.c (props changed)
trunk/src/gc/mark_sweep.c (props changed)
trunk/src/gc/system.c (props changed)
trunk/src/interp/inter_cb.c (props changed)
trunk/src/interp/inter_create.c (props changed)
trunk/src/interp/inter_misc.c (props changed)
trunk/src/runcore/cores.c (props changed)
trunk/src/runcore/main.c (props changed)
trunk/src/runcore/profiling.c (props changed)
trunk/src/runcore/trace.c (props changed)
trunk/t/codingstd/perlcritic.t
trunk/t/codingstd/pmc_docs.t (props changed)
trunk/t/compilers/tge/NoneGrammar.tg (props changed)
trunk/t/examples/pgegrep.t (props changed)
trunk/t/oo/objects.t (props changed)
trunk/t/oo/root_new.t (props changed)
trunk/t/pmc/namespace-old.t (props changed)
trunk/t/src/embed.t (props changed)
trunk/t/steps/init/hints/linux-01.t (props changed)
trunk/t/tools/dump_pbc.t
trunk/tools/build/h2inc.pl (props changed)
trunk/tools/dev/fetch_languages.pl (props changed)
trunk/tools/dev/mk_gitignore.pl (props changed)
Modified: trunk/MANIFEST
==============================================================================
--- trunk/MANIFEST Sat Aug 28 02:15:03 2010 (r48705)
+++ trunk/MANIFEST Sat Aug 28 02:39:25 2010 (r48706)
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Sat Aug 28 00:12:06 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Sat Aug 28 02:23:15 2010 UT
#
# See below for documentation on the format of this file.
#
@@ -2091,11 +2091,10 @@
t/tools/pmc2cutils/08-pmc-pm.t [test]
t/tools/pmc2cutils/README []doc
t/tools/testdata [test]
-tools/build/addopstags.pl []
+tools/build/README []doc
tools/build/c2str.pl []
tools/build/fixup_gen_file.pl []
tools/build/h2inc.pl []
-tools/build/headerizer.pl []
tools/build/ops2c.pl [devel]
tools/build/parrot_config_c.pl []
tools/build/pbcversion_h.pl []
@@ -2103,18 +2102,22 @@
tools/build/vtable_extend.pl []
tools/build/vtable_h.pl []
tools/dev/.gdbinit []
+tools/dev/README []doc
+tools/dev/addopstags.pl []
tools/dev/as2c.pl []
tools/dev/bench_op.pir []
tools/dev/branch_status.pl []
tools/dev/checkdepend.pl []
tools/dev/create_language.pl [devel]
tools/dev/debian_docs.sh []
+tools/dev/dump_pbc.pl []
tools/dev/faces.pl []
tools/dev/fetch_languages.pl []
tools/dev/gen_charset_tables.pl []
tools/dev/gen_class.pl []
tools/dev/gen_makefile.pl [devel]
tools/dev/gen_valgrind_suppressions.pl []
+tools/dev/headerizer.pl []
tools/dev/install_dev_files.pl []
tools/dev/install_doc_files.pl []
tools/dev/install_files.pl []
@@ -2132,9 +2135,11 @@
tools/dev/mk_rpm_manifests.pl []
tools/dev/nci_test_gen.pl []
tools/dev/nci_thunk_gen.pir []
+tools/dev/ncidef2pasm.pl []
tools/dev/nm.pl []
tools/dev/nopaste.pl []
tools/dev/ops_not_tested.pl []
+tools/dev/parrot-config.pir []
tools/dev/parrot-fuzzer []
tools/dev/parrot.supp []
tools/dev/parrot_api.pl []
@@ -2143,6 +2148,9 @@
tools/dev/parrotbench.pl []
tools/dev/pbc_header.pl []
tools/dev/pbc_to_exe.pir [devel]
+tools/dev/perlcritic-cage.conf []
+tools/dev/perlcritic.conf []
+tools/dev/perltidy.conf []
tools/dev/pmcrenumber.pl []
tools/dev/pmctree.pl []
tools/dev/pprof2cg.pl [devel]
@@ -2150,6 +2158,7 @@
tools/dev/search-ops.pl []
tools/dev/svnclobber.pl []
tools/dev/symlink.pl []
+tools/dev/update_copyright.pl []
tools/dev/vgp []
tools/dev/vgp_darwin []
tools/dev/vms-patch []
@@ -2160,18 +2169,12 @@
tools/docs/write_docs.pl []
tools/install/smoke.pl []
tools/install/smoke_languages.pl []
-tools/util/crow.pir []
-tools/util/dump_pbc.pl []
-tools/util/gen_release_info.pl []
-tools/util/inc_ver.pir []
-tools/util/ncidef2pasm.pl []
-tools/util/parrot-config.pir []
-tools/util/perlcritic-cage.conf []
-tools/util/perlcritic.conf []
-tools/util/perltidy.conf []
-tools/util/release.json []
-tools/util/templates.json []
-tools/util/update_copyright.pl []
+tools/release/README []doc
+tools/release/crow.pir []
+tools/release/gen_release_info.pl []
+tools/release/inc_ver.pir []
+tools/release/release.json []
+tools/release/templates.json []
# Local variables:
# mode: text
# buffer-read-only: t
Modified: trunk/config/gen/makefiles/root.in
==============================================================================
--- trunk/config/gen/makefiles/root.in Sat Aug 28 02:15:03 2010 (r48705)
+++ trunk/config/gen/makefiles/root.in Sat Aug 28 02:39:25 2010 (r48706)
@@ -47,8 +47,13 @@
# where we're building parrot from (needed for pbc_to_exe)
BUILD_DIR = @build_dir@
-# directory for build tools
+# directory for build tools:
+# programs, templates, configuration files invoked by 'make all'
+# (with or without command-line options)
BUILD_TOOLS_DIR = tools/build
+# directory for developers' tools
+# programs, templates, configuration files NOT invoked by 'make all'
+DEV_TOOLS_DIR = tools/dev
# directory for header files
INC_DIR = @inc@
@@ -116,7 +121,7 @@
NONGEN_HEADERS = @TEMP_nongen_headers@
# The headerizer
-HEADERIZER = $(PERL) $(BUILD_TOOLS_DIR)/headerizer.pl
+HEADERIZER = $(PERL) $(DEV_TOOLS_DIR)/headerizer.pl
include src/dynpmc/Defines.mak
include src/dynoplibs/Defines.mak
@@ -842,12 +847,12 @@
@rpath_blib@ $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)
#IF(win32): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
-$(PBC_TO_EXE) : tools/dev/pbc_to_exe.pir runtime/parrot/library/config.pir $(PARROT) $(DYNEXT_DIR)/os$(LOAD_EXT) $(DYNEXT_DIR)/file$(LOAD_EXT) $(LIBRARY_DIR)/Getopt/Obj.pbc
- $(PARROT) -o pbc_to_exe.pbc tools/dev/pbc_to_exe.pir
+$(PBC_TO_EXE) : $(DEV_TOOLS_DIR)/pbc_to_exe.pir runtime/parrot/library/config.pir $(PARROT) $(DYNEXT_DIR)/os$(LOAD_EXT) $(DYNEXT_DIR)/file$(LOAD_EXT)
+ $(PARROT) -o pbc_to_exe.pbc $(DEV_TOOLS_DIR)/pbc_to_exe.pir
$(PARROT) pbc_to_exe.pbc pbc_to_exe.pbc
-parrot_nci_thunk_gen.pbc : tools/dev/nci_thunk_gen.pir $(DATA_JSON_LIB_PBCS) $(PARROT)
- $(PARROT) -o parrot_nci_thunk_gen.pbc tools/dev/nci_thunk_gen.pir
+parrot_nci_thunk_gen.pbc : $(DEV_TOOLS_DIR)/nci_thunk_gen.pir $(DATA_JSON_LIB_PBCS) $(PARROT)
+ $(PARROT) -o parrot_nci_thunk_gen.pbc $(DEV_TOOLS_DIR)/nci_thunk_gen.pir
$(NCI_THUNK_GEN) : parrot_nci_thunk_gen.pbc $(PBC_TO_EXE)
$(PBC_TO_EXE) parrot_nci_thunk_gen.pbc
@@ -858,8 +863,8 @@
$(PROVE) : parrot-prove.pbc $(PARROT) $(PBC_TO_EXE)
$(PBC_TO_EXE) parrot-prove.pbc
-$(PARROT_CONFIG) : tools/util/parrot-config.pir $(PARROT) $(PBC_TO_EXE)
- $(PARROT) -o parrot_config.pbc tools/util/parrot-config.pir
+$(PARROT_CONFIG) : $(DEV_TOOLS_DIR)/parrot-config.pir $(PARROT) $(PBC_TO_EXE)
+ $(PARROT) -o parrot_config.pbc $(DEV_TOOLS_DIR)/parrot-config.pir
$(PARROT) pbc_to_exe.pbc parrot_config.pbc
$(MINIPARROT) : src/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
@@ -936,10 +941,10 @@
$(IMCC_O_FILES)
lib_deps_object : $(O_FILES)
- $(PERL) tools/dev/lib_deps.pl object $(O_FILES)
+ $(PERL) $(DEV_TOOLS_DIR)/lib_deps.pl object $(O_FILES)
lib_deps_source : $(GENERAL_H_FILES)
- $(PERL) tools/dev/lib_deps.pl source all_source
+ $(PERL) $(DEV_TOOLS_DIR)/lib_deps.pl source all_source
lib_deps : lib_deps_object lib_deps_source
@@ -969,7 +974,7 @@
$(INSTALLABLECONFIG) : src/install_config$(O) $(PARROT_CONFIG) $(PBC_TO_EXE)
- $(PARROT) -o parrot_config.pbc tools/util/parrot-config.pir
+ $(PARROT) -o parrot_config.pbc $(DEV_TOOLS_DIR)/parrot-config.pir
$(PBC_TO_EXE) parrot_config.pbc --install
$(INSTALLABLEPBCTOEXE) : $(PBC_TO_EXE) src/install_config$(O)
@@ -1997,19 +2002,19 @@
# Require .svn to exist first
# Otherwise it'll remove every last file
svnclobber : .svn
- $(PERL) tools/dev/svnclobber.pl
+ $(PERL) $(DEV_TOOLS_DIR)/svnclobber.pl
reconfig : realclean
$(PERL) Configure.pl $(CONFIG_ARGS)
manitest :
- $(PERL) tools/dev/manicheck.pl
+ $(PERL) $(DEV_TOOLS_DIR)/manicheck.pl
opsrenumber :
- $(PERL) tools/dev/opsrenumber.pl $(OPS_FILES)
+ $(PERL) $(DEV_TOOLS_DIR)/opsrenumber.pl $(OPS_FILES)
pmcrenumber :
- $(PERL) tools/dev/pmcrenumber.pl src/pmc/pmc.num
+ $(PERL) $(DEV_TOOLS_DIR)/pmcrenumber.pl src/pmc/pmc.num
###############################################################################
#
@@ -2361,7 +2366,7 @@
install-dev: install
install-bin: installable
- $(PERL) tools/dev/install_files.pl \
+ $(PERL) $(DEV_TOOLS_DIR)/install_files.pl \
--buildprefix=$(BUILDPREFIX) \
--prefix=$(PREFIX) \
--exec-prefix=$(EXEC_PREFIX) \
@@ -2375,7 +2380,7 @@
MANIFEST MANIFEST.generated
install-dev-only: installable
- $(PERL) tools/dev/install_dev_files.pl \
+ $(PERL) $(DEV_TOOLS_DIR)/install_dev_files.pl \
--buildprefix=$(BUILDPREFIX) \
--prefix=$(PREFIX) \
--exec-prefix=$(EXEC_PREFIX) \
@@ -2390,7 +2395,7 @@
MANIFEST MANIFEST.generated
install-doc:
- $(PERL) tools/dev/install_doc_files.pl \
+ $(PERL) $(DEV_TOOLS_DIR)/install_doc_files.pl \
--buildprefix=$(BUILDPREFIX) \
--prefix=$(PREFIX) \
--docdir=$(DOC_DIR) \
@@ -2419,7 +2424,7 @@
rm parrot-$(VERSION)
win32-inno-installer : world installable
- $(PERL) tools/dev/mk_inno.pl
+ $(PERL) $(DEV_TOOLS_DIR)/mk_inno.pl
$(INNO_SETUP) parrot.iss
###############################################################################
@@ -2513,7 +2518,7 @@
--languages=c,perl --langmap=c:+.h,c:+.pmc,c:+.ops \
-I NOTNULL,NULLOK,ARGIN,ARGMOD,ARGOUT,ARGINOUT,ARGIN_NULLOK,ARGOUT_NULLOK,ARGMOD_NULLOK,ARGFREE,ARGFREE_NOTNULL \
.
- $(PERL) $(BUILD_TOOLS_DIR)/addopstags.pl $(OPS_FILES)
+ $(PERL) $(DEV_TOOLS_DIR)/addopstags.pl $(OPS_FILES)
tags.vi.dummy:
@@ -2525,12 +2530,12 @@
CRITIC_FILES = 'lib/Parrot'
perlcritic:
- perlcritic --profile tools/util/perlcritic.conf $(CRITIC_FILES)
+ perlcritic --profile $(DEV_TOOLS_DIR)/perlcritic.conf $(CRITIC_FILES)
# Andy's extra-cranky Perl::Critic checking for cage cleaners
cagecritic:
@perl -MPerl::Critic::Bangs -e'$$min=q{1.04};die qq{You need Bangs $$min} unless $$Perl::Critic::Bangs::VERSION ge $$min'
- perlcritic -1 --profile tools/util/perlcritic-cage.conf $(CRITIC_FILES)
+ perlcritic -1 --profile $(DEV_TOOLS_DIR)/perlcritic-cage.conf $(CRITIC_FILES)
# This target will eventually create all the headers automatically. If you
# are having problems with linkage in Win32 (or elsewhere), because something
Modified: trunk/docs/project/release_manager_guide.pod
==============================================================================
--- trunk/docs/project/release_manager_guide.pod Sat Aug 28 02:15:03 2010 (r48705)
+++ trunk/docs/project/release_manager_guide.pod Sat Aug 28 02:39:25 2010 (r48706)
@@ -84,7 +84,7 @@
=item c
-Update release-related information in F<tools/util/release.json>. This will be
+Update release-related information in F<tools/release/release.json>. This will be
used later when making release announcements. There are a few essential
fields that must be updated at each release:
@@ -244,11 +244,11 @@
=item 9.
-Compose the release announcement. Use F<tools/util/crow.pir> to make
+Compose the release announcement. Use F<tools/release/crow.pir> to make
this part easier. You can specify the format of your announcements like so:
- $ ./parrot tools/util/crow.pir --type=text
- $ ./parrot tools/util/crow.pir --type=html
+ $ ./parrot tools/release/crow.pir --type=text
+ $ ./parrot tools/release/crow.pir --type=html
Take the screen output and paste it into the application you need. HTML
works well for use Perl and PerlMonks, and text for the rest. It is not a
Modified: trunk/lib/Parrot/Docs/Section/Tools.pm
==============================================================================
--- trunk/lib/Parrot/Docs/Section/Tools.pm Sat Aug 28 02:15:03 2010 (r48705)
+++ trunk/lib/Parrot/Docs/Section/Tools.pm Sat Aug 28 02:39:25 2010 (r48706)
@@ -85,7 +85,7 @@
$self->new_item( '', 'tools/dev/list_unjitted.pl' ),
$self->new_item( '', 'tools/dev/gen_class.pl' ),
$self->new_item( '', 'tools/dev/nm.pl' ),
- $self->new_item( '', 'tools/util/ncidef2pasm.pl' ),
+ $self->new_item( '', 'tools/dev/ncidef2pasm.pl' ),
$self->new_item( '', 'tools/dev/pbc_header.pl' ),
),
$self->new_group(
Modified: trunk/ports/debian/rules
==============================================================================
--- trunk/ports/debian/rules Sat Aug 28 02:15:03 2010 (r48705)
+++ trunk/ports/debian/rules Sat Aug 28 02:39:25 2010 (r48706)
@@ -42,7 +42,7 @@
dh_testdir
$(MAKE) installable LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}`pwd`/blib/lib
pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" docs/running.pod debian/parrot.1
- pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" tools/util/parrot-config.pir debian/parrot_config.1
+ pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" tools/dev/parrot-config.pir debian/parrot_config.1
pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" src/pbc_dump.c debian/pbc_dump.1
pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" src/pbc_disassemble.c debian/pbc_disassemble.1
pod2man --section=1 --release="Debian Project" --center="Debian GNU/Linux manual" src/parrot_debugger.c debian/parrot_debugger.1
Modified: trunk/t/codingstd/perlcritic.t
==============================================================================
--- trunk/t/codingstd/perlcritic.t Sat Aug 28 02:15:03 2010 (r48705)
+++ trunk/t/codingstd/perlcritic.t Sat Aug 28 02:39:25 2010 (r48706)
@@ -22,7 +22,7 @@
violations.
This test uses a standard perlcriticrc file, located in
-F<tools/utils/perlcritic.conf>
+F<tools/dev/perlcritic.conf>
If you wish to run a specific policy, the easiest way to do so is to
temporarily add a custom theme to the configuration file and then specify
@@ -62,7 +62,7 @@
'theme=s' => \$theme
);
-my $config = File::Spec->catfile( $PConfig{build_dir}, qw{tools util perlcritic.conf} );
+my $config = File::Spec->catfile( $PConfig{build_dir}, qw{tools dev perlcritic.conf} );
Test::Perl::Critic->import(
-profile => $config,
Modified: trunk/t/tools/dump_pbc.t
==============================================================================
--- trunk/t/tools/dump_pbc.t Sat Aug 28 02:15:03 2010 (r48705)
+++ trunk/t/tools/dump_pbc.t Sat Aug 28 02:39:25 2010 (r48706)
@@ -4,7 +4,7 @@
=head1 NAME
-t/tools/dumb_pbc.t - test the script tools/utils/dump_pbc.pl
+t/tools/dumb_pbc.t - test the script tools/dev/dump_pbc.pl
=head1 SYNOPSIS
@@ -34,7 +34,7 @@
my $PARROT = ".$PConfig{slash}$PConfig{test_prog}";
system( "$PARROT --output $pbc_fn $pir_fn" );
- my $cmd = File::Spec->catfile( qw{. tools util dump_pbc.pl} );
+ my $cmd = File::Spec->catfile( qw{. tools dev dump_pbc.pl} );
my $out = `$PConfig{perl} $cmd $pbc_fn`;
like( $out, $snippet, $desc );
Copied: trunk/tools/build/README (from r48705, branches/tt677_toolsdirs/tools/build/README)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/tools/build/README Sat Aug 28 02:39:25 2010 (r48706, copy of r48705, branches/tt677_toolsdirs/tools/build/README)
@@ -0,0 +1,13 @@
+# $Id$
+README for tools/build/
+
+This directory is intended to hold programs, templates and configuration files
+invoked by the default 'make' target ('make all'), with or without
+command-line options, during the Parrot build process.
+
+Programs, templates and configuration files invoked by 'make install' or
+'make install-dev' should be placed in tools/release/.
+
+Other things being equal, programs, templates and configuration files invoked
+by all other 'make' targets (e.g., 'make headerizer') should be placed in
+tools/dev/.
Deleted: trunk/tools/build/addopstags.pl
==============================================================================
--- trunk/tools/build/addopstags.pl Sat Aug 28 02:39:25 2010 (r48705)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,54 +0,0 @@
-#!perl
-
-# Copyright (C) 2004-2006, Parrot Foundation.
-# $Id$
-
-use strict;
-use warnings;
-
-=head1 NAME
-
-tools/build/addopstags.pl - add src/ops/*.ops to tags
-
-=head1 SYNOPSIS
-
- perl tools/build/addopstags.pl src/ops/*.ops
-
-=head1 DESCRIPTION
-
-Add src/ops/*.ops to tags file.
-
-=cut
-
-my %seen;
-my @tags;
-
-# Pull ops tags
-while (<>) {
- if (/\bop \s+ (\w+) \s* \(/x) {
- next if $seen{$1}++;
-
- # tag file excmd xflags
- push @tags, join( "\t", $1, $ARGV, qq{$.;"}, "f" ) . "\n";
- }
-}
-continue {
- close ARGV if eof; # reset $.
-}
-
-# Pull existing tags
-open my $T, '<', 'tags';
-push @tags, <$T>;
-close $T;
-
-# Spit 'em out sorted
-open $T, '>', 'tags';
-print $T sort @tags;
-close $T;
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Deleted: trunk/tools/build/headerizer.pl
==============================================================================
--- trunk/tools/build/headerizer.pl Sat Aug 28 02:39:25 2010 (r48705)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,464 +0,0 @@
-#! perl
-# Copyright (C) 2001-2010, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-tools/build/headerizer.pl - Generates the function header parts of .h
-files from .c files
-
-=head1 SYNOPSIS
-
- $ perl tools/build/headerizer.pl [object files]
-
-Generates C function declarations based on the function definitions in
-the C source code.
-
-=head1 DESCRIPTION
-
-The headerizer works off of directives in the source and header files.
-
-One source file's public declarations can only go into one header file.
-However, one header file can have declarations from multiple source files.
-In other words, headers-to-source is one-to-many.
-
-=over 4
-
-=item C<HEADERIZER BEGIN:> F<source-filename> / C<HEADERIZER END:> F<source-filename>
-
-Marks the beginning and end of a block of declarations in a header file.
-
- # In file foo.h
- /* HEADERIZER BEGIN: src/foo.c */
- /* HEADERIZER END: src/foo.c */
-
- /* HEADERIZER BEGIN: src/bar.c */
- /* HEADERIZER END: src/bar.c */
-
-=item C<HEADERIZER HFILE:> F<header-filename>
-
-Tells the headerizer where the declarations for the functions should go
-
- # In file foo.c
- /* HEADERIZER HFILE: foo.h */
-
- # In file bar.c
- /* HEADERIZER HFILE: foo.h */
-
-=back
-
-=head1 COMMAND-LINE OPTIONS
-
-=over 4
-
-=item C<--macro=X>
-
-Print a list of all functions that have macro X. For example, --macro=PARROT_EXPORT.
-
-=back
-
-=cut
-
-use strict;
-use warnings;
-
-use Getopt::Long;
-use lib qw( lib );
-use Parrot::Config;
-use Parrot::Headerizer;
-
-my $headerizer = Parrot::Headerizer->new;
-
-main();
-
-=head1 FUNCTIONS
-
-=head2 extract_function_declaration_and_update_source( $cfile_name )
-
-Extract all the function declarations from the C file specified by
-I<$cfile_name>, and update the comment blocks within.
-
-=cut
-
-sub extract_function_declarations_and_update_source {
- my $cfile_name = shift;
-
- open( my $fhin, '<', $cfile_name ) or die "Can't open $cfile_name: $!";
- my $text = join( '', <$fhin> );
- close $fhin;
-
- my @func_declarations = $headerizer->extract_function_declarations( $text );
- for my $decl ( @func_declarations ) {
- my $specs = $headerizer->function_components_from_declaration( $cfile_name, $decl );
- my $name = $specs->{name};
-
- my $heading = $headerizer->generate_documentation_signature($decl);
-
- $text =~ s/=item C<[^>]*\b$name\b[^>]*>\n+/$heading\n\n/sm or do {
- warn "$cfile_name: $name has no POD\n" unless $name =~ /^yy/; # lexer funcs don't have to have POD
- }
- }
- open( my $fhout, '>', $cfile_name ) or die "Can't create $cfile_name: $!";
- print {$fhout} $text;
- close $fhout;
-
- return @func_declarations;
-}
-
-
-sub attrs_from_args {
- my $func = shift;
- my @args = @_;
-
- my @attrs = ();
- my @mods = ();
-
- my $name = $func->{name};
- my $file = $func->{file};
- my $n = 0;
- for my $arg (@args) {
- ++$n;
- if ( $arg =~ m{ARG(?:MOD|OUT)(?:_NULLOK)?\((.+?)\)} ) {
- my $modified = $1;
- if ( $modified =~ s/.*\*/*/ ) {
- # We're OK
- }
- else {
- $modified =~ s/.* (\w+)$/$1/ or die qq{Unable to figure out the modified parm out of "$modified"};
- }
- push( @mods, "FUNC_MODIFIES($modified)" );
- }
- if ( $arg =~ m{(ARGIN|ARGOUT|ARGMOD|ARGFREE_NOTNULL|NOTNULL)\(} || $arg eq 'PARROT_INTERP' ) {
- push( @attrs, "__attribute__nonnull__($n)" );
- }
- if ( ( $arg =~ m{\*} ) && ( $arg !~ /\b(SHIM|((ARGIN|ARGOUT|ARGMOD)(_NULLOK)?)|ARGFREE(_NOTNULL)?)\b/ ) ) {
- if ( $name !~ /^yy/ ) { # Don't complain about the lexer auto-generated funcs
- $headerizer->squawk( $file, $name, qq{"$arg" isn't protected with an ARGIN, ARGOUT or ARGMOD (or a _NULLOK variant), or ARGFREE} );
- }
- }
- if ( ($arg =~ /\bconst\b/) && ($arg =~ /\*/) && ($arg !~ /\*\*/) && ($arg =~ /\b(ARG(MOD|OUT))\b/) ) {
- $headerizer->squawk( $file, $name, qq{"$arg" is const, but that $1 conflicts with const} );
- }
- }
-
- return (@attrs, at mods);
-}
-
-sub asserts_from_args {
- my @args = @_;
- my @asserts;
-
- for my $arg (@args) {
- if ( $arg =~ m{(ARGIN|ARGOUT|ARGMOD|ARGFREE_NOTNULL|NOTNULL)\((.+)\)} ) {
- my $var = $2;
- if($var =~ /\(*\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\)\s*\(/) {
- # argument is a function pointer
- $var = $1;
- }
- else {
- # try to isolate the variable's name;
- # strip off everything before the final space or asterisk.
- $var =~ s{.+[* ]([^* ]+)$}{$1};
- # strip off a trailing "[]", if any.
- $var =~ s{\[\]$}{};
- }
- push( @asserts, "PARROT_ASSERT_ARG($var)" );
- }
- if( $arg eq 'PARROT_INTERP' ) {
- push( @asserts, "PARROT_ASSERT_ARG(interp)" );
- }
- }
-
- return (@asserts);
-}
-
-sub make_function_decls {
- my @funcs = @_;
-
- my @decls;
- foreach my $func (@funcs) {
- my $multiline = 0;
-
- my $return = $func->{return_type};
- my $alt_void = ' ';
-
- # Splint can't handle /*@alt void@*/ on pointers, although this page
- # http://www.mail-archive.com/lclint-interest@virginia.edu/msg00139.html
- # seems to say that we can.
- if ( $func->{is_ignorable} && ($return !~ /\*/) ) {
- $alt_void = " /*\@alt void@*/\n";
- }
-
- my $decl = sprintf( "%s%s%s(", $return, $alt_void, $func->{name} );
- $decl = "static $decl" if $func->{is_static};
-
- my @args = @{ $func->{args} };
- my @attrs = attrs_from_args( $func, @args );
-
- for my $arg (@args) {
- if ( $arg =~ m{SHIM\((.+)\)} ) {
- $arg = $1;
- if ( $func->{is_static} || ( $arg =~ /\*/ ) ) {
- $arg = "SHIM($arg)";
- }
- else {
- $arg = "NULLOK($arg)";
- }
- }
- }
-
- my $argline = join( ", ", @args );
- if ( length( $decl . $argline ) <= 75 ) {
- $decl = "$decl$argline)";
- }
- else {
- if ( $args[0] =~ /^((SHIM|PARROT)_INTERP|Interp)\b/ ) {
- $decl .= ( shift @args );
- $decl .= "," if @args;
- }
- $argline = join( ",", map { "\n\t$_" } @args );
- $decl = "$decl$argline)";
- $multiline = 1;
- }
-
- my $attrs = join( "", map { "\n\t\t$_" } @attrs );
- if ($attrs) {
- $decl .= $attrs;
- $multiline = 1;
- }
- my @macros = @{ $func->{macros} };
- $multiline = 1 if @macros;
-
- $decl .= $multiline ? ";\n" : ";";
- $decl = join( "\n", @macros, $decl );
- $decl =~ s/\t/ /g;
- push( @decls, $decl );
- }
-
- foreach my $func (@funcs) {
- my @args = @{ $func->{args} };
- my @asserts = asserts_from_args( @args );
-
- my $assert = "#define ASSERT_ARGS_" . $func->{name};
- if(length($func->{name}) > 29) {
- $assert .= " \\\n ";
- }
- $assert .= " __attribute__unused__ int _ASSERT_ARGS_CHECK = (";
- if(@asserts) {
- $assert .= "\\\n ";
- $assert .= join(" \\\n , ", @asserts);
- }
- else {
- $assert .= "0";
- }
- $assert .= ")";
- push(@decls, $assert);
- }
-
- return @decls;
-}
-
-sub read_file {
- my $filename = shift;
-
- open my $fh, '<', $filename or die "couldn't read '$filename': $!";
- my $text = do { local $/ = undef; <$fh> };
- close $fh;
-
- return $text;
-}
-
-sub write_file {
- my $filename = shift;
- my $text = shift;
-
- open my $fh, '>', $filename or die "couldn't write '$filename': $!";
- print {$fh} $text;
- close $fh;
-}
-
-sub replace_headerized_declarations {
- my $source_code = shift;
- my $sourcefile = shift;
- my $hfile = shift;
- my @funcs = @_;
-
- # Allow a way to not headerize statics
- if ( $source_code =~ m{/\*\s*HEADERIZER NONE:\s*$sourcefile\s*\*/} ) {
- return $source_code;
- }
-
- @funcs = sort api_first_then_alpha @funcs;
-
- my @function_decls = make_function_decls(@funcs);
-
- my $function_decls = join( "\n", @function_decls );
- my $STARTMARKER = qr{/\* HEADERIZER BEGIN: $sourcefile \*/\n};
- my $ENDMARKER = qr{/\* HEADERIZER END: $sourcefile \*/\n?};
- my $DO_NOT_TOUCH = q{/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */};
-
- $source_code =~
- s{($STARTMARKER)(?:.*?)($ENDMARKER)}
- {$1$DO_NOT_TOUCH\n\n$function_decls\n$DO_NOT_TOUCH\n$2}s
- or die "Need begin/end HEADERIZER markers for $sourcefile in $hfile\n";
-
- return $source_code;
-}
-
-sub api_first_then_alpha {
- return ( ( $b->{is_api} || 0 ) <=> ( $a->{is_api} || 0 ) )
- || ( lc $a->{name} cmp lc $b->{name} );
-}
-
-sub main {
- my $macro_match;
- GetOptions(
- 'macro=s' => \$macro_match,
- ) or exit(1);
-
- die 'No files specified.' unless @ARGV;
- my %ofiles;
- ++$ofiles{$_} for @ARGV;
- my @ofiles = sort keys %ofiles;
- for (@ofiles) {
- print "$_ is specified more than once.\n" if $ofiles{$_} > 1;
- }
- my %sourcefiles;
- my %sourcefiles_with_statics;
- my %api;
-
- # Walk the object files and find corresponding source (either .c or .pmc)
- for my $ofile (@ofiles) {
- next if $ofile =~ m/^\Qsrc$PConfig{slash}ops\E/;
-
- $ofile =~ s/\\/\//g;
-
- my $is_yacc = ($ofile =~ /\.y$/);
- if ( !$is_yacc ) {
- my $sfile = $ofile;
- $sfile =~ s/\Q$PConfig{o}\E$/.s/;
- next if -f $sfile;
- }
-
- my $cfile = $ofile;
- $cfile =~ s/\Q$PConfig{o}\E$/.c/ or $is_yacc
- or die "$cfile doesn't look like an object file";
-
- my $pmcfile = $ofile;
- $pmcfile =~ s/\Q$PConfig{o}\E$/.pmc/;
-
- my $from_pmc = -f $pmcfile && !$is_yacc;
-
- my $sourcefile = $from_pmc ? $pmcfile : $cfile;
-
- my $source_code = read_file( $sourcefile );
- die qq{can't find HEADERIZER HFILE directive in "$sourcefile"}
- unless $source_code =~
- m{ /\* \s+ HEADERIZER\ HFILE: \s+ ([^*]+?) \s+ \*/ }sx;
-
- my $hfile = $1;
- if ( ( $hfile ne 'none' ) && ( not -f $hfile ) ) {
- die qq{"$hfile" not found (referenced from "$sourcefile")};
- }
-
- my @decls;
- if ( $macro_match ) {
- @decls = $headerizer->extract_function_declarations( $source_code );
- }
- else {
- @decls = extract_function_declarations_and_update_source( $sourcefile );
- }
-
- for my $decl (@decls) {
- my $components = $headerizer->function_components_from_declaration( $sourcefile, $decl );
- push( @{ $sourcefiles{$hfile}->{$sourcefile} }, $components ) unless $hfile eq 'none';
- push( @{ $sourcefiles_with_statics{$sourcefile} }, $components ) if $components->{is_static};
- if ( $macro_match ) {
- if ( grep { $_ eq $macro_match } @{$components->{macros}} ) {
- push( @{ $api{$sourcefile} }, $components );
- }
- }
- }
- } # for @cfiles
-
- if ( $macro_match ) {
- my $nfuncs = 0;
- for my $cfile ( sort keys %api ) {
- my @funcs = sort { $a->{name} cmp $b->{name} } @{$api{$cfile}};
- print "$cfile\n";
- for my $func ( @funcs ) {
- print " $func->{name}\n";
- ++$nfuncs;
- }
- }
- my $s = $nfuncs == 1 ? '' : 's';
- print "$nfuncs $macro_match function$s\n";
- }
- else { # Normal headerization and updating
- # Update all the .h files
- for my $hfile ( sort keys %sourcefiles ) {
- my $sourcefiles = $sourcefiles{$hfile};
-
- my $header = read_file($hfile);
-
- for my $cfile ( sort keys %{$sourcefiles} ) {
- my @funcs = @{ $sourcefiles->{$cfile} };
- @funcs = grep { not $_->{is_static} } @funcs; # skip statics
-
- $header = replace_headerized_declarations( $header, $cfile, $hfile, @funcs );
- }
-
- write_file( $hfile, $header );
- }
-
- # Update all the .c files in place
- for my $cfile ( sort keys %sourcefiles_with_statics ) {
- my @funcs = @{ $sourcefiles_with_statics{$cfile} };
- @funcs = grep { $_->{is_static} } @funcs;
-
- my $source = read_file($cfile);
- $source = replace_headerized_declarations( $source, 'static', $cfile, @funcs );
-
- write_file( $cfile, $source );
- }
- print "Headerization complete.\n";
- }
-
- my %warnings = %{$headerizer->{warnings}};
- if ( keys %warnings ) {
- my $nwarnings = 0;
- my $nwarningfuncs = 0;
- my $nwarningfiles = 0;
- for my $file ( sort keys %warnings ) {
- ++$nwarningfiles;
- print "$file\n";
- my $funcs = $warnings{$file};
- for my $func ( sort keys %{$funcs} ) {
- ++$nwarningfuncs;
- for my $error ( @{ $funcs->{$func} } ) {
- print " $func: $error\n";
- ++$nwarnings;
- }
- }
- }
-
- print "$nwarnings warnings in $nwarningfuncs funcs in $nwarningfiles C files\n";
- }
-
- return;
-}
-
-# From earlier documentation:
-# * Generate docs from funcs
-# * Somehow handle static functions in the source file
-# * the .c files MUST have a /* HEADERIZER HFILE: foo/bar.h */ directive in them
-# * Support for multiple .c files pointing at the same .h file
-# * Does NOT remove all blocks in the .h file, so if a .c file
-# disappears, its block is "orphaned" and will remain there.
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Copied: trunk/tools/dev/README (from r48705, branches/tt677_toolsdirs/tools/dev/README)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/tools/dev/README Sat Aug 28 02:39:25 2010 (r48706, copy of r48705, branches/tt677_toolsdirs/tools/dev/README)
@@ -0,0 +1,7 @@
+# $Id$
+README for tools/dev/
+
+This directory is intended to hold programs, templates and configuration files
+found useful by Parrot developed other than those (a) invoked by the default
+'make' target ('make all'), with or without command-line options, during the
+Parrot build process; or (b) invoked by 'make install' or 'make install-dev'.
Copied: trunk/tools/dev/addopstags.pl (from r48705, branches/tt677_toolsdirs/tools/dev/addopstags.pl)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/tools/dev/addopstags.pl Sat Aug 28 02:39:25 2010 (r48706, copy of r48705, branches/tt677_toolsdirs/tools/dev/addopstags.pl)
@@ -0,0 +1,54 @@
+#!perl
+
+# Copyright (C) 2004-2006, Parrot Foundation.
+# $Id$
+
+use strict;
+use warnings;
+
+=head1 NAME
+
+tools/dev/addopstags.pl - add src/ops/*.ops to tags
+
+=head1 SYNOPSIS
+
+ perl tools/dev/addopstags.pl src/ops/*.ops
+
+=head1 DESCRIPTION
+
+Add src/ops/*.ops to tags file.
+
+=cut
+
+my %seen;
+my @tags;
+
+# Pull ops tags
+while (<>) {
+ if (/\bop \s+ (\w+) \s* \(/x) {
+ next if $seen{$1}++;
+
+ # tag file excmd xflags
+ push @tags, join( "\t", $1, $ARGV, qq{$.;"}, "f" ) . "\n";
+ }
+}
+continue {
+ close ARGV if eof; # reset $.
+}
+
+# Pull existing tags
+open my $T, '<', 'tags';
+push @tags, <$T>;
+close $T;
+
+# Spit 'em out sorted
+open $T, '>', 'tags';
+print $T sort @tags;
+close $T;
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Copied: trunk/tools/dev/dump_pbc.pl (from r48705, branches/tt677_toolsdirs/tools/dev/dump_pbc.pl)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/tools/dev/dump_pbc.pl Sat Aug 28 02:39:25 2010 (r48706, copy of r48705, branches/tt677_toolsdirs/tools/dev/dump_pbc.pl)
@@ -0,0 +1,125 @@
+#! perl
+
+# Copyright (C) 2008, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+tools/dev/dump_pbc.pl - Weave together PBC disassembly with PIR source
+
+=head1 SYNOPSIS
+
+ perl tools/dev/dump_pbc.pl foo.pbc
+
+=head1 DESCRIPTION
+
+dump_pbc.pl uses Parrot's F<pbc_disassemble> program to disassemble the opcodes
+in a PBC (Parrot ByteCode) file, then weaves the disassembly together with
+the original PIR source file(s). This makes it easier to see how the PIR
+syntactic sugar is desugared into raw Parrot opcodes.
+
+=head1 BUGS
+
+This program has only been tested for a few simple cases. Also, the name
+might suggest a different use than its actual purpose.
+
+While it is not a bug in F<dump_pbc.pl> per se, there is a line numbering
+bug for some PBC opcode sequences that will result in the disassembled
+opcodes appearing just before the source lines they represent, rather
+than just after. There does not appear to be consensus yet about where
+this bug actually resides.
+
+=cut
+
+use strict;
+use warnings;
+use Cwd;
+use FindBin;
+
+my ($PARROT_ROOT, $RUNTIME_DIR);
+BEGIN {
+ $PARROT_ROOT = Cwd::abs_path("$FindBin::Bin/../..");
+ $RUNTIME_DIR = "$PARROT_ROOT/runtime/parrot";
+}
+
+use lib "$PARROT_ROOT/lib";
+use Parrot::Config '%PConfig';
+
+my $DISASSEMBLER = "$PConfig{build_dir}$PConfig{slash}pbc_disassemble$PConfig{exe}";
+
+go(@ARGV);
+
+sub go {
+ my $pbc = shift;
+
+ # The following mess brought to you by Win32, where pipe open doesn't work,
+ # and thus its greater security and cleaner error handling are unavailable.
+
+ -f $pbc && -r _
+ or die "PBC file '$pbc' does not exist or is not readable.\n";
+
+ -f $DISASSEMBLER && -x _
+ or die "Can't find disassembler '$DISASSEMBLER';"
+ . "did you remember to make parrot first?\n";
+
+ my @dis = `$DISASSEMBLER $pbc`;
+ die "No disassembly; errors: $?, $!" unless @dis;
+
+ my $cur_file = '';
+ my $cur_line = -1;
+ my %cache;
+
+ foreach (@dis) {
+ if (/^(?:# )?Current Source Filename (.*)/) {
+ my $found = $1;
+ $found =~ s/^'//;
+ $found =~ s/'$//;
+ if ($cur_file ne $found) {
+ $cur_file = $found;
+ $cache{$cur_file} ||= slurp_file($cur_file);
+ $cur_line = -1;
+
+ print "\n#### $cur_file\n";
+ }
+ }
+ elsif (my ($info, $seq, $pc, $line, $code) = /^((\d+)-(\d+) (\d+): )(.*)/) {
+ my $int_line = int $line;
+ my $len_line = length $line;
+ if ($cur_line != $int_line) {
+ $cur_line = 0 if $cur_line == -1;
+ print "\n";
+ foreach my $i ($cur_line + 1 .. $int_line) {
+ my $source_code = $cache{$cur_file}[$i-1];
+ # next unless $source_code =~ /\S/;
+ printf "# %*d: %s", $len_line, $i, $source_code;
+ print "\n" if $source_code =~ /^\.end/;
+ }
+ $cur_line = $int_line;
+ }
+
+ print ' ' x ($len_line + 4), "$code\n";
+ }
+ }
+}
+
+sub slurp_file {
+ my $file = shift;
+ my $source;
+
+ open $source, '<', $file
+ or open $source, '<', "$PARROT_ROOT/$file"
+ or open $source, '<', "$RUNTIME_DIR/$file"
+ or die "Could not open source file '$file': $!";
+
+ my @lines = <$source>;
+
+ return \@lines;
+}
+
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Copied: trunk/tools/dev/headerizer.pl (from r48705, branches/tt677_toolsdirs/tools/dev/headerizer.pl)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/tools/dev/headerizer.pl Sat Aug 28 02:39:25 2010 (r48706, copy of r48705, branches/tt677_toolsdirs/tools/dev/headerizer.pl)
@@ -0,0 +1,464 @@
+#! perl
+# Copyright (C) 2001-2010, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+tools/dev/headerizer.pl - Generates the function header parts of .h
+files from .c files
+
+=head1 SYNOPSIS
+
+ $ perl tools/dev/headerizer.pl [object files]
+
+Generates C function declarations based on the function definitions in
+the C source code.
+
+=head1 DESCRIPTION
+
+The headerizer works off of directives in the source and header files.
+
+One source file's public declarations can only go into one header file.
+However, one header file can have declarations from multiple source files.
+In other words, headers-to-source is one-to-many.
+
+=over 4
+
+=item C<HEADERIZER BEGIN:> F<source-filename> / C<HEADERIZER END:> F<source-filename>
+
+Marks the beginning and end of a block of declarations in a header file.
+
+ # In file foo.h
+ /* HEADERIZER BEGIN: src/foo.c */
+ /* HEADERIZER END: src/foo.c */
+
+ /* HEADERIZER BEGIN: src/bar.c */
+ /* HEADERIZER END: src/bar.c */
+
+=item C<HEADERIZER HFILE:> F<header-filename>
+
+Tells the headerizer where the declarations for the functions should go
+
+ # In file foo.c
+ /* HEADERIZER HFILE: foo.h */
+
+ # In file bar.c
+ /* HEADERIZER HFILE: foo.h */
+
+=back
+
+=head1 COMMAND-LINE OPTIONS
+
+=over 4
+
+=item C<--macro=X>
+
+Print a list of all functions that have macro X. For example, --macro=PARROT_EXPORT.
+
+=back
+
+=cut
+
+use strict;
+use warnings;
+
+use Getopt::Long;
+use lib qw( lib );
+use Parrot::Config;
+use Parrot::Headerizer;
+
+my $headerizer = Parrot::Headerizer->new;
+
+main();
+
+=head1 FUNCTIONS
+
+=head2 extract_function_declaration_and_update_source( $cfile_name )
+
+Extract all the function declarations from the C file specified by
+I<$cfile_name>, and update the comment blocks within.
+
+=cut
+
+sub extract_function_declarations_and_update_source {
+ my $cfile_name = shift;
+
+ open( my $fhin, '<', $cfile_name ) or die "Can't open $cfile_name: $!";
+ my $text = join( '', <$fhin> );
+ close $fhin;
+
+ my @func_declarations = $headerizer->extract_function_declarations( $text );
+ for my $decl ( @func_declarations ) {
+ my $specs = $headerizer->function_components_from_declaration( $cfile_name, $decl );
+ my $name = $specs->{name};
+
+ my $heading = $headerizer->generate_documentation_signature($decl);
+
+ $text =~ s/=item C<[^>]*\b$name\b[^>]*>\n+/$heading\n\n/sm or do {
+ warn "$cfile_name: $name has no POD\n" unless $name =~ /^yy/; # lexer funcs don't have to have POD
+ }
+ }
+ open( my $fhout, '>', $cfile_name ) or die "Can't create $cfile_name: $!";
+ print {$fhout} $text;
+ close $fhout;
+
+ return @func_declarations;
+}
+
+
+sub attrs_from_args {
+ my $func = shift;
+ my @args = @_;
+
+ my @attrs = ();
+ my @mods = ();
+
+ my $name = $func->{name};
+ my $file = $func->{file};
+ my $n = 0;
+ for my $arg (@args) {
+ ++$n;
+ if ( $arg =~ m{ARG(?:MOD|OUT)(?:_NULLOK)?\((.+?)\)} ) {
+ my $modified = $1;
+ if ( $modified =~ s/.*\*/*/ ) {
+ # We're OK
+ }
+ else {
+ $modified =~ s/.* (\w+)$/$1/ or die qq{Unable to figure out the modified parm out of "$modified"};
+ }
+ push( @mods, "FUNC_MODIFIES($modified)" );
+ }
+ if ( $arg =~ m{(ARGIN|ARGOUT|ARGMOD|ARGFREE_NOTNULL|NOTNULL)\(} || $arg eq 'PARROT_INTERP' ) {
+ push( @attrs, "__attribute__nonnull__($n)" );
+ }
+ if ( ( $arg =~ m{\*} ) && ( $arg !~ /\b(SHIM|((ARGIN|ARGOUT|ARGMOD)(_NULLOK)?)|ARGFREE(_NOTNULL)?)\b/ ) ) {
+ if ( $name !~ /^yy/ ) { # Don't complain about the lexer auto-generated funcs
+ $headerizer->squawk( $file, $name, qq{"$arg" isn't protected with an ARGIN, ARGOUT or ARGMOD (or a _NULLOK variant), or ARGFREE} );
+ }
+ }
+ if ( ($arg =~ /\bconst\b/) && ($arg =~ /\*/) && ($arg !~ /\*\*/) && ($arg =~ /\b(ARG(MOD|OUT))\b/) ) {
+ $headerizer->squawk( $file, $name, qq{"$arg" is const, but that $1 conflicts with const} );
+ }
+ }
+
+ return (@attrs, at mods);
+}
+
+sub asserts_from_args {
+ my @args = @_;
+ my @asserts;
+
+ for my $arg (@args) {
+ if ( $arg =~ m{(ARGIN|ARGOUT|ARGMOD|ARGFREE_NOTNULL|NOTNULL)\((.+)\)} ) {
+ my $var = $2;
+ if($var =~ /\(*\s*([a-zA-Z_][a-zA-Z0-9_]*)\s*\)\s*\(/) {
+ # argument is a function pointer
+ $var = $1;
+ }
+ else {
+ # try to isolate the variable's name;
+ # strip off everything before the final space or asterisk.
+ $var =~ s{.+[* ]([^* ]+)$}{$1};
+ # strip off a trailing "[]", if any.
+ $var =~ s{\[\]$}{};
+ }
+ push( @asserts, "PARROT_ASSERT_ARG($var)" );
+ }
+ if( $arg eq 'PARROT_INTERP' ) {
+ push( @asserts, "PARROT_ASSERT_ARG(interp)" );
+ }
+ }
+
+ return (@asserts);
+}
+
+sub make_function_decls {
+ my @funcs = @_;
+
+ my @decls;
+ foreach my $func (@funcs) {
+ my $multiline = 0;
+
+ my $return = $func->{return_type};
+ my $alt_void = ' ';
+
+ # Splint can't handle /*@alt void@*/ on pointers, although this page
+ # http://www.mail-archive.com/lclint-interest@virginia.edu/msg00139.html
+ # seems to say that we can.
+ if ( $func->{is_ignorable} && ($return !~ /\*/) ) {
+ $alt_void = " /*\@alt void@*/\n";
+ }
+
+ my $decl = sprintf( "%s%s%s(", $return, $alt_void, $func->{name} );
+ $decl = "static $decl" if $func->{is_static};
+
+ my @args = @{ $func->{args} };
+ my @attrs = attrs_from_args( $func, @args );
+
+ for my $arg (@args) {
+ if ( $arg =~ m{SHIM\((.+)\)} ) {
+ $arg = $1;
+ if ( $func->{is_static} || ( $arg =~ /\*/ ) ) {
+ $arg = "SHIM($arg)";
+ }
+ else {
+ $arg = "NULLOK($arg)";
+ }
+ }
+ }
+
+ my $argline = join( ", ", @args );
+ if ( length( $decl . $argline ) <= 75 ) {
+ $decl = "$decl$argline)";
+ }
+ else {
+ if ( $args[0] =~ /^((SHIM|PARROT)_INTERP|Interp)\b/ ) {
+ $decl .= ( shift @args );
+ $decl .= "," if @args;
+ }
+ $argline = join( ",", map { "\n\t$_" } @args );
+ $decl = "$decl$argline)";
+ $multiline = 1;
+ }
+
+ my $attrs = join( "", map { "\n\t\t$_" } @attrs );
+ if ($attrs) {
+ $decl .= $attrs;
+ $multiline = 1;
+ }
+ my @macros = @{ $func->{macros} };
+ $multiline = 1 if @macros;
+
+ $decl .= $multiline ? ";\n" : ";";
+ $decl = join( "\n", @macros, $decl );
+ $decl =~ s/\t/ /g;
+ push( @decls, $decl );
+ }
+
+ foreach my $func (@funcs) {
+ my @args = @{ $func->{args} };
+ my @asserts = asserts_from_args( @args );
+
+ my $assert = "#define ASSERT_ARGS_" . $func->{name};
+ if(length($func->{name}) > 29) {
+ $assert .= " \\\n ";
+ }
+ $assert .= " __attribute__unused__ int _ASSERT_ARGS_CHECK = (";
+ if(@asserts) {
+ $assert .= "\\\n ";
+ $assert .= join(" \\\n , ", @asserts);
+ }
+ else {
+ $assert .= "0";
+ }
+ $assert .= ")";
+ push(@decls, $assert);
+ }
+
+ return @decls;
+}
+
+sub read_file {
+ my $filename = shift;
+
+ open my $fh, '<', $filename or die "couldn't read '$filename': $!";
+ my $text = do { local $/ = undef; <$fh> };
+ close $fh;
+
+ return $text;
+}
+
+sub write_file {
+ my $filename = shift;
+ my $text = shift;
+
+ open my $fh, '>', $filename or die "couldn't write '$filename': $!";
+ print {$fh} $text;
+ close $fh;
+}
+
+sub replace_headerized_declarations {
+ my $source_code = shift;
+ my $sourcefile = shift;
+ my $hfile = shift;
+ my @funcs = @_;
+
+ # Allow a way to not headerize statics
+ if ( $source_code =~ m{/\*\s*HEADERIZER NONE:\s*$sourcefile\s*\*/} ) {
+ return $source_code;
+ }
+
+ @funcs = sort api_first_then_alpha @funcs;
+
+ my @function_decls = make_function_decls(@funcs);
+
+ my $function_decls = join( "\n", @function_decls );
+ my $STARTMARKER = qr{/\* HEADERIZER BEGIN: $sourcefile \*/\n};
+ my $ENDMARKER = qr{/\* HEADERIZER END: $sourcefile \*/\n?};
+ my $DO_NOT_TOUCH = q{/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */};
+
+ $source_code =~
+ s{($STARTMARKER)(?:.*?)($ENDMARKER)}
+ {$1$DO_NOT_TOUCH\n\n$function_decls\n$DO_NOT_TOUCH\n$2}s
+ or die "Need begin/end HEADERIZER markers for $sourcefile in $hfile\n";
+
+ return $source_code;
+}
+
+sub api_first_then_alpha {
+ return ( ( $b->{is_api} || 0 ) <=> ( $a->{is_api} || 0 ) )
+ || ( lc $a->{name} cmp lc $b->{name} );
+}
+
+sub main {
+ my $macro_match;
+ GetOptions(
+ 'macro=s' => \$macro_match,
+ ) or exit(1);
+
+ die 'No files specified.' unless @ARGV;
+ my %ofiles;
+ ++$ofiles{$_} for @ARGV;
+ my @ofiles = sort keys %ofiles;
+ for (@ofiles) {
+ print "$_ is specified more than once.\n" if $ofiles{$_} > 1;
+ }
+ my %sourcefiles;
+ my %sourcefiles_with_statics;
+ my %api;
+
+ # Walk the object files and find corresponding source (either .c or .pmc)
+ for my $ofile (@ofiles) {
+ next if $ofile =~ m/^\Qsrc$PConfig{slash}ops\E/;
+
+ $ofile =~ s/\\/\//g;
+
+ my $is_yacc = ($ofile =~ /\.y$/);
+ if ( !$is_yacc ) {
+ my $sfile = $ofile;
+ $sfile =~ s/\Q$PConfig{o}\E$/.s/;
+ next if -f $sfile;
+ }
+
+ my $cfile = $ofile;
+ $cfile =~ s/\Q$PConfig{o}\E$/.c/ or $is_yacc
+ or die "$cfile doesn't look like an object file";
+
+ my $pmcfile = $ofile;
+ $pmcfile =~ s/\Q$PConfig{o}\E$/.pmc/;
+
+ my $from_pmc = -f $pmcfile && !$is_yacc;
+
+ my $sourcefile = $from_pmc ? $pmcfile : $cfile;
+
+ my $source_code = read_file( $sourcefile );
+ die qq{can't find HEADERIZER HFILE directive in "$sourcefile"}
+ unless $source_code =~
+ m{ /\* \s+ HEADERIZER\ HFILE: \s+ ([^*]+?) \s+ \*/ }sx;
+
+ my $hfile = $1;
+ if ( ( $hfile ne 'none' ) && ( not -f $hfile ) ) {
+ die qq{"$hfile" not found (referenced from "$sourcefile")};
+ }
+
+ my @decls;
+ if ( $macro_match ) {
+ @decls = $headerizer->extract_function_declarations( $source_code );
+ }
+ else {
+ @decls = extract_function_declarations_and_update_source( $sourcefile );
+ }
+
+ for my $decl (@decls) {
+ my $components = $headerizer->function_components_from_declaration( $sourcefile, $decl );
+ push( @{ $sourcefiles{$hfile}->{$sourcefile} }, $components ) unless $hfile eq 'none';
+ push( @{ $sourcefiles_with_statics{$sourcefile} }, $components ) if $components->{is_static};
+ if ( $macro_match ) {
+ if ( grep { $_ eq $macro_match } @{$components->{macros}} ) {
+ push( @{ $api{$sourcefile} }, $components );
+ }
+ }
+ }
+ } # for @cfiles
+
+ if ( $macro_match ) {
+ my $nfuncs = 0;
+ for my $cfile ( sort keys %api ) {
+ my @funcs = sort { $a->{name} cmp $b->{name} } @{$api{$cfile}};
+ print "$cfile\n";
+ for my $func ( @funcs ) {
+ print " $func->{name}\n";
+ ++$nfuncs;
+ }
+ }
+ my $s = $nfuncs == 1 ? '' : 's';
+ print "$nfuncs $macro_match function$s\n";
+ }
+ else { # Normal headerization and updating
+ # Update all the .h files
+ for my $hfile ( sort keys %sourcefiles ) {
+ my $sourcefiles = $sourcefiles{$hfile};
+
+ my $header = read_file($hfile);
+
+ for my $cfile ( sort keys %{$sourcefiles} ) {
+ my @funcs = @{ $sourcefiles->{$cfile} };
+ @funcs = grep { not $_->{is_static} } @funcs; # skip statics
+
+ $header = replace_headerized_declarations( $header, $cfile, $hfile, @funcs );
+ }
+
+ write_file( $hfile, $header );
+ }
+
+ # Update all the .c files in place
+ for my $cfile ( sort keys %sourcefiles_with_statics ) {
+ my @funcs = @{ $sourcefiles_with_statics{$cfile} };
+ @funcs = grep { $_->{is_static} } @funcs;
+
+ my $source = read_file($cfile);
+ $source = replace_headerized_declarations( $source, 'static', $cfile, @funcs );
+
+ write_file( $cfile, $source );
+ }
+ print "Headerization complete.\n";
+ }
+
+ my %warnings = %{$headerizer->{warnings}};
+ if ( keys %warnings ) {
+ my $nwarnings = 0;
+ my $nwarningfuncs = 0;
+ my $nwarningfiles = 0;
+ for my $file ( sort keys %warnings ) {
+ ++$nwarningfiles;
+ print "$file\n";
+ my $funcs = $warnings{$file};
+ for my $func ( sort keys %{$funcs} ) {
+ ++$nwarningfuncs;
+ for my $error ( @{ $funcs->{$func} } ) {
+ print " $func: $error\n";
+ ++$nwarnings;
+ }
+ }
+ }
+
+ print "$nwarnings warnings in $nwarningfuncs funcs in $nwarningfiles C files\n";
+ }
+
+ return;
+}
+
+# From earlier documentation:
+# * Generate docs from funcs
+# * Somehow handle static functions in the source file
+# * the .c files MUST have a /* HEADERIZER HFILE: foo/bar.h */ directive in them
+# * Support for multiple .c files pointing at the same .h file
+# * Does NOT remove all blocks in the .h file, so if a .c file
+# disappears, its block is "orphaned" and will remain there.
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Copied: trunk/tools/dev/ncidef2pasm.pl (from r48705, branches/tt677_toolsdirs/tools/dev/ncidef2pasm.pl)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/tools/dev/ncidef2pasm.pl Sat Aug 28 02:39:25 2010 (r48706, copy of r48705, branches/tt677_toolsdirs/tools/dev/ncidef2pasm.pl)
@@ -0,0 +1,237 @@
+#! perl
+
+# Copyright (C) 2003-2007, Parrot Foundation.
+# $Id$
+
+=head1 NAME
+
+tools/dev/ncidef2asm.pl - Turn an NCI library definition file into PASM
+
+=head1 SYNOPSIS
+
+ perl tools/dev/ncidef2asm.pl path/to/from_file [ path/to/to_file ]
+
+=head1 DESCRIPTION
+
+This program takes an NCI library definition file and turns it into PASM.
+
+An NCI library definition file provides the information needed to
+generate a parrot wrapper for the named library (or libraries). Its
+format is simple, and looks like:
+
+ [package]
+ ncurses
+
+ [lib]
+ libform.so
+
+ [defs]
+ p new_field i i i i i i
+
+ [lib]
+ libncurses.so
+
+ [defs]
+ i is_term_resized i i
+
+Note that the assembly file is generated in the order you specify, so
+if there are library dependencies, make sure you have them in the
+correct order.
+
+=head2 package
+
+Declares the package that all subsequent sub PMCs will be put
+into. The name is a simple concatenation of the package name, double
+colon, and the routine name, with no preceding punctuation.
+
+=head2 lib
+
+The name of the library to be loaded. Should be as qualified as
+necessary for your platform--generally the full filename is required,
+though the directory generally isn't.
+
+You may load multiple libraries here, but only the last one loaded
+will be exposed to subsequent defs.
+
+=head2 defs
+
+This section holds the definitions of functions. Each function is
+assumed to be in the immediate preceding library. The definition of
+the function is:
+
+ return_type name [param [param [param ...]]]
+
+The param and return_type parameters use the NCI standard, which for
+reference is:
+
+=over 4
+
+=item p
+
+Parameter is a void pointer, taken from the PMC's data pointer. PMC is
+assumed to be an unmanagedstruct or child class.
+
+Taken from a P register
+
+=item c
+
+Parameter is a character.
+
+Taken from an I register
+
+=item s
+
+Parameter is a short
+
+Taken from an I register
+
+=item i
+
+Parameter is an int
+
+Taken from an I register
+
+=item l
+
+Parameter is a long
+
+Taken from an I register
+
+=item f
+
+Paramter is a float
+
+Taken from an N register.
+
+=item d
+
+Parameter is a double.
+
+Taken from an N register.
+
+=item t
+
+Paramter is a char *, presumably a C string
+
+Taken from an S register
+
+=item v
+
+Void. Only valid as a return type, noting that the function returns no data.
+
+=item I
+
+Interpreter pointer. The current interpreter pointer is passed in
+
+=item P
+
+PMC.
+
+=item 2
+
+Pointer to short.
+
+Taken from an I register.
+
+=item 3
+
+Pointer to int.
+
+Taken from an I register
+
+=item 4
+
+Pointer to long
+
+Taken from an I register
+
+=back
+
+=cut
+
+use strict;
+use warnings;
+
+my ( $from_file, $to_file ) = @ARGV;
+
+# If there is no destination file, strip off the extension of the
+# source file and add a .pasm to it
+if ( !defined $to_file ) {
+ $to_file = $from_file;
+ $to_file =~ s/\..*$//;
+ $to_file .= ".pasm";
+}
+
+open my $INPUT, '<', "$from_file" or die "Can't open up $from_file, error $!";
+open my $OUTPUT, '>', "$to_file" or die "Can't open up $to_file, error $!";
+
+# To start, save all the registers, just in case
+print $OUTPUT "saveall\n";
+
+my @libs;
+my ( $cur_package, $line, $cur_section );
+
+# Our dispatch table
+my (%dispatch) = (
+ package => \&package_line,
+ lib => \&lib_line,
+ defs => \&def_line,
+);
+
+while ( $line = <$INPUT> ) {
+
+ # Throw away trailing newlines, comments, and whitespace. If the
+ # line's empty, then off to the next line
+ chomp $line;
+ $line =~ s/#.*//;
+ $line =~ s/\s*$//;
+ next unless $line;
+
+ # Is it a section line? If so, extract the section and set it.
+ if ( $line =~ /\[(\w+)\]/ ) {
+ $cur_section = $1;
+ next;
+ }
+
+ # Everything else goes to the handler
+ $dispatch{$cur_section}->($line);
+
+}
+
+# Put the registers back and end
+print $OUTPUT "restoreall\n";
+print $OUTPUT "end\n";
+close $OUTPUT;
+
+sub package_line {
+ my $line = shift;
+
+ # Trim leading and trailing spaces
+ $line =~ s/^\s*//;
+ $line =~ s/\s*$//;
+
+ # Set the global current package
+ $cur_package = $line;
+
+}
+
+sub lib_line {
+ my $line = shift;
+ print $OUTPUT "loadlib P1, '$line'\n";
+}
+
+sub def_line {
+ my $line = shift;
+ my ( $return_type, $name, @params ) = split ' ', $line;
+ unshift @params, $return_type;
+ my $signature = join( "", @params );
+ print $OUTPUT "dlfunc P2, P1, '$name', '$signature'\n";
+ print $OUTPUT "store_global '${cur_package}::${name}', P2\n";
+}
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Copied: trunk/tools/dev/parrot-config.pir (from r48705, branches/tt677_toolsdirs/tools/dev/parrot-config.pir)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/tools/dev/parrot-config.pir Sat Aug 28 02:39:25 2010 (r48706, copy of r48705, branches/tt677_toolsdirs/tools/dev/parrot-config.pir)
@@ -0,0 +1,103 @@
+#!/usr/bin/env parrot
+# $Id$
+
+=head1 NAME
+
+config.pir - Print a Parrot configuration item
+
+=head1 VERSION
+
+version 0.01
+
+=head1 SYNOPSIS
+
+ ./parrot parrot-config.pir VERSION
+ ./parrot parrot-config.pir ccflags
+ ./parrot parrot-config.pir --dump
+
+=head1 DESCRIPTION
+
+Print out configuration items.
+
+=head1 AUTHOR
+
+Leopold Toetsch E<lt>lt at toetsch.atE<gt>.
+
+=head1 COPYRIGHT
+
+Copyright (C) 2004-2009, Parrot Foundation.
+
+=cut
+
+.sub _main :main
+ .param pmc argv
+ .local int argc
+ argc = argv
+ if argc < 2 goto usage
+ .local pmc interp, conf_hash
+ .local string key
+ .include "iglobals.pasm"
+ interp = getinterp
+ conf_hash = interp[.IGLOBALS_CONFIG_HASH]
+ .local int i
+ i = 1
+loop:
+ key = argv[i]
+ if key == '--help' goto usage
+ if key == '--dump' goto dump
+ $I0 = defined conf_hash[key]
+ unless $I0 goto failkey
+ dec argc
+ if i < argc goto dumpsome
+ $S0 = conf_hash[key]
+ print $S0
+ inc i
+ if i < argc goto loop
+ print "\n"
+ end
+dumpsome:
+ key = argv[i]
+ $I0 = defined conf_hash[key]
+ unless $I0 goto failkey
+ print key
+ print " => '"
+ $S1 = conf_hash[key]
+ print $S1
+ say "'"
+ inc i
+ if i <= argc goto dumpsome
+ end
+failkey:
+ print " no such key: '"
+ print key
+ print "'\n"
+ end
+dump:
+ .local pmc iterator
+ iterator = iter conf_hash
+iter_loop:
+ unless iterator goto iter_end
+ shift $S0, iterator
+ print $S0
+ print " => '"
+ $S1 = conf_hash[$S0]
+ print $S1
+ say "'"
+ goto iter_loop
+iter_end:
+ end
+usage:
+ $S0 = argv[0]
+ $P0 = getinterp
+ .include 'stdio.pasm'
+ $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO)
+ $P1.'print'($S0)
+ $P1.'print'(" [ <config-key> [ <config-key> ... ] | --dump | --help ]\n")
+ exit 1
+.end
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
Copied: trunk/tools/dev/perlcritic-cage.conf (from r48705, branches/tt677_toolsdirs/tools/dev/perlcritic-cage.conf)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/tools/dev/perlcritic-cage.conf Sat Aug 28 02:39:25 2010 (r48706, copy of r48705, branches/tt677_toolsdirs/tools/dev/perlcritic-cage.conf)
@@ -0,0 +1,37 @@
+# A more stringent set of rules for cage cleaners
+
+[-CodeLayout::ProhibitParensWithBuiltins]
+[CodeLayout::ProhibitHardTabs]
+allow_leading_tabs = 0
+
+[-CodeLayout::RequireTidyCode]
+
+[-ControlStructures::ProhibitPostfixControls]
+[-ControlStructures::ProhibitUnlessBlocks]
+
+[-Documentation::PodSpelling]
+[-Documentation::RequirePodAtEnd]
+[-Documentation::RequirePodSections]
+
+[-ErrorHandling::RequireCarping]
+
+[-InputOutput::ProhibitBacktickOperators]
+[-InputOutput::ProhibitInteractiveTest]
+[-InputOutput::RequireCheckedSyscalls]
+functions = :builtins
+exclude_functions = print
+
+[-Miscellanea::RequireRcsKeywords]
+
+[-Modules::RequireVersionVar]
+
+[-RegularExpressions::ProhibitEscapedMetacharacters]
+[-RegularExpressions::RequireDotMatchAnything]
+[-RegularExpressions::RequireExtendedFormatting]
+[-RegularExpressions::RequireLineBoundaryMatching]
+
+[-ValuesAndExpressions::ProhibitConstantPragma]
+[-ValuesAndExpressions::ProhibitEmptyQuotes]
+[-ValuesAndExpressions::ProhibitMagicNumbers]
+
+[-Variables::ProhibitPunctuationVars]
Copied: trunk/tools/dev/perlcritic.conf (from r48705, branches/tt677_toolsdirs/tools/dev/perlcritic.conf)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/tools/dev/perlcritic.conf Sat Aug 28 02:39:25 2010 (r48706, copy of r48705, branches/tt677_toolsdirs/tools/dev/perlcritic.conf)
@@ -0,0 +1,75 @@
+verbose = 3
+
+# not all the profiles listed here are installed by default, even if you have
+# Perl::Critic. Shhhh.
+profile-strictness = quiet
+
+[BuiltinFunctions::ProhibitStringySplit]
+add_themes = parrot
+
+[CodeLayout::ProhibitDuplicateCoda]
+add_themes = parrot
+
+[CodeLayout::ProhibitHardTabs]
+allow_leading_tabs = 0
+add_themes = parrot
+
+[CodeLayout::ProhibitTrailingWhitespace]
+add_themes = parrot
+
+[CodeLayout::RequireTidyCode]
+perltidyrc = tools/dev/perltidy.conf
+add_themes = extra
+
+[CodeLayout::UseParrotCoda]
+add_themes = parrot
+
+[InputOutput::ProhibitBarewordFileHandles]
+add_themes = parrot
+
+[InputOutput::ProhibitTwoArgOpen]
+add_themes = parrot
+
+[NamingConventions::ProhibitAmbiguousNames]
+# remove abstract from the list of forbidden names
+forbid = bases close contract last left no record right second set
+add_themes = extra
+
+[Subroutines::ProhibitBuiltinHomonyms]
+add_themes = extra
+
+[Subroutines::ProhibitExplicitReturnUndef]
+add_themes = parrot
+
+[Subroutines::ProhibitSubroutinePrototypes]
+add_themes = parrot
+
+[Subroutines::RequireFinalReturn]
+add_themes = extra
+
+[TestingAndDebugging::MisplacedShebang]
+add_themes = parrot
+
+[TestingAndDebugging::ProhibitShebangWarningsArg]
+add_themes = parrot
+
+[TestingAndDebugging::RequirePortableShebang]
+add_themes = parrot
+
+[TestingAndDebugging::RequireUseStrict]
+add_themes = parrot
+
+[TestingAndDebugging::RequireUseWarnings]
+add_themes = parrot
+
+[ValuesAndExpressions::ProhibitInterpolationOfLiterals]
+add_themes = extra
+
+[Variables::ProhibitConditionalDeclarations]
+add_themes = parrot
+
+[Bangs::ProhibitFlagComments]
+add_themes = extra
+
+[Bangs::ProhibitRefProtoOrProto]
+add_themes = extra
Copied: trunk/tools/dev/perltidy.conf (from r48705, branches/tt677_toolsdirs/tools/dev/perltidy.conf)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/tools/dev/perltidy.conf Sat Aug 28 02:39:25 2010 (r48706, copy of r48705, branches/tt677_toolsdirs/tools/dev/perltidy.conf)
@@ -0,0 +1,15 @@
+# A declarative version of PDD07 for perl.
+
+# Must apply...
+
+-l=100 # Source line width is limited to 100 characters.
+-i=4 # must be indented four columns (no tabs)
+-ola # Labels (including case labels) must be outdented two columns
+-ci=4 # Long lines, when split, must use at least one extra level of indentation on the continued line.
+-ce # Cuddled elses are forbidden: i.e. avoid } else { .
+
+# Nice to haves...
+
+# Freeze new lines; some really short lines look good the way they
+# are, this should stop perltidy from merging them together
+-fnl
Copied: trunk/tools/dev/update_copyright.pl (from r48705, branches/tt677_toolsdirs/tools/dev/update_copyright.pl)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/tools/dev/update_copyright.pl Sat Aug 28 02:39:25 2010 (r48706, copy of r48705, branches/tt677_toolsdirs/tools/dev/update_copyright.pl)
@@ -0,0 +1,63 @@
+#! perl
+# $Id$
+
+# Copyright (C) 2008, Parrot Foundation.
+
+use strict;
+use warnings;
+use Fatal qw( open close );
+
+=head1 NAME
+
+F<tools/dev/update_copyright.pl>
+
+=head1 DESCRIPTION
+
+Given a list of files as command line arguments, update the copyright
+notice to go from the earliest year noted to the current year.
+
+Edits the files in place. You should update the copyright on a modified
+file before you commit it back to the repository.
+
+=cut
+
+use lib 'lib';
+use Parrot::Test;
+
+# Accept a little fuzz in the original copyright notice..
+my $copyright_re = qr/
+ Copyright \s+ \(C\) \s+
+ (\d\d\d\d)\s*(?:-\s*\d\d\d\d)? \s* ,? \s*
+ The \s+ Perl \s+ Foundation\.?
+/xi;
+
+my $year = (localtime())[5]+1900;
+
+# loop over all the files specified on the command line
+foreach my $file (@ARGV) {
+ my $contents = Parrot::Test::slurp_file( $file );
+ if ( $contents =~ $copyright_re) {
+ my $old_year = $1;
+ if ($old_year eq $year) {
+ warn "$file already up to date.\n";
+ next;
+ }
+ else {
+ $contents =~ s/$copyright_re/Copyright (C) $old_year-$year, Parrot Foundation./;
+ open my $ofh, '>', $file;
+ print {$ofh} $contents;
+ close $ofh;
+ }
+ }
+ else {
+ warn "$file doesn't have a valid copyright line.\n";
+ }
+}
+
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Copied: trunk/tools/release/README (from r48705, branches/tt677_toolsdirs/tools/release/README)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/tools/release/README Sat Aug 28 02:39:25 2010 (r48706, copy of r48705, branches/tt677_toolsdirs/tools/release/README)
@@ -0,0 +1,5 @@
+# $Id$
+README for tools/release/
+
+This directory is intended to hold programs, templates and configuration files
+useful during the release process.
Copied: trunk/tools/release/crow.pir (from r48705, branches/tt677_toolsdirs/tools/release/crow.pir)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/tools/release/crow.pir Sat Aug 28 02:39:25 2010 (r48706, copy of r48705, branches/tt677_toolsdirs/tools/release/crow.pir)
@@ -0,0 +1,107 @@
+#! ./parrot
+# Copyright (C) 2007-2008, Parrot Foundation.
+# $Id$
+
+=head1 TITLE
+
+crow.pir -- Make noise about the new Parrot release
+
+=head1 DESCRIPTION
+
+This utility is used to help Release Managers format announcement messages.
+It uses a *very* simple and fast templating system, described in the related
+module, L<runtime/parrot/library/Crow.pir>.
+
+=head1 SYNOPSIS
+
+ # see
+ % parrot tools/release/crow.pir --help
+
+=cut
+
+
+.sub 'main' :main
+ .param pmc args
+
+ load_bytecode 'Crow.pbc'
+
+ .local pmc exports, curr_namespace, test_namespace
+ curr_namespace = get_namespace
+ test_namespace = get_namespace ['Crow']
+ exports = split ' ', 'get_news get_args process'
+ test_namespace.'export_to'(curr_namespace, exports)
+
+ .local pmc opts
+ opts = get_args(args)
+
+ unless null opts goto got_opts
+ opts = new 'Hash'
+ got_opts:
+
+ .local pmc templates
+ templates = 'get_json'('tools/release/templates.json')
+
+ .local string template, type
+ type = opts['type']
+ if type != '' goto got_type
+ type = 'text'
+
+got_type:
+ template = 'get_template'(templates, type)
+
+ .local pmc data
+ data = 'get_json'('tools/release/release.json')
+
+ .local string version
+ version = data['release.version']
+
+ $S0 = concat type, '.news'
+ $I0 = templates[$S0]
+ if $I0 goto get_news
+ data['NEWS'] = ''
+ goto process
+ get_news:
+ $S0 = 'get_news'(version)
+ data['NEWS'] = $S0
+
+
+ process:
+ .local string result
+ result = process(template, data)
+ say result
+.end
+
+
+.sub 'get_json'
+ .param string filename
+
+ load_bytecode 'Config/JSON.pbc'
+
+ .local pmc exports, curr_namespace, test_namespace
+ curr_namespace = get_namespace
+ test_namespace = get_namespace [ 'Config';'JSON' ]
+ exports = split ' ', 'ReadConfig'
+ test_namespace.'export_to'(curr_namespace, exports)
+
+ .local pmc result
+ result = ReadConfig(filename)
+
+ .return (result)
+.end
+
+
+.sub 'get_template'
+ .param pmc templates
+ .param string type
+
+ $S0 = concat type, '.text'
+ $S1 = templates[$S0]
+ .return ($S1)
+.end
+
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
Copied: trunk/tools/release/gen_release_info.pl (from r48705, branches/tt677_toolsdirs/tools/release/gen_release_info.pl)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/tools/release/gen_release_info.pl Sat Aug 28 02:39:25 2010 (r48706, copy of r48705, branches/tt677_toolsdirs/tools/release/gen_release_info.pl)
@@ -0,0 +1,63 @@
+#! perl
+# Copyright (C) 2008, Parrot Foundation.
+# $Id$
+
+use strict;
+use warnings;
+
+=head1 NAME
+
+tools/release/gen_release_info.pl - generate release info for graphs and charts
+
+=head1 DESCRIPTION
+
+This utility generates release information from subversion in csv format,
+suitable for graphs, charts, and reports.
+
+=cut
+
+
+my $repo_url = 'https://svn.parrot.org/parrot/tags';
+
+## create a release information data structure
+my $r = {
+ map { $_->{number} => $_ }
+ map { m{^(RELEASE_)(.*)/}
+ ? {
+ tag => "$1$2",
+ number => sub{$a = shift; $a =~ y/_/./; $a }->($2),
+ }
+ : ()
+ }
+ qx { svn ls $repo_url }
+};
+
+## gather interesting release-related information from the tag
+map {
+ ## ask subversion for info about the tag
+ my $readme = $repo_url . '/' . $r->{$_}{tag};
+ warn "retrieving info on $readme\n";
+ my $info = qx{ LANG=C svn info $readme };
+
+ ## pull the interesting items
+ $info =~ m{Author: (\S+)} and $r->{$_}{author} = $1;
+ $info =~ m{Rev: (\S+)} and $r->{$_}{revision} = $1;
+ $info =~ m{Date: (\S+)} and $r->{$_}{date} = $1;
+} keys %{ $r };
+
+
+## output info in csv format
+print
+ map { "$_\n" }
+ map { my $n = $_; join ',' =>
+ map { $r->{$n}{$_} || '' }
+ qw{ tag number author revision date }
+ }
+ sort keys %$r;
+
+# Local Variables:
+# mode: cperl
+# cperl-indent-level: 4
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4:
Copied: trunk/tools/release/inc_ver.pir (from r48705, branches/tt677_toolsdirs/tools/release/inc_ver.pir)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/tools/release/inc_ver.pir Sat Aug 28 02:39:25 2010 (r48706, copy of r48705, branches/tt677_toolsdirs/tools/release/inc_ver.pir)
@@ -0,0 +1,48 @@
+#!/usr/bin/env parrot
+# Copyright (C) 2010, Parrot Foundation.
+# $Id$
+
+.sub 'main' :main
+ .local string version_file_name
+ version_file_name = 'VERSION'
+
+ # read the version
+ $P0 = new 'FileHandle'
+ $P0.'open'( version_file_name, 'r' )
+ $S0 = $P0.'readline'()
+ $P0.'close'()
+
+ print 'version: '
+ print $S0
+
+ # split the version
+ $P1 = split '.', $S0
+
+ # increment version
+ $I0 = $P1[1]
+ inc $I0
+ if $I0 != 12 goto NOT_NILL
+ $I0 = $P1[0]
+ inc $I0
+ $P1[0] = $I0
+ $I0 = 0
+NOT_NILL:
+ $P1[1] = $I0
+
+ # join the incremented version
+ $S0 = join '.', $P1
+
+ print 'new version: '
+ print $S0
+
+ # write the new version to the version_file
+ $P0.'open'( version_file_name, 'w' )
+ $P0.'print'( $S0 )
+ $P0.'close'()
+.end
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
Copied: trunk/tools/release/release.json (from r48705, branches/tt677_toolsdirs/tools/release/release.json)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/tools/release/release.json Sat Aug 28 02:39:25 2010 (r48706, copy of r48705, branches/tt677_toolsdirs/tools/release/release.json)
@@ -0,0 +1,21 @@
+{
+ "release.version" : "2.7.0",
+ "release.name" : "Australian King",
+ "release.day" : "Tuesday",
+ "release.date" : "17 August 2010",
+ "release.nextdate" : "21 September 2010",
+
+ "web.root" : "http://parrot.org/",
+ "web.source" : "download",
+ "web.openpatches" : "openpatches.html",
+ "web.repository" : "https://svn.parrot.org/parrot/trunk/",
+
+ "bugday.day" : "Saturday",
+ "bugday.date" : "18 September 2010",
+
+ "wiki.root" : "https://trac.parrot.org/parrot/wiki/",
+ "wiki.bugday" : "bug_day_2010_09_18",
+
+ "ftp.path" : "ftp://ftp.parrot.org/pub/parrot/releases/devel/2.7.0/",
+ "subversion.root" : "http://subversion.apache.org/"
+}
Copied: trunk/tools/release/templates.json (from r48705, branches/tt677_toolsdirs/tools/release/templates.json)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/tools/release/templates.json Sat Aug 28 02:39:25 2010 (r48706, copy of r48705, branches/tt677_toolsdirs/tools/release/templates.json)
@@ -0,0 +1,83 @@
+{
+ "text.news" : true,
+ "text.text" : "
+
+On behalf of the Parrot team, I'm proud to announce Parrot @release.version@
+\"@release.name at .\" Parrot (@web.root@) is a virtual machine aimed
+at running all dynamic languages.
+
+Parrot @release.version@ is available on Parrot's FTP site, or follow the
+download instructions at @web.root@@web.source at . For those who would like to
+develop on Parrot, or help develop Parrot itself, we recommend using Subversion
+on the source code repository to get the latest and best Parrot code.
+
+Parrot @release.version@ News:
+ at NEWS@
+
+Many thanks to all our contributors for making this possible, and our sponsors
+for supporting this project. Our next scheduled release is @release.nextdate at .
+
+Enjoy!
+
+",
+
+ "html.news" : true,
+ "html.text" : "
+<p>On behalf of the Parrot team, I'm proud to announce Parrot @release.version@
+"@release.name at ." <a href=\"@web.root@\">Parrot</a>
+is a virtual machine aimed at running all dynamic languages.</p>
+
+<p>Parrot @release.version@ is available on <a href=\"@ftp.path@\">Parrot's FTP
+site</a>, or <a href=\"@web.root@@web.source@\">follow the download
+instructions</a>. For those who would like to develop on Parrot, or help
+develop Parrot itself, we recommend using <a
+href=\"@subversion.root@\">Subversion</a> on <a href=\"@web.repository@\">our
+source code repository</a> to get the latest and best Parrot code.</p>
+
+<p>Parrot @release.version@ News:<br/>
+<pre>@NEWS@</pre></p>
+
+<p>Thanks to all our contributors for making this possible, and our sponsors
+for supporting this project. Our next release is @release.nextdate at .</p>
+
+<p>Enjoy!</p>
+",
+
+ "bugday.news" : false,
+ "bugday.text" : "
+Bug Day
+
+On @bugday.day@, @bugday.date@, please join us on IRC in #parrot
+(irc.parrot.org) to work on closing out as many Trac tickets
+(https://trac.parrot.org) tickets as possible in the parrot queue. This will
+help us get ready for the next release of parrot: @release.version@, scheduled
+for @release.day@, @release.date at . You'll find C, parrot assembly, perl,
+documentation, and plenty of tasks to go around. Core developers will be
+available most of the day (starting at around 10am GMT) to answer questions.
+
+No experience with parrot necessary.
+
+--From: @wiki.root@@wiki.bugday at --
+
+Check the list at:
+
+https://trac.parrot.org/parrot/report/3
+
+Which contains all the tickets I'd like to see resolved in @version at . To
+see all the open tickets, use:
+
+https://trac.parrot.org/parrot/report
+
+If you've got something you're working on that you think you'll be
+getting done before the release, please
+- add a ticket for it (if necessary);
+- set its milestone to this release.
+
+Thanks in advance for your patches and commits. ^_^
+
+... Speaking of patches, we should also get through as many of these
+(accept or reject) as possible.
+
+ at web.root@@web.openpatches@
+"
+}
Deleted: trunk/tools/util/crow.pir
==============================================================================
--- trunk/tools/util/crow.pir Sat Aug 28 02:39:25 2010 (r48705)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,107 +0,0 @@
-#! ./parrot
-# Copyright (C) 2007-2008, Parrot Foundation.
-# $Id$
-
-=head1 TITLE
-
-crow.pir -- Make noise about the new Parrot release
-
-=head1 DESCRIPTION
-
-This utility is used to help Release Managers format announcement messages.
-It uses a *very* simple and fast templating system, described in the related
-module, L<runtime/parrot/library/Crow.pir>.
-
-=head1 SYNOPSIS
-
- # see
- % parrot tools/util/crow.pir --help
-
-=cut
-
-
-.sub 'main' :main
- .param pmc args
-
- load_bytecode 'Crow.pbc'
-
- .local pmc exports, curr_namespace, test_namespace
- curr_namespace = get_namespace
- test_namespace = get_namespace ['Crow']
- exports = split ' ', 'get_news get_args process'
- test_namespace.'export_to'(curr_namespace, exports)
-
- .local pmc opts
- opts = get_args(args)
-
- unless null opts goto got_opts
- opts = new 'Hash'
- got_opts:
-
- .local pmc templates
- templates = 'get_json'('tools/util/templates.json')
-
- .local string template, type
- type = opts['type']
- if type != '' goto got_type
- type = 'text'
-
-got_type:
- template = 'get_template'(templates, type)
-
- .local pmc data
- data = 'get_json'('tools/util/release.json')
-
- .local string version
- version = data['release.version']
-
- $S0 = concat type, '.news'
- $I0 = templates[$S0]
- if $I0 goto get_news
- data['NEWS'] = ''
- goto process
- get_news:
- $S0 = 'get_news'(version)
- data['NEWS'] = $S0
-
-
- process:
- .local string result
- result = process(template, data)
- say result
-.end
-
-
-.sub 'get_json'
- .param string filename
-
- load_bytecode 'Config/JSON.pbc'
-
- .local pmc exports, curr_namespace, test_namespace
- curr_namespace = get_namespace
- test_namespace = get_namespace [ 'Config';'JSON' ]
- exports = split ' ', 'ReadConfig'
- test_namespace.'export_to'(curr_namespace, exports)
-
- .local pmc result
- result = ReadConfig(filename)
-
- .return (result)
-.end
-
-
-.sub 'get_template'
- .param pmc templates
- .param string type
-
- $S0 = concat type, '.text'
- $S1 = templates[$S0]
- .return ($S1)
-.end
-
-
-# Local Variables:
-# mode: pir
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4 ft=pir:
Deleted: trunk/tools/util/dump_pbc.pl
==============================================================================
--- trunk/tools/util/dump_pbc.pl Sat Aug 28 02:39:25 2010 (r48705)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,125 +0,0 @@
-#! perl
-
-# Copyright (C) 2008, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-tools/util/dump_pbc.pl - Weave together PBC disassembly with PIR source
-
-=head1 SYNOPSIS
-
- perl tools/util/dump_pbc.pl foo.pbc
-
-=head1 DESCRIPTION
-
-dump_pbc.pl uses Parrot's F<pbc_disassemble> program to disassemble the opcodes
-in a PBC (Parrot ByteCode) file, then weaves the disassembly together with
-the original PIR source file(s). This makes it easier to see how the PIR
-syntactic sugar is desugared into raw Parrot opcodes.
-
-=head1 BUGS
-
-This program has only been tested for a few simple cases. Also, the name
-might suggest a different use than its actual purpose.
-
-While it is not a bug in F<dump_pbc.pl> per se, there is a line numbering
-bug for some PBC opcode sequences that will result in the disassembled
-opcodes appearing just before the source lines they represent, rather
-than just after. There does not appear to be consensus yet about where
-this bug actually resides.
-
-=cut
-
-use strict;
-use warnings;
-use Cwd;
-use FindBin;
-
-my ($PARROT_ROOT, $RUNTIME_DIR);
-BEGIN {
- $PARROT_ROOT = Cwd::abs_path("$FindBin::Bin/../..");
- $RUNTIME_DIR = "$PARROT_ROOT/runtime/parrot";
-}
-
-use lib "$PARROT_ROOT/lib";
-use Parrot::Config '%PConfig';
-
-my $DISASSEMBLER = "$PConfig{build_dir}$PConfig{slash}pbc_disassemble$PConfig{exe}";
-
-go(@ARGV);
-
-sub go {
- my $pbc = shift;
-
- # The following mess brought to you by Win32, where pipe open doesn't work,
- # and thus its greater security and cleaner error handling are unavailable.
-
- -f $pbc && -r _
- or die "PBC file '$pbc' does not exist or is not readable.\n";
-
- -f $DISASSEMBLER && -x _
- or die "Can't find disassembler '$DISASSEMBLER';"
- . "did you remember to make parrot first?\n";
-
- my @dis = `$DISASSEMBLER $pbc`;
- die "No disassembly; errors: $?, $!" unless @dis;
-
- my $cur_file = '';
- my $cur_line = -1;
- my %cache;
-
- foreach (@dis) {
- if (/^(?:# )?Current Source Filename (.*)/) {
- my $found = $1;
- $found =~ s/^'//;
- $found =~ s/'$//;
- if ($cur_file ne $found) {
- $cur_file = $found;
- $cache{$cur_file} ||= slurp_file($cur_file);
- $cur_line = -1;
-
- print "\n#### $cur_file\n";
- }
- }
- elsif (my ($info, $seq, $pc, $line, $code) = /^((\d+)-(\d+) (\d+): )(.*)/) {
- my $int_line = int $line;
- my $len_line = length $line;
- if ($cur_line != $int_line) {
- $cur_line = 0 if $cur_line == -1;
- print "\n";
- foreach my $i ($cur_line + 1 .. $int_line) {
- my $source_code = $cache{$cur_file}[$i-1];
- # next unless $source_code =~ /\S/;
- printf "# %*d: %s", $len_line, $i, $source_code;
- print "\n" if $source_code =~ /^\.end/;
- }
- $cur_line = $int_line;
- }
-
- print ' ' x ($len_line + 4), "$code\n";
- }
- }
-}
-
-sub slurp_file {
- my $file = shift;
- my $source;
-
- open $source, '<', $file
- or open $source, '<', "$PARROT_ROOT/$file"
- or open $source, '<', "$RUNTIME_DIR/$file"
- or die "Could not open source file '$file': $!";
-
- my @lines = <$source>;
-
- return \@lines;
-}
-
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Deleted: trunk/tools/util/gen_release_info.pl
==============================================================================
--- trunk/tools/util/gen_release_info.pl Sat Aug 28 02:39:25 2010 (r48705)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,63 +0,0 @@
-#! perl
-# Copyright (C) 2008, Parrot Foundation.
-# $Id$
-
-use strict;
-use warnings;
-
-=head1 NAME
-
-tools/util/gen_release_info.pl - generate release info for graphs and charts
-
-=head1 DESCRIPTION
-
-This utility generates release information from subversion in csv format,
-suitable for graphs, charts, and reports.
-
-=cut
-
-
-my $repo_url = 'https://svn.parrot.org/parrot/tags';
-
-## create a release information data structure
-my $r = {
- map { $_->{number} => $_ }
- map { m{^(RELEASE_)(.*)/}
- ? {
- tag => "$1$2",
- number => sub{$a = shift; $a =~ y/_/./; $a }->($2),
- }
- : ()
- }
- qx { svn ls $repo_url }
-};
-
-## gather interesting release-related information from the tag
-map {
- ## ask subversion for info about the tag
- my $readme = $repo_url . '/' . $r->{$_}{tag};
- warn "retrieving info on $readme\n";
- my $info = qx{ LANG=C svn info $readme };
-
- ## pull the interesting items
- $info =~ m{Author: (\S+)} and $r->{$_}{author} = $1;
- $info =~ m{Rev: (\S+)} and $r->{$_}{revision} = $1;
- $info =~ m{Date: (\S+)} and $r->{$_}{date} = $1;
-} keys %{ $r };
-
-
-## output info in csv format
-print
- map { "$_\n" }
- map { my $n = $_; join ',' =>
- map { $r->{$n}{$_} || '' }
- qw{ tag number author revision date }
- }
- sort keys %$r;
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Deleted: trunk/tools/util/inc_ver.pir
==============================================================================
--- trunk/tools/util/inc_ver.pir Sat Aug 28 02:39:25 2010 (r48705)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,48 +0,0 @@
-#!/usr/bin/env parrot
-# Copyright (C) 2010, Parrot Foundation.
-# $Id$
-
-.sub 'main' :main
- .local string version_file_name
- version_file_name = 'VERSION'
-
- # read the version
- $P0 = new 'FileHandle'
- $P0.'open'( version_file_name, 'r' )
- $S0 = $P0.'readline'()
- $P0.'close'()
-
- print 'version: '
- print $S0
-
- # split the version
- $P1 = split '.', $S0
-
- # increment version
- $I0 = $P1[1]
- inc $I0
- if $I0 != 12 goto NOT_NILL
- $I0 = $P1[0]
- inc $I0
- $P1[0] = $I0
- $I0 = 0
-NOT_NILL:
- $P1[1] = $I0
-
- # join the incremented version
- $S0 = join '.', $P1
-
- print 'new version: '
- print $S0
-
- # write the new version to the version_file
- $P0.'open'( version_file_name, 'w' )
- $P0.'print'( $S0 )
- $P0.'close'()
-.end
-
-# Local Variables:
-# mode: pir
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4 ft=pir:
Deleted: trunk/tools/util/ncidef2pasm.pl
==============================================================================
--- trunk/tools/util/ncidef2pasm.pl Sat Aug 28 02:39:25 2010 (r48705)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,237 +0,0 @@
-#! perl
-
-# Copyright (C) 2003-2007, Parrot Foundation.
-# $Id$
-
-=head1 NAME
-
-tools/util/ncidef2asm.pl - Turn an NCI library definition file into PASM
-
-=head1 SYNOPSIS
-
- perl tools/util/ncidef2asm.pl path/to/from_file [ path/to/to_file ]
-
-=head1 DESCRIPTION
-
-This program takes an NCI library definition file and turns it into PASM.
-
-An NCI library definition file provides the information needed to
-generate a parrot wrapper for the named library (or libraries). Its
-format is simple, and looks like:
-
- [package]
- ncurses
-
- [lib]
- libform.so
-
- [defs]
- p new_field i i i i i i
-
- [lib]
- libncurses.so
-
- [defs]
- i is_term_resized i i
-
-Note that the assembly file is generated in the order you specify, so
-if there are library dependencies, make sure you have them in the
-correct order.
-
-=head2 package
-
-Declares the package that all subsequent sub PMCs will be put
-into. The name is a simple concatenation of the package name, double
-colon, and the routine name, with no preceding punctuation.
-
-=head2 lib
-
-The name of the library to be loaded. Should be as qualified as
-necessary for your platform--generally the full filename is required,
-though the directory generally isn't.
-
-You may load multiple libraries here, but only the last one loaded
-will be exposed to subsequent defs.
-
-=head2 defs
-
-This section holds the definitions of functions. Each function is
-assumed to be in the immediate preceding library. The definition of
-the function is:
-
- return_type name [param [param [param ...]]]
-
-The param and return_type parameters use the NCI standard, which for
-reference is:
-
-=over 4
-
-=item p
-
-Parameter is a void pointer, taken from the PMC's data pointer. PMC is
-assumed to be an unmanagedstruct or child class.
-
-Taken from a P register
-
-=item c
-
-Parameter is a character.
-
-Taken from an I register
-
-=item s
-
-Parameter is a short
-
-Taken from an I register
-
-=item i
-
-Parameter is an int
-
-Taken from an I register
-
-=item l
-
-Parameter is a long
-
-Taken from an I register
-
-=item f
-
-Paramter is a float
-
-Taken from an N register.
-
-=item d
-
-Parameter is a double.
-
-Taken from an N register.
-
-=item t
-
-Paramter is a char *, presumably a C string
-
-Taken from an S register
-
-=item v
-
-Void. Only valid as a return type, noting that the function returns no data.
-
-=item I
-
-Interpreter pointer. The current interpreter pointer is passed in
-
-=item P
-
-PMC.
-
-=item 2
-
-Pointer to short.
-
-Taken from an I register.
-
-=item 3
-
-Pointer to int.
-
-Taken from an I register
-
-=item 4
-
-Pointer to long
-
-Taken from an I register
-
-=back
-
-=cut
-
-use strict;
-use warnings;
-
-my ( $from_file, $to_file ) = @ARGV;
-
-# If there is no destination file, strip off the extension of the
-# source file and add a .pasm to it
-if ( !defined $to_file ) {
- $to_file = $from_file;
- $to_file =~ s/\..*$//;
- $to_file .= ".pasm";
-}
-
-open my $INPUT, '<', "$from_file" or die "Can't open up $from_file, error $!";
-open my $OUTPUT, '>', "$to_file" or die "Can't open up $to_file, error $!";
-
-# To start, save all the registers, just in case
-print $OUTPUT "saveall\n";
-
-my @libs;
-my ( $cur_package, $line, $cur_section );
-
-# Our dispatch table
-my (%dispatch) = (
- package => \&package_line,
- lib => \&lib_line,
- defs => \&def_line,
-);
-
-while ( $line = <$INPUT> ) {
-
- # Throw away trailing newlines, comments, and whitespace. If the
- # line's empty, then off to the next line
- chomp $line;
- $line =~ s/#.*//;
- $line =~ s/\s*$//;
- next unless $line;
-
- # Is it a section line? If so, extract the section and set it.
- if ( $line =~ /\[(\w+)\]/ ) {
- $cur_section = $1;
- next;
- }
-
- # Everything else goes to the handler
- $dispatch{$cur_section}->($line);
-
-}
-
-# Put the registers back and end
-print $OUTPUT "restoreall\n";
-print $OUTPUT "end\n";
-close $OUTPUT;
-
-sub package_line {
- my $line = shift;
-
- # Trim leading and trailing spaces
- $line =~ s/^\s*//;
- $line =~ s/\s*$//;
-
- # Set the global current package
- $cur_package = $line;
-
-}
-
-sub lib_line {
- my $line = shift;
- print $OUTPUT "loadlib P1, '$line'\n";
-}
-
-sub def_line {
- my $line = shift;
- my ( $return_type, $name, @params ) = split ' ', $line;
- unshift @params, $return_type;
- my $signature = join( "", @params );
- print $OUTPUT "dlfunc P2, P1, '$name', '$signature'\n";
- print $OUTPUT "store_global '${cur_package}::${name}', P2\n";
-}
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
Deleted: trunk/tools/util/parrot-config.pir
==============================================================================
--- trunk/tools/util/parrot-config.pir Sat Aug 28 02:39:25 2010 (r48705)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,103 +0,0 @@
-#!/usr/bin/env parrot
-# $Id$
-
-=head1 NAME
-
-config.pir - Print a Parrot configuration item
-
-=head1 VERSION
-
-version 0.01
-
-=head1 SYNOPSIS
-
- ./parrot parrot-config.pir VERSION
- ./parrot parrot-config.pir ccflags
- ./parrot parrot-config.pir --dump
-
-=head1 DESCRIPTION
-
-Print out configuration items.
-
-=head1 AUTHOR
-
-Leopold Toetsch E<lt>lt at toetsch.atE<gt>.
-
-=head1 COPYRIGHT
-
-Copyright (C) 2004-2009, Parrot Foundation.
-
-=cut
-
-.sub _main :main
- .param pmc argv
- .local int argc
- argc = argv
- if argc < 2 goto usage
- .local pmc interp, conf_hash
- .local string key
- .include "iglobals.pasm"
- interp = getinterp
- conf_hash = interp[.IGLOBALS_CONFIG_HASH]
- .local int i
- i = 1
-loop:
- key = argv[i]
- if key == '--help' goto usage
- if key == '--dump' goto dump
- $I0 = defined conf_hash[key]
- unless $I0 goto failkey
- dec argc
- if i < argc goto dumpsome
- $S0 = conf_hash[key]
- print $S0
- inc i
- if i < argc goto loop
- print "\n"
- end
-dumpsome:
- key = argv[i]
- $I0 = defined conf_hash[key]
- unless $I0 goto failkey
- print key
- print " => '"
- $S1 = conf_hash[key]
- print $S1
- say "'"
- inc i
- if i <= argc goto dumpsome
- end
-failkey:
- print " no such key: '"
- print key
- print "'\n"
- end
-dump:
- .local pmc iterator
- iterator = iter conf_hash
-iter_loop:
- unless iterator goto iter_end
- shift $S0, iterator
- print $S0
- print " => '"
- $S1 = conf_hash[$S0]
- print $S1
- say "'"
- goto iter_loop
-iter_end:
- end
-usage:
- $S0 = argv[0]
- $P0 = getinterp
- .include 'stdio.pasm'
- $P1 = $P0.'stdhandle'(.PIO_STDERR_FILENO)
- $P1.'print'($S0)
- $P1.'print'(" [ <config-key> [ <config-key> ... ] | --dump | --help ]\n")
- exit 1
-.end
-
-# Local Variables:
-# mode: pir
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4 ft=pir:
Deleted: trunk/tools/util/perlcritic-cage.conf
==============================================================================
--- trunk/tools/util/perlcritic-cage.conf Sat Aug 28 02:39:25 2010 (r48705)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,37 +0,0 @@
-# A more stringent set of rules for cage cleaners
-
-[-CodeLayout::ProhibitParensWithBuiltins]
-[CodeLayout::ProhibitHardTabs]
-allow_leading_tabs = 0
-
-[-CodeLayout::RequireTidyCode]
-
-[-ControlStructures::ProhibitPostfixControls]
-[-ControlStructures::ProhibitUnlessBlocks]
-
-[-Documentation::PodSpelling]
-[-Documentation::RequirePodAtEnd]
-[-Documentation::RequirePodSections]
-
-[-ErrorHandling::RequireCarping]
-
-[-InputOutput::ProhibitBacktickOperators]
-[-InputOutput::ProhibitInteractiveTest]
-[-InputOutput::RequireCheckedSyscalls]
-functions = :builtins
-exclude_functions = print
-
-[-Miscellanea::RequireRcsKeywords]
-
-[-Modules::RequireVersionVar]
-
-[-RegularExpressions::ProhibitEscapedMetacharacters]
-[-RegularExpressions::RequireDotMatchAnything]
-[-RegularExpressions::RequireExtendedFormatting]
-[-RegularExpressions::RequireLineBoundaryMatching]
-
-[-ValuesAndExpressions::ProhibitConstantPragma]
-[-ValuesAndExpressions::ProhibitEmptyQuotes]
-[-ValuesAndExpressions::ProhibitMagicNumbers]
-
-[-Variables::ProhibitPunctuationVars]
Deleted: trunk/tools/util/perlcritic.conf
==============================================================================
--- trunk/tools/util/perlcritic.conf Sat Aug 28 02:39:25 2010 (r48705)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,75 +0,0 @@
-verbose = 3
-
-# not all the profiles listed here are installed by default, even if you have
-# Perl::Critic. Shhhh.
-profile-strictness = quiet
-
-[BuiltinFunctions::ProhibitStringySplit]
-add_themes = parrot
-
-[CodeLayout::ProhibitDuplicateCoda]
-add_themes = parrot
-
-[CodeLayout::ProhibitHardTabs]
-allow_leading_tabs = 0
-add_themes = parrot
-
-[CodeLayout::ProhibitTrailingWhitespace]
-add_themes = parrot
-
-[CodeLayout::RequireTidyCode]
-perltidyrc = tools/util/perltidy.conf
-add_themes = extra
-
-[CodeLayout::UseParrotCoda]
-add_themes = parrot
-
-[InputOutput::ProhibitBarewordFileHandles]
-add_themes = parrot
-
-[InputOutput::ProhibitTwoArgOpen]
-add_themes = parrot
-
-[NamingConventions::ProhibitAmbiguousNames]
-# remove abstract from the list of forbidden names
-forbid = bases close contract last left no record right second set
-add_themes = extra
-
-[Subroutines::ProhibitBuiltinHomonyms]
-add_themes = extra
-
-[Subroutines::ProhibitExplicitReturnUndef]
-add_themes = parrot
-
-[Subroutines::ProhibitSubroutinePrototypes]
-add_themes = parrot
-
-[Subroutines::RequireFinalReturn]
-add_themes = extra
-
-[TestingAndDebugging::MisplacedShebang]
-add_themes = parrot
-
-[TestingAndDebugging::ProhibitShebangWarningsArg]
-add_themes = parrot
-
-[TestingAndDebugging::RequirePortableShebang]
-add_themes = parrot
-
-[TestingAndDebugging::RequireUseStrict]
-add_themes = parrot
-
-[TestingAndDebugging::RequireUseWarnings]
-add_themes = parrot
-
-[ValuesAndExpressions::ProhibitInterpolationOfLiterals]
-add_themes = extra
-
-[Variables::ProhibitConditionalDeclarations]
-add_themes = parrot
-
-[Bangs::ProhibitFlagComments]
-add_themes = extra
-
-[Bangs::ProhibitRefProtoOrProto]
-add_themes = extra
Deleted: trunk/tools/util/perltidy.conf
==============================================================================
--- trunk/tools/util/perltidy.conf Sat Aug 28 02:39:25 2010 (r48705)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,15 +0,0 @@
-# A declarative version of PDD07 for perl.
-
-# Must apply...
-
--l=100 # Source line width is limited to 100 characters.
--i=4 # must be indented four columns (no tabs)
--ola # Labels (including case labels) must be outdented two columns
--ci=4 # Long lines, when split, must use at least one extra level of indentation on the continued line.
--ce # Cuddled elses are forbidden: i.e. avoid } else { .
-
-# Nice to haves...
-
-# Freeze new lines; some really short lines look good the way they
-# are, this should stop perltidy from merging them together
--fnl
Deleted: trunk/tools/util/release.json
==============================================================================
--- trunk/tools/util/release.json Sat Aug 28 02:39:25 2010 (r48705)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,21 +0,0 @@
-{
- "release.version" : "2.7.0",
- "release.name" : "Australian King",
- "release.day" : "Tuesday",
- "release.date" : "17 August 2010",
- "release.nextdate" : "21 September 2010",
-
- "web.root" : "http://parrot.org/",
- "web.source" : "download",
- "web.openpatches" : "openpatches.html",
- "web.repository" : "https://svn.parrot.org/parrot/trunk/",
-
- "bugday.day" : "Saturday",
- "bugday.date" : "18 September 2010",
-
- "wiki.root" : "https://trac.parrot.org/parrot/wiki/",
- "wiki.bugday" : "bug_day_2010_09_18",
-
- "ftp.path" : "ftp://ftp.parrot.org/pub/parrot/releases/devel/2.7.0/",
- "subversion.root" : "http://subversion.apache.org/"
-}
Deleted: trunk/tools/util/templates.json
==============================================================================
--- trunk/tools/util/templates.json Sat Aug 28 02:39:25 2010 (r48705)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,83 +0,0 @@
-{
- "text.news" : true,
- "text.text" : "
-
-On behalf of the Parrot team, I'm proud to announce Parrot @release.version@
-\"@release.name at .\" Parrot (@web.root@) is a virtual machine aimed
-at running all dynamic languages.
-
-Parrot @release.version@ is available on Parrot's FTP site, or follow the
-download instructions at @web.root@@web.source at . For those who would like to
-develop on Parrot, or help develop Parrot itself, we recommend using Subversion
-on the source code repository to get the latest and best Parrot code.
-
-Parrot @release.version@ News:
- at NEWS@
-
-Many thanks to all our contributors for making this possible, and our sponsors
-for supporting this project. Our next scheduled release is @release.nextdate at .
-
-Enjoy!
-
-",
-
- "html.news" : true,
- "html.text" : "
-<p>On behalf of the Parrot team, I'm proud to announce Parrot @release.version@
-"@release.name at ." <a href=\"@web.root@\">Parrot</a>
-is a virtual machine aimed at running all dynamic languages.</p>
-
-<p>Parrot @release.version@ is available on <a href=\"@ftp.path@\">Parrot's FTP
-site</a>, or <a href=\"@web.root@@web.source@\">follow the download
-instructions</a>. For those who would like to develop on Parrot, or help
-develop Parrot itself, we recommend using <a
-href=\"@subversion.root@\">Subversion</a> on <a href=\"@web.repository@\">our
-source code repository</a> to get the latest and best Parrot code.</p>
-
-<p>Parrot @release.version@ News:<br/>
-<pre>@NEWS@</pre></p>
-
-<p>Thanks to all our contributors for making this possible, and our sponsors
-for supporting this project. Our next release is @release.nextdate at .</p>
-
-<p>Enjoy!</p>
-",
-
- "bugday.news" : false,
- "bugday.text" : "
-Bug Day
-
-On @bugday.day@, @bugday.date@, please join us on IRC in #parrot
-(irc.parrot.org) to work on closing out as many Trac tickets
-(https://trac.parrot.org) tickets as possible in the parrot queue. This will
-help us get ready for the next release of parrot: @release.version@, scheduled
-for @release.day@, @release.date at . You'll find C, parrot assembly, perl,
-documentation, and plenty of tasks to go around. Core developers will be
-available most of the day (starting at around 10am GMT) to answer questions.
-
-No experience with parrot necessary.
-
---From: @wiki.root@@wiki.bugday at --
-
-Check the list at:
-
-https://trac.parrot.org/parrot/report/3
-
-Which contains all the tickets I'd like to see resolved in @version at . To
-see all the open tickets, use:
-
-https://trac.parrot.org/parrot/report
-
-If you've got something you're working on that you think you'll be
-getting done before the release, please
-- add a ticket for it (if necessary);
-- set its milestone to this release.
-
-Thanks in advance for your patches and commits. ^_^
-
-... Speaking of patches, we should also get through as many of these
-(accept or reject) as possible.
-
- at web.root@@web.openpatches@
-"
-}
Deleted: trunk/tools/util/update_copyright.pl
==============================================================================
--- trunk/tools/util/update_copyright.pl Sat Aug 28 02:39:25 2010 (r48705)
+++ /dev/null 00:00:00 1970 (deleted)
@@ -1,63 +0,0 @@
-#! perl
-# $Id$
-
-# Copyright (C) 2008, Parrot Foundation.
-
-use strict;
-use warnings;
-use Fatal qw( open close );
-
-=head1 NAME
-
-F<tools/util/update_copyright.pl>
-
-=head1 DESCRIPTION
-
-Given a list of files as command line arguments, update the copyright
-notice to go from the earliest year noted to the current year.
-
-Edits the files in place. You should update the copyright on a modified
-file before you commit it back to the repository.
-
-=cut
-
-use lib 'lib';
-use Parrot::Test;
-
-# Accept a little fuzz in the original copyright notice..
-my $copyright_re = qr/
- Copyright \s+ \(C\) \s+
- (\d\d\d\d)\s*(?:-\s*\d\d\d\d)? \s* ,? \s*
- The \s+ Perl \s+ Foundation\.?
-/xi;
-
-my $year = (localtime())[5]+1900;
-
-# loop over all the files specified on the command line
-foreach my $file (@ARGV) {
- my $contents = Parrot::Test::slurp_file( $file );
- if ( $contents =~ $copyright_re) {
- my $old_year = $1;
- if ($old_year eq $year) {
- warn "$file already up to date.\n";
- next;
- }
- else {
- $contents =~ s/$copyright_re/Copyright (C) $old_year-$year, Parrot Foundation./;
- open my $ofh, '>', $file;
- print {$ofh} $contents;
- close $ofh;
- }
- }
- else {
- warn "$file doesn't have a valid copyright line.\n";
- }
-}
-
-
-# Local Variables:
-# mode: cperl
-# cperl-indent-level: 4
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4:
More information about the parrot-commits
mailing list