Permalink
Browse files

generate skeleton.pir to avoid hardcoding wrong values (fix TT#1526)

git-svn-id: https://svn.parrot.org/parrot/trunk@46742 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
1 parent 8968e8c commit 8bf2acbbfb6c4cdd4d4e98c4e291f88707ef3a58 @coke coke committed May 17, 2010
Showing with 55 additions and 19 deletions.
  1. +6 −3 .gitignore
  2. +2 −2 MANIFEST
  3. +3 −1 MANIFEST.SKIP
  4. +6 −2 config/gen/makefiles/editor.in
  5. +38 −0 editor/mk_skeleton.pir
  6. +0 −11 editor/skeleton.pir
View
9 .gitignore
@@ -1,6 +1,6 @@
# ex: set ro:
# $Id
-# generated by tools/dev/mk_manifest_and_skip.pl Tue May 4 14:32:03 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Mon May 17 15:32:39 2010 UT
#
# This file should contain a transcript of the svn:ignore properties
# of the directories in the Parrot subversion repository. (Needed for
@@ -51,6 +51,8 @@ parrot
parrot-nqp
parrot-nqp.c
parrot-nqp.pbc
+parrot-prove
+parrot-prove.*
parrot.ilk
parrot.iss
parrot.pc
@@ -72,8 +74,6 @@ pbc_to_exe.*
perl6
pirc
tags
-tapir
-tapir.*
temp.file
test
test.c
@@ -148,6 +148,7 @@ editor/Makefile
editor/imc.vim
editor/imcc.xml
editor/pir.vim
+editor/skeleton.pir
# generated from svn:ignore of 'examples/languages/abc/'
examples/languages/abc/*.c
examples/languages/abc/*.exe
@@ -311,6 +312,8 @@ runtime/parrot/library/Data/Dumper/*.pbc
runtime/parrot/library/Digest/*.pbc
# generated from svn:ignore of 'runtime/parrot/library/Getopt/'
runtime/parrot/library/Getopt/Obj.pbc
+# generated from svn:ignore of 'runtime/parrot/library/HTTP/'
+runtime/parrot/library/HTTP/*.pbc
# generated from svn:ignore of 'runtime/parrot/library/MIME/'
runtime/parrot/library/MIME/*.pbc
# generated from svn:ignore of 'runtime/parrot/library/Math/'
View
4 MANIFEST
@@ -1,7 +1,7 @@
# ex: set ro:
# $Id$
#
-# generated by tools/dev/mk_manifest_and_skip.pl Mon May 17 09:44:33 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Mon May 17 15:32:39 2010 UT
#
# See below for documentation on the format of this file.
#
@@ -471,14 +471,14 @@ editor/README.pod []doc
editor/filetype_parrot.vim []
editor/indent_pir.vim []
editor/kate_syntax.pl []
+editor/mk_skeleton.pir []
editor/ops2vim.pl []
editor/parrot.el []
editor/pasm.el []
editor/pasm.vim []
editor/pir-mode.el []
editor/pir_vim.in []
editor/pmc.vim []
-editor/skeleton.pir []
editor/subversion_config []
examples/README [examples]
examples/benchmarks/addit.pasm [examples]
View
4 MANIFEST.SKIP
@@ -1,6 +1,6 @@
# ex: set ro:
# $Id$
-# generated by tools/dev/mk_manifest_and_skip.pl Sun May 16 22:18:35 2010 UT
+# generated by tools/dev/mk_manifest_and_skip.pl Mon May 17 15:32:39 2010 UT
#
# This file should contain a transcript of the svn:ignore properties
# of the directories in the Parrot subversion repository. (Needed for
@@ -267,6 +267,8 @@
^editor/imcc\.xml/
^editor/pir\.vim$
^editor/pir\.vim/
+^editor/skeleton\.pir$
+^editor/skeleton\.pir/
# generated from svn:ignore of 'examples/languages/abc/'
^examples/languages/abc/.*\.c$
^examples/languages/abc/.*\.c/
View
8 config/gen/makefiles/editor.in
@@ -7,14 +7,15 @@ VIM_FT_DIR = $(VIM_DIR)/plugin
VIM_IN_DIR = $(VIM_DIR)/indent
VIM_SYN_DIR = $(VIM_DIR)/syntax
+PARROT = ../parrot@exe@
PERL = @perl@
CP = @cp@
MKPATH = @mkpath@
RM_F = @rm_f@
default: all
-all: pir.vim imc.kate
+all: pir.vim imc.kate skeleton.pir
# This is a listing of all targets, that are meant to be called by users
help :
@@ -36,7 +37,10 @@ pir.vim: pir_vim.in ../src/ops/*.ops ops2vim.pl
$(CP) pir_vim.in pir.vim
$(PERL) ops2vim.pl ../src/ops/*.ops >> pir.vim
-vim-install: pir.vim
+skeleton.pir: mk_skeleton.pir
+ $(PARROT) mk_skeleton.pir > skeleton.pir
+
+vim-install: pir.vim skeleton.pir
$(MKPATH) "$(VIM_DIR)"
$(CP) skeleton.pir "$(VIM_DIR)"
$(MKPATH) "$(VIM_SYN_DIR)"
View
38 editor/mk_skeleton.pir
@@ -0,0 +1,38 @@
+# Copyright (C) 2010, Parrot Foundation.
+# $Id$
+
+# Generate a skeleton PIR file that adheres to parrot developer standards.
+# intended for people who hack on parrot itself, not users of parrot.
+
+.include 'tm.pasm'
+
+.sub 'main' :main
+ .local pmc timeArray
+ .local int epoch, year
+ epoch = time
+ timeArray = decodetime epoch
+ year = timeArray[.TM_YEAR]
+
+ # split up to avoid various svn/codingstd issues.
+ print '# Copyright (C) '
+ print year
+ say ' Parrot Foundation.'
+ print '# $'
+ say 'Id: $'
+ say ''
+ say ".sub 'main' :main"
+ say ' # For Parrot developers.'
+ say '.end'
+ say ''
+ say '# Local Variables:'
+ say '# mode: pir'
+ say '# fill-column: 100'
+ say '# End:'
+ say '# vim: expandtab shiftwidth=4 ft=pir:'
+.end
+
+# Local Variables:
+# mode: pir
+# fill-column: 100
+# End:
+# vim: expandtab shiftwidth=4 ft=pir:
View
11 editor/skeleton.pir
@@ -1,11 +0,0 @@
-# Copyright (C) 2006-2009, Parrot Foundation.
-# $Id$
-
-.sub 'main' :main
-.end
-
-# Local Variables:
-# mode: pir
-# fill-column: 100
-# End:
-# vim: expandtab shiftwidth=4 ft=pir:

0 comments on commit 8bf2acb

Please sign in to comment.