This repository has been archived by the owner on Jun 13, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
/
version.gsl
106 lines (98 loc) · 3.25 KB
/
version.gsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
#
# version.gsl - generate version headers in different languages
#
# Used by the version classes
# Invoked by the 'execute' action at configure time.
#
# Copyright (c) 1996-2009 iMatix Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# For information on alternative licensing for OEMs, please contact
# iMatix Corporation.
#
.include "license.gsl"
.if !macro ("version_as_c")
.macro version_as_c
/*==========================================================
*
* $(file.name) - version information for $(pdl.name:)
*
* Should be the last file included in parent source program.
* Generated by iMatix Boom
. bsd_license (" *")
*
*==========================================================*/
#undef VERSION /* Scrap any previous definitions */
#undef PRODUCT
#undef COPYRIGHT
#undef BUILDDATE
#undef BUILDMODEL
#define VERSION "$(pdl.version:)"
#define PRODUCT "$(pdl.name:)/$(pdl.version:)"
#define COPYRIGHT "$(pdl.copyright?:)"
#define BUILDDATE ""
#ifndef SVN_REVISION
#define SVN_REVISION "$(switches.svn_revision?'unknown')"
#endif
#if defined (DEBUG)
# define BUILDMODEL "Debug release for internal use only"
#else
# define BUILDMODEL "Production release"
#endif
#if defined (VERSION_EMBED)
/* Embed the version information in the resulting binary */
char *$(pdl.acronym:lower)_version_start = "VeRsIoNsTaRt:$(pdl.acronym:lower)";
char *$(pdl.acronym:lower)_version = VERSION;
char *$(pdl.acronym:lower)_product = PRODUCT;
char *$(pdl.acronym:lower)_copyright = COPYRIGHT;
char *$(pdl.acronym:lower)_buildmodel = BUILDMODEL;
char *$(pdl.acronym:lower)_svn_revision = SVN_REVISION;
char *$(pdl.acronym:lower)_version_end = "VeRsIoNeNd:$(pdl.acronym:lower)";
#endif
.endmacro
.macro version_as_gsl
\.#=========================================================
\.#
\.# $(file.name) - version information for $(pdl.name:)
\.#
\.# Generated by iMatix Boom
. bsd_license (".#")
\.#=========================================================
\.root.VERSION = "$(pdl.version:)"
\.root.PRODUCT = "$(pdl.name:)/" + VERSION
\.root.COPYRIGHT = "$(pdl.copyright?:)"
\.root.SVN_REVISION = "$(switches.svn_revision?'unknown')"
.endmacro
.macro version_as_perl
\#==========================================================
\#
\# $(file.name) - version information for $(pdl.name:)
\#
\# Generated by iMatix Boom
. bsd_license ("#")
\#==========================================================
\$VERSION = "$(pdl.version:)";
\$PRODUCT = "$(pdl.name:)/" & VERSION;
\$COPYRIGHT = "$(pdl.copyright?:)";
\$SVN_REVISION = "$(switches.svn_revision?'unknown')";
1;
.endmacro
.endif
stream_output (my.path + file.name)
if [as] = "c"
version_as_c ()
elsif [as] = "perl"
version_as_perl ()
elsif [as] = "gsl"
version_as_gsl ()
endif
stream_pop ()