1999.6.1
by kalebral at gmail
update Copyright strings to a more common format to help with creating the master debian copyright file |
1 |
dnl Copyright (C) 2009 Sun Microsystems, Inc. |
2 |
dnl This file is free software; Sun Microsystems, Inc. |
|
1085.1.4
by Monty Taylor
pandora-build v1 |
3 |
dnl gives unlimited permission to copy and/or distribute it, |
4 |
dnl with or without modifications, as long as this notice is preserved. |
|
5 |
||
1273.23.5
by Monty Taylor
Merged in changes fixing VC detection. |
6 |
AC_DEFUN([PANDORA_TEST_VC_DIR],[ |
1273.12.1
by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA. |
7 |
pandora_building_from_vc=no
|
8 |
||
9 |
if test -d ".bzr" ; then
|
|
10 |
pandora_building_from_bzr=yes
|
|
11 |
pandora_building_from_vc=yes
|
|
12 |
else
|
|
13 |
pandora_building_from_bzr=no
|
|
14 |
fi
|
|
15 |
||
16 |
if test -d ".svn" ; then
|
|
17 |
pandora_building_from_svn=yes
|
|
18 |
pandora_building_from_vc=yes
|
|
19 |
else
|
|
20 |
pandora_building_from_svn=no
|
|
21 |
fi
|
|
22 |
||
23 |
if test -d ".hg" ; then
|
|
24 |
pandora_building_from_hg=yes
|
|
25 |
pandora_building_from_vc=yes
|
|
26 |
else
|
|
27 |
pandora_building_from_hg=no
|
|
28 |
fi
|
|
29 |
||
30 |
if test -d ".git" ; then
|
|
31 |
pandora_building_from_git=yes
|
|
32 |
pandora_building_from_vc=yes
|
|
33 |
else
|
|
34 |
pandora_building_from_git=no
|
|
35 |
fi
|
|
36 |
]) |
|
37 |
||
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
38 |
AC_DEFUN([PANDORA_BUILDING_FROM_VC],[ |
2023.3.24
by Monty Taylor
Fixed logic error in pandora_vc_changelong. |
39 |
m4_syscmd(PANDORA_TEST_VC_DIR
|
40 |
m4_if(PCT_NO_VC_CHANGELOG,yes,[
|
|
41 |
vc_changelog=no
|
|
42 |
],[ |
|
43 |
vc_changelog=yes
|
|
44 |
]) |
|
45 |
|
|
46 |
[ |
|
1273.12.1
by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA. |
47 |
|
48 |
PANDORA_RELEASE_DATE=`date +%Y.%m`
|
|
49 |
PANDORA_RELEASE_NODOTS_DATE=`date +%Y%m`
|
|
50 |
||
51 |
# Set some defaults
|
|
52 |
PANDORA_VC_REVNO="0"
|
|
53 |
PANDORA_VC_REVID="unknown"
|
|
54 |
PANDORA_VC_BRANCH="bzr-export"
|
|
55 |
||
56 |
if test "${pandora_building_from_bzr}" = "yes"; then
|
|
57 |
echo "# Grabbing changelog and version information from bzr"
|
|
58 |
PANDORA_BZR_REVNO=`bzr revno`
|
|
59 |
if test "x$PANDORA_BZR_REVNO" != "x${PANDORA_VC_REVNO}" ; then
|
|
60 |
PANDORA_VC_REVNO="${PANDORA_BZR_REVNO}"
|
|
61 |
PANDORA_VC_REVID=`bzr log -r-1 --show-ids | grep revision-id | cut -f2 -d' ' | head -1`
|
|
62 |
PANDORA_VC_BRANCH=`bzr nick`
|
|
2133.2.1
by Monty Taylor
Add support for setting version from a tag. |
63 |
PANDORA_VC_TAG=`bzr tags -r-1 | cut -f1 -d' ' | head -1`
|
2221.1.5
by Monty Taylor
Added git support and support for setting current version based on most |
64 |
PANDORA_VC_LATEST_TAG=`bzr tags --sort=time | grep -v '\?'| cut -f1 -d' ' | tail -1`
|
2023.3.23
by Monty Taylor
Fixed typo in pandora macros. |
65 |
if test "x${vc_changelog}" = "xyes"; then
|
1992.6.9
by Monty Taylor
Updated pandora-build files to version 0.165 |
66 |
bzr log --gnu > ChangeLog
|
67 |
fi
|
|
1273.12.1
by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA. |
68 |
fi
|
2221.1.5
by Monty Taylor
Added git support and support for setting current version based on most |
69 |
elif test "${pandora_building_from_git}" = "yes"; then
|
70 |
echo "# Grabbing changelog and version information from git"
|
|
71 |
PANDORA_GIT_REVID=`git --no-pager log --max-count=1 | cut -f2 -d' ' | head -1`
|
|
72 |
if test "x$PANDORA_GIT_REVID" != "x${PANDORA_VC_REVNO}" ; then
|
|
73 |
PANDORA_VC_REVID="${PANDORA_GIT_REVID}"
|
|
74 |
PANDORA_VC_BRANCH=`git branch | grep -Ei "\* (.*)" | cut -f2 -d' '`
|
|
75 |
fi
|
|
1273.12.1
by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA. |
76 |
fi
|
77 |
||
78 |
if ! test -d config ; then
|
|
79 |
mkdir -p config
|
|
80 |
fi
|
|
81 |
||
1502.4.1
by Monty Taylor
Don't overwrite the pandora_vc_revinfo file if we don't have new |
82 |
if test "${pandora_building_from_bzr}" = "yes" -o ! -f config/pandora_vc_revinfo ; then
|
83 |
cat > config/pandora_vc_revinfo.tmp <<EOF
|
|
1273.12.1
by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA. |
84 |
PANDORA_VC_REVNO=${PANDORA_VC_REVNO}
|
85 |
PANDORA_VC_REVID=${PANDORA_VC_REVID}
|
|
86 |
PANDORA_VC_BRANCH=${PANDORA_VC_BRANCH}
|
|
2133.2.1
by Monty Taylor
Add support for setting version from a tag. |
87 |
PANDORA_VC_TAG=${PANDORA_VC_TAG}
|
2221.1.5
by Monty Taylor
Added git support and support for setting current version based on most |
88 |
PANDORA_VC_LATEST_TAG=${PANDORA_VC_LATEST_TAG}
|
1273.12.1
by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA. |
89 |
PANDORA_RELEASE_DATE=${PANDORA_RELEASE_DATE}
|
90 |
PANDORA_RELEASE_NODOTS_DATE=${PANDORA_RELEASE_NODOTS_DATE}
|
|
91 |
EOF
|
|
1502.4.1
by Monty Taylor
Don't overwrite the pandora_vc_revinfo file if we don't have new |
92 |
if ! diff config/pandora_vc_revinfo.tmp config/pandora_vc_revinfo >/dev/null 2>&1 ; then
|
93 |
mv config/pandora_vc_revinfo.tmp config/pandora_vc_revinfo
|
|
94 |
fi
|
|
95 |
rm -f config/pandora_vc_revinfo.tmp
|
|
1273.12.1
by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA. |
96 |
fi
|
97 |
]) |
|
1085.1.3
by Monty Taylor
Split out warnings - start using the pandora build system. |
98 |
]) |
1085.1.4
by Monty Taylor
pandora-build v1 |
99 |
|
1192.3.6
by Monty Taylor
pandora-build v0.67 - Support configure-time bzr version checking. |
100 |
AC_DEFUN([_PANDORA_READ_FROM_FILE],[ |
101 |
$1=`grep $1 $2 | cut -f2 -d=`
|
|
102 |
]) |
|
103 |
||
104 |
AC_DEFUN([PANDORA_VC_VERSION],[ |
|
105 |
AC_REQUIRE([PANDORA_BUILDING_FROM_VC]) |
|
106 |
||
1273.23.5
by Monty Taylor
Merged in changes fixing VC detection. |
107 |
PANDORA_TEST_VC_DIR |
1273.12.1
by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA. |
108 |
|
109 |
AS_IF([test -f ${srcdir}/config/pandora_vc_revinfo],[ |
|
110 |
_PANDORA_READ_FROM_FILE([PANDORA_VC_REVNO],${srcdir}/config/pandora_vc_revinfo) |
|
111 |
_PANDORA_READ_FROM_FILE([PANDORA_VC_REVID],${srcdir}/config/pandora_vc_revinfo) |
|
1192.3.6
by Monty Taylor
pandora-build v0.67 - Support configure-time bzr version checking. |
112 |
_PANDORA_READ_FROM_FILE([PANDORA_VC_BRANCH], |
1273.12.1
by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA. |
113 |
${srcdir}/config/pandora_vc_revinfo) |
2133.2.1
by Monty Taylor
Add support for setting version from a tag. |
114 |
_PANDORA_READ_FROM_FILE([PANDORA_VC_TAG], |
115 |
${srcdir}/config/pandora_vc_revinfo) |
|
2221.1.5
by Monty Taylor
Added git support and support for setting current version based on most |
116 |
_PANDORA_READ_FROM_FILE([PANDORA_VC_LATEST_TAG], |
117 |
${srcdir}/config/pandora_vc_revinfo) |
|
1192.3.6
by Monty Taylor
pandora-build v0.67 - Support configure-time bzr version checking. |
118 |
_PANDORA_READ_FROM_FILE([PANDORA_RELEASE_DATE], |
1273.12.1
by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA. |
119 |
${srcdir}/config/pandora_vc_revinfo) |
1192.3.6
by Monty Taylor
pandora-build v0.67 - Support configure-time bzr version checking. |
120 |
_PANDORA_READ_FROM_FILE([PANDORA_RELEASE_NODOTS_DATE], |
1273.12.1
by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA. |
121 |
${srcdir}/config/pandora_vc_revinfo) |
122 |
]) |
|
123 |
AS_IF([test "x${PANDORA_VC_BRANCH}" != x"${PACKAGE}"],[ |
|
124 |
PANDORA_RELEASE_COMMENT="${PANDORA_VC_BRANCH}"
|
|
125 |
],[ |
|
126 |
PANDORA_RELEASE_COMMENT="trunk"
|
|
127 |
]) |
|
1192.3.6
by Monty Taylor
pandora-build v0.67 - Support configure-time bzr version checking. |
128 |
|
2221.1.5
by Monty Taylor
Added git support and support for setting current version based on most |
129 |
AS_IF([test "x${PANDORA_VC_TAG}" != "x"],[ |
2133.2.1
by Monty Taylor
Add support for setting version from a tag. |
130 |
PANDORA_RELEASE_VERSION="${PANDORA_VC_TAG}"
|
2221.2.4
by Monty Taylor
We don't need to have an ID this big - breaks 32bit. |
131 |
changequote(<<, >>)dnl
|
132 |
PANDORA_RELEASE_ID=`echo ${PANDORA_RELEASE_VERSION} | sed 's/[^0-9]//g'` |
|
133 |
changequote([, ])dnl
|
|
2221.1.5
by Monty Taylor
Added git support and support for setting current version based on most |
134 |
],[
|
135 |
AS_IF([test "x${PANDORA_VC_LATEST_TAG}" != "x"],[
|
|
136 |
PANDORA_RELEASE_VERSION="${PANDORA_VC_LATEST_TAG}.${PANDORA_VC_REVNO}"
|
|
2221.2.4
by Monty Taylor
We don't need to have an ID this big - breaks 32bit. |
137 |
changequote(<<, >>)dnl
|
138 |
PANDORA_RELEASE_ID=`echo ${PANDORA_VC_LATEST_TAG} | sed 's/[^0-9]//g'` |
|
139 |
changequote([, ])dnl
|
|
2221.1.5
by Monty Taylor
Added git support and support for setting current version based on most |
140 |
],[
|
141 |
PANDORA_RELEASE_VERSION="${PANDORA_RELEASE_DATE}.${PANDORA_VC_REVNO}"
|
|
2221.2.4
by Monty Taylor
We don't need to have an ID this big - breaks 32bit. |
142 |
changequote(<<, >>)dnl
|
143 |
PANDORA_RELEASE_ID=`echo ${PANDORA_RELEASE_DATE} | sed 's/[^0-9]//g'` |
|
144 |
changequote([, ])dnl |
|
2221.1.5
by Monty Taylor
Added git support and support for setting current version based on most |
145 |
]) |
2133.2.1
by Monty Taylor
Add support for setting version from a tag. |
146 |
]) |
2221.1.5
by Monty Taylor
Added git support and support for setting current version based on most |
147 |
|
1192.3.6
by Monty Taylor
pandora-build v0.67 - Support configure-time bzr version checking. |
148 |
|
149 |
VERSION="${PANDORA_RELEASE_VERSION}" |
|
1192.3.7
by Monty Taylor
Added code necessary for building plugins dynamically. |
150 |
AC_DEFINE_UNQUOTED([PANDORA_RELEASE_VERSION],["${PANDORA_RELEASE_VERSION}"], |
151 |
[The real version of the software]) |
|
1192.3.6
by Monty Taylor
pandora-build v0.67 - Support configure-time bzr version checking. |
152 |
AC_SUBST(PANDORA_VC_REVNO) |
153 |
AC_SUBST(PANDORA_VC_REVID) |
|
154 |
AC_SUBST(PANDORA_VC_BRANCH) |
|
155 |
AC_SUBST(PANDORA_RELEASE_DATE) |
|
156 |
AC_SUBST(PANDORA_RELEASE_NODOTS_DATE) |
|
157 |
AC_SUBST(PANDORA_RELEASE_COMMENT) |
|
158 |
AC_SUBST(PANDORA_RELEASE_VERSION) |
|
159 |
AC_SUBST(PANDORA_RELEASE_ID) |
|
160 |
]) |
|
1273.12.1
by Monty Taylor
pandora-build v0.100 - Fixes several bugs found by cb1kenobi. Add several thoughts from folks at LCA. |
161 |
|
162 |
AC_DEFUN([PANDORA_VC_INFO_HEADER],[ |
|
163 |
AC_REQUIRE([PANDORA_VC_VERSION]) |
|
164 |
m4_define([PANDORA_VC_PREFIX],m4_toupper(m4_normalize(AC_PACKAGE_NAME))[_]) |
|
165 |
||
166 |
AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[VC_REVNO], [$PANDORA_VC_REVNO], [Version control revision number]) |
|
167 |
AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[VC_REVID], ["$PANDORA_VC_REVID"], [Version control revision ID]) |
|
168 |
AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[VC_BRANCH], ["$PANDORA_VC_BRANCH"], [Version control branch name]) |
|
169 |
AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[RELEASE_DATE], ["$PANDORA_RELEASE_DATE"], [Release date of version control checkout]) |
|
170 |
AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[RELEASE_NODOTS_DATE], [$PANDORA_RELEASE_NODOTS_DATE], [Numeric formatted release date of checkout]) |
|
171 |
AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[RELEASE_COMMENT], ["$PANDORA_RELEASE_COMMENT"], [Set to trunk if the branch is the main $PACKAGE branch]) |
|
172 |
AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[RELEASE_VERSION], ["$PANDORA_RELEASE_VERSION"], [Release date and revision number of checkout]) |
|
173 |
AC_DEFINE_UNQUOTED(PANDORA_VC_PREFIX[RELEASE_ID], [$PANDORA_RELEASE_ID], [Numeric formatted release date and revision number of checkout]) |
|
174 |
]) |