summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <anholt@freebsd.org>2004-06-11 17:59:30 +0000
committerEric Anholt <anholt@freebsd.org>2004-06-11 17:59:30 +0000
commite3174f16ac5aabc0da0c22c79b138103eaba0c28 (patch)
tree1a6a9d81612a59b17acdd83a8ec9855362154361
parent73f12a29fbfdac7f1cb7956f32564e253e313527 (diff)
Allow overriding of os version with OSREL env var on FreeBSD. Used in theXORG-6_7_99_1COMPOSITEWRAP
ports cluster and cross-version testing.
-rw-r--r--imake.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/imake.c b/imake.c
index 49867cc..04e0fec 100644
--- a/imake.c
+++ b/imake.c
@@ -1450,6 +1450,21 @@ define_os_defaults(FILE *inFile)
name = &uts_name;
}
#endif
+# ifdef __FreeBSD__
+ /* Override for compiling in chroot of other OS version, such as
+ * in the bento build cluster.
+ */
+ {
+ char *e;
+ if ((e = getenv("OSREL")) != NULL &&
+ strlen(name->sysname) + strlen(e) + 1 < SYS_NMLN) {
+ strcpy(name->release, e);
+ strcpy(name->version, name->sysname);
+ strcat(name->version, " ");
+ strcat(name->version, e);
+ }
+ }
+# endif
# if defined DEFAULT_OS_NAME
# if defined CROSSCOMPILE