Patch from Bastian Blank, allow the buildtime to be overriden with a
authorGlenn L McGrath <bug1@ihug.co.nz>
Tue, 13 Jan 2004 10:57:32 +0000 (10:57 -0000)
committerGlenn L McGrath <bug1@ihug.co.nz>
Tue, 13 Jan 2004 10:57:32 +0000 (10:57 -0000)
different string, used by the debian busybox-cvs to specify the debian
date based version number.

include/busybox.h
scripts/config/confdata.c

index aaa844f43721d68884b1377512c4eb723eacf4a7..28ea2530f5645be2ae2913fa1c831657dbfe4ac1 100644 (file)
 #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>
index 768f771d0d88aa6d0fb3d00070bb6952c74be0ef..aca6864cced888b74d3329bd9ee286b97599c75d 100644 (file)
@@ -292,16 +292,21 @@ int conf_write(const char *name)
        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();