Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jan 2003 23:38:56 +0900 (JST)
From:      Takahashi Yoshihiro <nyan@jp.FreeBSD.org>
To:        jmallett@FreeBSD.ORG, obrien@FreeBSD.ORG
Cc:        current@FreeBSD.ORG, peter@FreeBSD.ORG, ru@FreeBSD.ORG
Subject:   Re: Patch to teach config(8) about "platforms".
Message-ID:  <20030128.233856.71130419.nyan@jp.FreeBSD.org>
In-Reply-To: <20030125153116.A25743@FreeBSD.org>
References:  <20030125153116.A25743@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <20030125153116.A25743@FreeBSD.org>
Juli Mallett <jmallett@FreeBSD.ORG> writes:

> For example "platform sgimips" implies
> "options SGIMIPS".  Below are patches to makefile glue and config(8)
> itself.

I think that using '#ifdef <machine>' (like #ifdef PC98) is not a good
idea.  If it requires, the file should be splited into sys/<machine>.
I'll split some files in sys/i386 into sys/pc98.


> For clarity, this is used in cases where the platform may define its
> own values that a header needs, and as such, you might see something
> in <machine/endian.h> like:
> #include <platform/endian.h>

How about next way?

- Install sys/${MACHINE}/include into /usr/include/${MACHINE}
- Symlink /usr/include/machine -> /usr/include/${MACHINE}
- If ${MACHINE} != ${MACHINE_ARCH},
  install sys/${MACHINE_ARCH}/include into /usr/include/${MACHINE_ARCH}

For example, sys/pc98/include/endian.h is '#include <i386/endian.h>'
only.

---
TAKAHASHI Yoshihiro <nyan@FreeBSD.org>

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




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