Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Feb 2003 03:04:30 -0800 (PST)
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 25158 for review
Message-ID:  <200302141104.h1EB4US4009944@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=25158

Change 25158 by jmallett@jmallett_dalek on 2003/02/14 03:04:30

	Support a %PLATFORM directive in a Makefile, to define the PLATFORM
	variable inside a Makefile.  We need this :)  Use it.

Affected files ...

.. //depot/projects/mips/sys/conf/Makefile.mips#5 edit
.. //depot/projects/mips/usr.sbin/config/mkmakefile.c#2 edit

Differences ...

==== //depot/projects/mips/sys/conf/Makefile.mips#5 (text+ko) ====

@@ -19,6 +19,10 @@
 # Which version of config(8) is required.
 %VERSREQ=	500011
 
+# We support multiple platforms, and would do well to have a variable for
+# the platform we are building for.
+%PLATFORM
+
 # Temporary stuff while we're still embryonic
 NO_MODULES?=	yes
 

==== //depot/projects/mips/usr.sbin/config/mkmakefile.c#2 (text+ko) ====

@@ -77,6 +77,7 @@
 static void do_xxfiles(char *, FILE *);
 static void do_objs(FILE *);
 static void do_before_depend(FILE *);
+static void do_platform(FILE *);
 static int opteq(const char *, const char *);
 static void read_files(void);
 
@@ -183,7 +184,9 @@
 				fprintf(stderr, "conventions\n\n");
 				exit(1);
 			}
-		} else
+		} else if (eq(line, "%PLATFORM\n"))
+			do_platform(ofp);
+		else
 			fprintf(stderr,
 			    "Unknown %% construct in generic makefile: %s",
 			    line);
@@ -771,6 +774,12 @@
 		putc('\n', fp);
 }
 
+static void
+do_platform(FILE *fp)
+{
+	fprintf(fp, "PLATFORM=%s\n", platformname);
+}
+
 char *
 raisestr(char *str)
 {

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302141104.h1EB4US4009944>