From owner-p4-projects Fri Feb 14 3: 4:34 2003 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A8AA637B405; Fri, 14 Feb 2003 03:04:31 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 390F137B401 for ; Fri, 14 Feb 2003 03:04:31 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D954C43FAF for ; Fri, 14 Feb 2003 03:04:30 -0800 (PST) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h1EB4Ubv009947 for ; Fri, 14 Feb 2003 03:04:30 -0800 (PST) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h1EB4US4009944 for perforce@freebsd.org; Fri, 14 Feb 2003 03:04:30 -0800 (PST) Date: Fri, 14 Feb 2003 03:04:30 -0800 (PST) Message-Id: <200302141104.h1EB4US4009944@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett Subject: PERFORCE change 25158 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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