I find that if you put:
.EXPORT_ALL_VARIABLES:
... into debian/rules, the DH_VERBOSE=1 starts to function.
Also, to put a version string into a program, I use:
VERSION=$(shell dpkg-parsechangelog 2>/dev/null \
| gawk -F: \
'$$1 ~ /Version/ {version = gensub(/^ */,"",g,$$2)} \
END { printf("%s_SPI", version) }')
build-stamp:
dh_testdir
$(MAKE) VERSION=$(VERSION)
touch build-stamp
... and then I use the VERSION in the C like this:
void
printCopyright (void)
{
fprintf (stderr,
"tmpreaper -- Version: " VERSION "\n"
"(c) 1997 Software in the Public Interest\n"
"This may be freely redistributed under the terms of the GNU Public License.\n");
}
// 1 2 3 4 5 6 7 8
// 02345678901234567890123456789012345678901234567890123456789012345678901234567890
$ tmpreaper --help
tmpreaper -- Version: 1.4.1-1_SPI
(c) 1997 Software in the Public Interest
This may be freely redistributed under the terms of the GNU Public License.
tmpreaper [-htvfsa] [--help] [--test] [--verbose] [--force] [--symlinks] [--all]
[[-p, --protect <shell_pattern>]...] <time> <dirs>...
<time> is time since a file in a <dir> was last accessed.
It defaults to hours, or you may suffix with `s', `m', `h', or `d'.
... or like:
browser-history: browser-history.c
$(CC) -ansi -O -Wall browser-history.c -o browser-history \
-D_VERSION=\"$(VERSION)\" -L/usr/X11R6/lib -lXmu -lX11
... and then in the C program:
static char VERSION[]=_VERSION;
[...]
case 'V': /* -Version */
fprintf(stderr, "browser-history v%s\n%s\n", VERSION, RCS_ID);
exit(0);
continue;
$ ./browser-history -V
browser-history v2.4-4_SPI
$Id: browser-history.c,v 1.1.1.1.2.3 1997/12/20 17:44:18 karlheg Exp $
Any ideas?
--
mailto:karlheg@bittersweet.inetarena.com (Karl M. Hegbloom)
http://www.inetarena.com/~karlheg
Portland, OR USA
Debian GNU 1.3.1+hamm Linux 2.0.32 AMD K5 PR-133
Attachment:
pgps3zGsy1U0l.pgp
Description: PGP signature