In usual buildworld, we have absolute symbolic links in $MAKEOBJDIR.
This causes built $MAKEOBJDIR can use to install the world on other
boxen only if same /usr/src (or etc.) location and same $MAKEOBJDIR.

I'm using this patch for months to avoid this situation.

(1) Copy man pages rather than absolute symlinks.
(2) Use correct dependency in sys/boot/i386/kgzldr.


I'll commit this if noone objects.


Index: bin/csh/Makefile
===================================================================
RCS file: /home/ncvs/src/bin/csh/Makefile,v
retrieving revision 1.30
diff -u -r1.30 Makefile
--- bin/csh/Makefile    2 May 2003 06:39:13 -0000       1.30
+++ bin/csh/Makefile    2 May 2003 15:01:02 -0000
@@ -73,7 +73,7 @@
 .endfor
 
 csh.1: tcsh.man
-       ln -sf ${.ALLSRC} ${.TARGET}
+       cp ${.ALLSRC} ${.TARGET}
 
 build-tools: gethost
 
Index: gnu/usr.bin/cc/cpp/Makefile
===================================================================
RCS file: /home/ncvs/src/gnu/usr.bin/cc/cpp/Makefile,v
retrieving revision 1.22
diff -u -r1.22 Makefile
--- gnu/usr.bin/cc/cpp/Makefile 5 Jun 2002 21:30:45 -0000       1.22
+++ gnu/usr.bin/cc/cpp/Makefile 23 Jan 2003 23:20:00 -0000
@@ -17,6 +17,6 @@
 CLEANFILES= cpp.1
 
 cpp.1: cccp.1
-       ln -sf ${.ALLSRC} ${.TARGET}
+       cp ${.ALLSRC} ${.TARGET}
 
 .include <bsd.prog.mk>
Index: gnu/usr.bin/cc/f77/Makefile
===================================================================
RCS file: /home/ncvs/src/gnu/usr.bin/cc/f77/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- gnu/usr.bin/cc/f77/Makefile 9 Jun 2002 00:03:56 -0000       1.19
+++ gnu/usr.bin/cc/f77/Makefile 23 Jan 2003 23:20:10 -0000
@@ -18,6 +18,6 @@
 CLEANFILES= f77.1
 
 f77.1: g77.1
-       ln -sf ${.ALLSRC} ${.TARGET}
+       cp ${.ALLSRC} ${.TARGET}
 
 .include <bsd.prog.mk>
