summaryrefslogtreecommitdiffstats
path: root/include/Makefile
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>1999-12-09 09:35:36 +0000
committermarcel <marcel@FreeBSD.org>1999-12-09 09:35:36 +0000
commit78dcb3a4bcf2f27f6bb93edb5bf282b8943fed56 (patch)
tree9f79e2c38a4300bea7c9890dbdaa0774a5c69f82 /include/Makefile
parentd2ada32bc048622b4dfbb5b651af0154b4821486 (diff)
downloadFreeBSD-src-78dcb3a4bcf2f27f6bb93edb5bf282b8943fed56.zip
FreeBSD-src-78dcb3a4bcf2f27f6bb93edb5bf282b8943fed56.tar.gz
Revert previous commit.
Requested by: bde
Diffstat (limited to 'include/Makefile')
-rw-r--r--include/Makefile83
1 files changed, 58 insertions, 25 deletions
diff --git a/include/Makefile b/include/Makefile
index 45ee3ca..7ed6b41 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -2,6 +2,9 @@
# $FreeBSD$
#
# Doing a make install builds /usr/include
+#
+# The ``rm -rf''s used below are safe because rm doesn't follow symbolic
+# links.
CLEANFILES= osreldate.h version vers.c
SUBDIR= rpcsvc
@@ -32,14 +35,24 @@ MFILES= float.h floatingpoint.h stdarg.h varargs.h
# posix4/aio.h conflicts with dysons and isn't installed:
PFILES= mqueue.h sched.h semaphore.h # aio.h
-SFILES= joystick.h soundcard.h
+# Only for default SHARED=copies case
+SFILES= soundcard.h joystick.h
LFILES= aio.h errno.h fcntl.h inttypes.h linker_set.h poll.h syslog.h \
termios.h ucontext.h
-LDIRS= cam cam/scsi isofs/cd9660 msdosfs net netatalk netatm netgraph \
- netinet netinet6 netipx netkey netncp netns nfs ntfs nwfs pccard \
- posix4 sys ufs/ffs ufs/mfs ufs/ufs vm
+LDIRS= cam msdosfs net netatalk netatm netgraph netinet netinet6 \
+ netipx netkey netncp netns nfs ntfs nwfs pccard posix4 sys vm
+
+LNOHEADERDIRS= isofs ufs
+LSUBDIRS= isofs/cd9660 ufs/ffs ufs/mfs ufs/ufs cam/scsi
+
+# Define SHARED to indicate whether you want symbolic links to the system
+# source (``symlinks''), or a separate copy (``copies''). ``symlinks'' is
+# probably only useful for developers and should be avoided if you do not
+# wish to tie your /usr/include and /usr/src together.
+#SHARED= symlinks
+SHARED?= copies
all: osreldate.h
@@ -52,31 +65,23 @@ osreldate.h: ${.CURDIR}/../sys/conf/newvers.sh \
echo \#'undef __FreeBSD_version' >> osreldate.h; \
echo \#'define __FreeBSD_version' $$RELDATE >> osreldate.h
-beforeinstall:
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${.OBJDIR}/osreldate.h \
- ${DESTDIR}/usr/include
+beforeinstall: ${SHARED}
+ @rm -f ${DESTDIR}/usr/include/timepps.h
cd ${.CURDIR}; \
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${FILES} \
- ${DESTDIR}/usr/include
+ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+ ${FILES} ${DESTDIR}/usr/include
cd ${.CURDIR}/arpa; \
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${ARPAFILES} \
- ${DESTDIR}/usr/include/arpa
+ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+ ${ARPAFILES} ${DESTDIR}/usr/include/arpa
cd ${.CURDIR}/protocols; \
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${PROTOFILES} \
- ${DESTDIR}/usr/include/protocols
+ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+ ${PROTOFILES} ${DESTDIR}/usr/include/protocols
cd ${.CURDIR}/rpc; \
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 ${RPCFILES} \
- ${DESTDIR}/usr/include/rpc
-.for i in ${LDIRS}
- cd ${.CURDIR}/../sys; \
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \
- ${DESTDIR}/usr/include/$i
-.endfor
-.if exists(${.CURDIR}/../sys/${MACHINE_ARCH}/include)
- cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include; \
- ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
- ${DESTDIR}/usr/include/machine
-.endif
+ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+ ${RPCFILES} ${DESTDIR}/usr/include/rpc
+ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 \
+ ${.OBJDIR}/osreldate.h \
+ ${DESTDIR}/usr/include
.for i in ${LFILES}
ln -sf sys/$i ${DESTDIR}/usr/include/$i
.endfor
@@ -86,8 +91,36 @@ beforeinstall:
.for i in ${PFILES}
ln -sf posix4/$i ${DESTDIR}/usr/include/$i
.endfor
+
+copies:
+.for i in ${LDIRS} ${LNOHEADERDIRS} machine
+ if [ -h ${DESTDIR}/usr/include/$i ]; then \
+ rm -f ${DESTDIR}/usr/include/$i; \
+ fi
+.endfor
+ mtree -deU -f ${.CURDIR}/../etc/mtree/BSD.include.dist \
+ -p ${DESTDIR}/usr/include
+.for i in ${LDIRS} ${LSUBDIRS}
+ cd ${.CURDIR}/../sys; \
+ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \
+ ${DESTDIR}/usr/include/$i
+.endfor
+.if exists(${.CURDIR}/../sys/${MACHINE_ARCH}/include)
+ cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include; \
+ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
+ ${DESTDIR}/usr/include/machine
+.endif
.for i in ${SFILES}
ln -sf ../sys/$i ${DESTDIR}/usr/include/machine/$i
.endfor
+symlinks:
+ @${ECHO} "Setting up symlinks to kernel source tree..."
+.for i in ${LDIRS} ${LNOHEADERDIRS}
+ rm -rf ${DESTDIR}/usr/include/$i
+ ln -s ../../sys/$i ${DESTDIR}/usr/include/$i
+.endfor
+ rm -rf ${DESTDIR}/usr/include/machine
+ ln -s ../../sys/${MACHINE_ARCH}/include ${DESTDIR}/usr/include/machine
+
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud