Commit | Line | Data |
---|---|---|
a1267067 | 1 | # Makefile 4.9 84/04/27 |
f067c19e BJ |
2 | # |
3 | # Doing a make install builds /usr/include | |
4 | # | |
5 | # Define SHARED to indicate whether you want | |
6 | # symbolic links to the system source (``symlinks''), | |
7 | # or a separate copy (``copies''). | |
8 | # (latter useful in environments where it's | |
9 | # not possible to keep /sys publicly readable) | |
10 | # | |
11 | # The ``rm -rf''s used below are safe because rm doesn't | |
12 | # follow symbolic links. | |
13 | # | |
14 | DESTDIR= | |
f62b324d | 15 | SUBDIRS=arpa pascal |
034a7ad4 | 16 | STD= a.out.h ar.h assert.h ctype.h curses.h dbm.h ndbm.h \ |
bad5d81a | 17 | disktab.h dumprestor.h fcntl.h fstab.h grp.h \ |
b23cfab3 | 18 | lastlog.h math.h mp.h mtab.h netdb.h nlist.h ptrace.h pwd.h ranlib.h \ |
3c59eff7 | 19 | setjmp.h sgtty.h stab.h stdio.h strings.h \ |
a1267067 | 20 | struct.h syscall.h sysexits.h syslog.h ttyent.h utmp.h varargs.h vfont.h |
f067c19e BJ |
21 | LINKS= errno.h signal.h |
22 | MACHINE=vax | |
23 | MACHDEP=${MACHINE} vaxif vaxmba vaxuba | |
24 | NETDIRS=net netimp netinet netpup | |
25 | SYSDIRS=${NETDIRS} stand ${MACHDEP} | |
26 | SHARED= symlinks | |
27 | ||
28 | all: | |
29 | ||
30 | install: ${SHARED} | |
31 | -for i in ${STD}; do \ | |
b5b1ef6a | 32 | install -c -m 444 $$i ${DESTDIR}/usr/include/$$i; \ |
f067c19e BJ |
33 | done |
34 | -for i in ${SUBDIRS}; do \ | |
35 | if [ ! -d ${DESTDIR}/usr/include/$$i ]; \ | |
36 | then \ | |
37 | mkdir ${DESTDIR}/usr/include/$$i; \ | |
38 | fi; \ | |
f62b324d | 39 | (cd $$i; for j in *.[ih]; do \ |
b5b1ef6a | 40 | install -c -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \ |
f067c19e BJ |
41 | done); \ |
42 | done | |
43 | -for i in ${LINKS}; do \ | |
44 | rm -f ${DESTDIR}/usr/include/$$i; \ | |
45 | ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \ | |
46 | done | |
47 | rm -f ${DESTDIR}/usr/include/machine | |
48 | ln -s ./${MACHINE} ${DESTDIR}/usr/include/machine | |
49 | rm -f ${DESTDIR}/usr/include/frame.h | |
50 | ln -s machine/frame.h ${DESTDIR}/usr/include/frame.h | |
51 | ||
52 | symlinks: | |
53 | for i in ${SYSDIRS}; do \ | |
54 | rm -rf ${DESTDIR}/usr/include/$$i; \ | |
55 | ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \ | |
56 | done | |
57 | rm -rf ${DESTDIR}/usr/include/sys | |
58 | ln -s /sys/h ${DESTDIR}/usr/include/sys | |
59 | ||
60 | copies: | |
61 | for i in ${SYSDIRS}; do \ | |
62 | rm -rf ${DESTDIR}/usr/include/$$i; \ | |
63 | cd /sys; \ | |
64 | tar cf - $$i/*.h | (cd /usr/include; tar xpf -); \ | |
65 | done | |
66 | rm -rf ${DESTDIR}/usr/include/sys; | |
67 | mkdir ${DESTDIR}/usr/include/sys; | |
b5b1ef6a | 68 | chmod 775 ${DESTDIR}/usr/include/sys; |
f067c19e BJ |
69 | (cd /sys/h; tar cf - *.h | (cd ${DESTDIR}/usr/include/sys; tar xpf -)) |
70 | ||
71 | clean: |