Index: lib/libform/Makefile
===================================================================
RCS file: /home/ncvs/src/lib/libform/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- lib/libform/Makefile        21 May 2002 07:08:30 -0000      1.7
+++ lib/libform/Makefile        23 Jan 2003 13:45:48 -0000
@@ -45,7 +45,7 @@
 CLEANFILES+=${page:T:S/x$//g}
 MAN+=${page:T:S/x$//g}
 ${page:T:S/x$//g}: ${page}
-       ln -s ${.ALLSRC} ${.TARGET}
+       cp ${.ALLSRC} ${.TARGET}
 .endfor
 
 MLINKS+=form_cursor.3 pos_form_cursor.3
Index: lib/libmenu/Makefile
===================================================================
RCS file: /home/ncvs/src/lib/libmenu/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- lib/libmenu/Makefile        21 May 2002 07:08:30 -0000      1.9
+++ lib/libmenu/Makefile        23 Jan 2003 13:46:03 -0000
@@ -42,7 +42,7 @@
 CLEANFILES+=${page:T:S/x$//g}
 MAN+=${page:T:S/x$//g}
 ${page:T:S/x$//g}: ${page}
-       ln -s ${.ALLSRC} ${.TARGET}
+       cp ${.ALLSRC} ${.TARGET}
 .endfor
 
 MLINKS+=menu_attributes.3 menu_back.3 menu_attributes.3 menu_fore.3 \
Index: lib/libncurses/Makefile
===================================================================
RCS file: /home/ncvs/src/lib/libncurses/Makefile,v
retrieving revision 1.69
diff -u -r1.69 Makefile
--- lib/libncurses/Makefile     30 Apr 2003 15:49:40 -0000      1.69
+++ lib/libncurses/Makefile     1 May 2003 22:54:23 -0000
@@ -410,7 +410,7 @@
 CLEANFILES+=${page:T:S/x$//g}
 MAN+=${page:T:S/x$//g}
 ${page:T:S/x$//g}: ${page}
-       ln -sf ${.ALLSRC} ${.TARGET}
+       cp ${.ALLSRC} ${.TARGET}
 .endfor
 
 MLINKS+=ncurses.3 curses.3
Index: lib/libpanel/Makefile
===================================================================
RCS file: /home/ncvs/src/lib/libpanel/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- lib/libpanel/Makefile       21 May 2002 05:41:07 -0000      1.8
+++ lib/libpanel/Makefile       23 Jan 2003 13:46:33 -0000
@@ -32,7 +32,7 @@
 CLEANFILES+=   panel.3
 MAN=           panel.3
 panel.3: panel.3x
-       ln -s ${.ALLSRC} ${.TARGET}
+       cp ${.ALLSRC} ${.TARGET}
 
 MLINKS+=panel.3 bottom_panel.3 panel.3 del_panel.3 panel.3 hide_panel.3 \
        panel.3 move_panel.3 panel.3 new_panel.3 panel.3 panel_above.3 \
Index: sys/boot/i386/kgzldr/Makefile
===================================================================
RCS file: /home/ncvs/src/sys/boot/i386/kgzldr/Makefile,v
retrieving revision 1.12
diff -u -r1.12 Makefile
--- sys/boot/i386/kgzldr/Makefile       30 Sep 2002 20:37:57 -0000      1.12
+++ sys/boot/i386/kgzldr/Makefile       24 Jan 2003 07:01:52 -0000
@@ -1,8 +1,10 @@
 # $FreeBSD: src/sys/boot/i386/kgzldr/Makefile,v 1.12 2002/09/30 20:37:57 peter Exp $
 
-FILES= kgzldr.o
+PROG=  kgzldr.o
+NOMAN=
+STRIP=
+BINMODE=444
 SRCS=  start.s boot.c inflate.c lib.c crt.s sio.s
-OBJS=  ${SRCS:N*.h:R:S/$/.o/g}
 CFLAGS=        -ffreestanding
 CFLAGS+=-Os
 CFLAGS+=-DKZIP
@@ -15,7 +17,9 @@
 BOOT_COMCONSOLE_PORT?= 0x3f8
 AFLAGS+=--defsym SIO_PRT=${BOOT_COMCONSOLE_PORT}
 
-kgzldr.o: ${OBJS}
-       ${CC} ${LDFLAGS} -o ${.TARGET} ${OBJS}
+.if target(${PROG})
+CFLAGS=        ${LDFLAGS}
+LDADD= 
+.endif
 
 .include <bsd.prog.mk>
Index: usr.bin/awk/Makefile
===================================================================
RCS file: /home/ncvs/src/usr.bin/awk/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- usr.bin/awk/Makefile        17 Mar 2003 08:07:54 -0000      1.10
+++ usr.bin/awk/Makefile        17 Mar 2003 15:24:24 -0000
@@ -27,6 +27,6 @@
 
 CLEANFILES+=   nawk.1
 nawk.1: awk.1
-       ln -sf ${.ALLSRC} ${.TARGET}
+       cp ${.ALLSRC} ${.TARGET}
 
 .include <bsd.prog.mk>
Index: usr.bin/less/Makefile.common
===================================================================
RCS file: /home/ncvs/src/usr.bin/less/Makefile.common,v
retrieving revision 1.3
diff -u -r1.3 Makefile.common
--- usr.bin/less/Makefile.common        3 Jun 2000 11:39:36 -0000       1.3
+++ usr.bin/less/Makefile.common        23 Jan 2003 23:22:06 -0000
@@ -8,4 +8,4 @@
 .SUFFIXES: .nro .1
 
 .nro.1:
-       ln -s ${.IMPSRC} ${.TARGET}
+       cp ${.IMPSRC} ${.TARGET}


-- 
Jun Kuriyama <[EMAIL PROTECTED]> // IMG SRC, Inc.
             <[EMAIL PROTECTED]> // FreeBSD Project
_______________________________________________
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to