[BusyBox] [PATCH] EXTRA_VERSION

Bastian Blank waldi at debian.org
Thu Jan 1 12:54:13 UTC 2004


hi folks

i use the following patch to add the debian package version instead of
the rather useless buildtime to the attribution line. maybe it will be
usefull for other packagers as well.

bastian

-- 
It is undignified for a woman to play servant to a man who is not hers.
		-- Spock, "Amok Time", stardate 3372.7
-------------- next part --------------
Index: scripts/config/confdata.c
===================================================================
--- scripts/config/confdata.c	(revision 132)
+++ scripts/config/confdata.c	(revision 133)
@@ -292,16 +292,21 @@
 	fprintf(out, "#\n"
 		     "# Automatically generated make config: don't edit\n"
 		     "#\n");
-	if (out_h)
+	if (out_h) {
 		fprintf(out_h, "/*\n"
 			     " * Automatically generated header file: don't edit\n"
 			     " */\n\n"
 			     "#define AUTOCONF_INCLUDED\n\n"
 			     "/* Version Number */\n"
 			     "#define BB_VER \"%s\"\n"
-			     "#define BB_BT \"%s\"\n\n",
+			     "#define BB_BT \"%s\"\n",
 			     getenv("VERSION"),
 			     getenv("BUILDTIME"));
+		if (getenv("EXTRA_VERSION"))
+			fprintf(out_h, "#define BB_EXTRA_VERSION \"%s\"\n",
+				     getenv("EXTRA_VERSION"));
+		fprintf(out_h, "\n");
+	}
 
 	if (!sym_change_count)
 		sym_clear_all_valid();
Index: include/busybox.h
===================================================================
--- include/busybox.h	(revision 132)
+++ include/busybox.h	(revision 133)
@@ -37,7 +37,11 @@
 #endif
 #endif
 
+#ifndef BB_EXTRA_VERSION
 #define BB_BANNER "BusyBox v" BB_VER " (" BB_BT ")"
+#else
+#define BB_BANNER "BusyBox v" BB_VER " (" BB_EXTRA_VERSION ")"
+#endif
 
 #ifdef DMALLOC
 #include <dmalloc.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.busybox.net/pipermail/busybox/attachments/20040101/e7260f8f/attachment-0002.pgp 


More information about the busybox mailing list