cvs commit: src/include Makefile
Takahashi Yoshihiro
nyan at jp.FreeBSD.org
Fri Apr 1 22:37:58 PST 2005
In article <200504012322.j31NM1PJ094234 at repoman.freebsd.org>
Warner Losh <imp at FreeBSD.org> writes:
> imp 2005-04-01 23:22:01 UTC
>
> FreeBSD src repository
>
> Modified files:
> include Makefile
> Log:
> When $MACHINE != $MACHINE_ARCH, install $MACHINE_ARCH/include into
> /usr/include/$MACHINE_ARCH in addition to installing $MACHINE/include
> into /usr/include/machine.
I found some problems to create /usr/include/$MACHINE_ARCH and build
the boot2 and kernel modules. The attached patch fix them. If it's
no problem, please commit it.
Very thanks for your work.
---
TAKAHASHI Yoshihiro <nyan at jp.FreeBSD.org>
-------------- next part --------------
Index: src/include/Makefile
===================================================================
RCS file: /home/ncvs/src/include/Makefile,v
retrieving revision 1.238
diff -u -r1.238 Makefile
--- src/include/Makefile 1 Apr 2005 23:22:01 -0000 1.238
+++ src/include/Makefile 2 Apr 2005 06:09:31 -0000
@@ -162,10 +162,14 @@
${DESTDIR}${INCLUDEDIR}/machine/pc
.endif
.if defined(_MARCH)
+ ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
+ ${DESTDIR}${INCLUDEDIR}/${_MARCH} \
cd ${.CURDIR}/../sys/${_MARCH}/include; \
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
${DESTDIR}${INCLUDEDIR}/${_MARCH}
.if exists(${.CURDIR}/../sys/${_MARCH}/include/pc)
+ ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
+ ${DESTDIR}${INCLUDEDIR}/${_MARCH}/pc \
cd ${.CURDIR}/../sys/${_MARCH}/include/pc; \
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
${DESTDIR}${INCLUDEDIR}/${_MARCH}/pc
@@ -240,12 +244,16 @@
done
.endif
.if defined(_MARCH)
+ ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
+ ${DESTDIR}${INCLUDEDIR}/${_MARCH} \
cd ${.CURDIR}/../sys/${_MARCH}/include; \
for h in *.h; do \
ln -fs ../../../sys/${_MARCH}/include/$$h \
${DESTDIR}${INCLUDEDIR}/${_MARCH}; \
done
.if exists(${.CURDIR}/../sys/${_MARCH}/include/pc)
+ ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
+ ${DESTDIR}${INCLUDEDIR}/${_MARCH}/pc \
cd ${.CURDIR}/../sys/${_MARCH}/include/pc; \
for h in *.h; do \
ln -fs ../../../../sys/${_MARCH}/include/pc/$$h \
Index: src/sys/boot/pc98/boot2/Makefile
===================================================================
RCS file: /home/ncvs/src/sys/boot/pc98/boot2/Makefile,v
retrieving revision 1.21
diff -u -r1.21 Makefile
--- src/sys/boot/pc98/boot2/Makefile 21 Dec 2004 09:59:44 -0000 1.21
+++ src/sys/boot/pc98/boot2/Makefile 2 Apr 2005 05:47:58 -0000
@@ -92,15 +92,23 @@
boot1 boot2 ${DESTDIR}${BINDIR}
# If it's not there, don't consider it a target
-.if exists(${.CURDIR}/../../../i386/include)
+.if exists(${.CURDIR}/../../../pc98/include)
beforedepend ${OBJS}: machine
machine:
- ln -sf ${.CURDIR}/../../../i386/include machine
+ ln -sf ${.CURDIR}/../../../pc98/include machine
.endif
-CLEANFILES+= machine
+.if exists(${.CURDIR}/../../../i386/include)
+beforedepend ${OBJS}: i386
+
+i386:
+ ln -sf ${.CURDIR}/../../../i386/include i386
+
+.endif
+
+CLEANFILES+= machine i386
.include "${.CURDIR}/../../../conf/kern.mk"
.include <bsd.prog.mk>
Index: src/sys/conf/Makefile.pc98
===================================================================
RCS file: /home/ncvs/src/sys/conf/Makefile.pc98,v
retrieving revision 1.164
diff -u -r1.164 Makefile.pc98
--- src/sys/conf/Makefile.pc98 1 Apr 2005 22:56:10 -0000 1.164
+++ src/sys/conf/Makefile.pc98 2 Apr 2005 05:12:45 -0000
@@ -30,7 +30,6 @@
.endif
.include "$S/conf/kern.pre.mk"
-EXTRA_KERNELDEP=rm -f ./machine ; ln -s $S/$M/include ./machine
MKMODULESENV+= MACHINE=pc98
%BEFORE_DEPEND
Index: src/sys/conf/kern.post.mk
===================================================================
RCS file: /home/ncvs/src/sys/conf/kern.post.mk,v
retrieving revision 1.77
diff -u -r1.77 kern.post.mk
--- src/sys/conf/kern.post.mk 29 Mar 2005 11:23:25 -0000 1.77
+++ src/sys/conf/kern.post.mk 2 Apr 2005 05:12:46 -0000
@@ -139,9 +139,6 @@
${SYSTEM_OBJS} genassym.o vers.o: opt_global.h
kernel-depend:
-.if defined(EXTRA_KERNELDEP)
- ${EXTRA_KERNELDEP}
-.endif
rm -f .olddep
if [ -f .depend ]; then mv .depend .olddep; fi
${MAKE} _kernel-depend
Index: src/sys/conf/kmod.mk
===================================================================
RCS file: /home/ncvs/src/sys/conf/kmod.mk,v
retrieving revision 1.186
diff -u -r1.186 kmod.mk
--- src/sys/conf/kmod.mk 30 Mar 2005 12:03:37 -0000 1.186
+++ src/sys/conf/kmod.mk 2 Apr 2005 05:13:08 -0000
@@ -188,6 +188,9 @@
.endif
_ILINKS=@ machine
+.if ${MACHINE} != ${MACHINE_ARCH}
+_ILINKS+=${MACHINE_ARCH}
+.endif
all: objwarn ${PROG}
@@ -213,8 +216,10 @@
${_ILINKS}:
@case ${.TARGET} in \
- machine) \
+ ${MACHINE_ARCH}) \
path=${SYSDIR}/${MACHINE_ARCH}/include ;; \
+ machine) \
+ path=${SYSDIR}/${MACHINE}/include ;; \
@) \
path=${SYSDIR} ;; \
esac ; \
More information about the cvs-src
mailing list