Author: jrieks
Date: Tue Apr 12 09:23:20 2005
New Revision: 7814
Modified:
trunk/config/gen/config_h/config_h.in
trunk/config/gen/config_pm/myconfig.in
trunk/config/gen/makefiles/root.in
trunk/imcc/main.c
trunk/include/parrot/embed.h
trunk/include/parrot/misc.h
trunk/lib/Parrot/Configure/RunSteps.pm
Log:
added PARROT_REVISION (subversion's revision)
Modified: trunk/config/gen/config_h/config_h.in
==============================================================================
--- trunk/config/gen/config_h/config_h.in (original)
+++ trunk/config/gen/config_h/config_h.in Tue Apr 12 09:23:20 2005
@@ -16,6 +16,7 @@
*/
#define PARROT_VERSION "${VERSION}${DEVEL}"
+#define PARROT_REVISION ${revision}
#define PARROT_CONFIG_DATE "${configdate}"
#define PARROT_MAJOR_VERSION ${MAJOR}
#define PARROT_MINOR_VERSION ${MINOR}
Modified: trunk/config/gen/config_pm/myconfig.in
==============================================================================
--- trunk/config/gen/config_pm/myconfig.in (original)
+++ trunk/config/gen/config_pm/myconfig.in Tue Apr 12 09:23:20 2005
@@ -1,4 +1,4 @@
-Summary of my parrot ${VERSION} configuration:
+Summary of my parrot ${VERSION} (r${revision}) configuration:
configdate='${configdate}'
Platform:
osname=${osname}, archname=${archname}
Modified: trunk/config/gen/makefiles/root.in
==============================================================================
--- trunk/config/gen/makefiles/root.in (original)
+++ trunk/config/gen/makefiles/root.in Tue Apr 12 09:23:20 2005
@@ -172,6 +172,7 @@
lib/Parrot/PMC.pm \
runtime/parrot/include/config.fpmc \
$(SRC_DIR)/platform.c \
+ $(SRC_DIR)/revision.c \
#CONDITIONED_LINE(platform_asm): $(SRC_DIR)/platform_asm.s \
$(SRC_DIR)/core_pmcs.c \
CFLAGS \
@@ -406,6 +407,7 @@
$(SRC_DIR)/builtin$(O) \
$(SRC_DIR)/mmd_fallback$(O) \
$(SRC_DIR)/extend$(O) \
+ $(SRC_DIR)/revision$(O) \
$(PF_DIR)/pf_items$(O) \
$(OPS_DIR)/core_ops$(O) \
$(OPS_DIR)/core_ops_switch$(O) \
@@ -713,6 +715,9 @@
$(SRC_DIR)/parrot_config.h : $(BUILD_TOOLS_DIR)/parrot_config_c.pl
config_lib.pasm
$(PERL) $(BUILD_TOOLS_DIR)/parrot_config_c.pl >
$(SRC_DIR)/parrot_config.h
+$(SRC_DIR)/revision.c : .svn/entries $(BUILD_TOOLS_DIR)/revision_c.pl
$(SRC_DIR)/parrot_config.h
+ $(PERL) -Ilib $(BUILD_TOOLS_DIR)/revision_c.pl > $(SRC_DIR)/revision.c
+
###############################################################################
#
# Examples (Assembly):
Modified: trunk/imcc/main.c
==============================================================================
--- trunk/imcc/main.c (original)
+++ trunk/imcc/main.c Tue Apr 12 09:23:20 2005
@@ -95,9 +95,18 @@
static void
imcc_version(void)
{
- printf("This is parrot version " PARROT_VERSION " built for "
- PARROT_ARCHNAME ".\n\
-Copyright (C) 2001-2005 The Perl Foundation. All Rights Reserved.\n\
+ int rev = PARROT_REVISION;
+ printf("This is parrot version " PARROT_VERSION " (r%d) built for "
+ PARROT_ARCHNAME ".\n", rev);
+ rev = Parrot_revision();
+ if( PARROT_REVISION != rev ) {
+ printf( "Warning: runtime has revision %d!\n", rev );
+ }
+ rev = Parrot_config_revision();
+ if( PARROT_REVISION != rev ) {
+ printf( "Warning: used Configure.pl revision %d!\n", rev );
+ }
+ printf("Copyright (C) 2001-2005 The Perl Foundation. All Rights
Reserved.\n\
\n\
Parrot may be copied only under the terms of either the Artistic License or
the\n\
GNU General Public License, which may be found in the Parrot source kit.\n\
Modified: trunk/include/parrot/embed.h
==============================================================================
--- trunk/include/parrot/embed.h (original)
+++ trunk/include/parrot/embed.h Tue Apr 12 09:23:20 2005
@@ -54,6 +54,8 @@
void Parrot_run_native(Parrot_Interp interpreter, native_func_t func);
+int Parrot_revision(void);
+
#endif /* PARROT_EMBED_H_GUARD */
/*
Modified: trunk/include/parrot/misc.h
==============================================================================
--- trunk/include/parrot/misc.h (original)
+++ trunk/include/parrot/misc.h Tue Apr 12 09:23:20 2005
@@ -169,6 +169,11 @@
*/
const char* Parrot_get_runtime_prefix(Interp *, STRING **prefix);
+/*
+ * generated src/revision.c
+ */
+int Parrot_config_revision(void);
+
#endif /* PARROT_MISC_H_GUARD */
/*
Modified: trunk/lib/Parrot/Configure/RunSteps.pm
==============================================================================
--- trunk/lib/Parrot/Configure/RunSteps.pm (original)
+++ trunk/lib/Parrot/Configure/RunSteps.pm Tue Apr 12 09:23:20 2005
@@ -64,6 +64,7 @@
auto/antlr.pl
auto/bc.pl
gen/icu.pl
+ gen/revision.pl
gen/config_h.pl
gen/core_pmcs.pl
gen/parrot_include.pl