Changeset View
Standalone View
include/Makefile
# @(#)Makefile 8.2 (Berkeley) 1/4/94 | # @(#)Makefile 8.2 (Berkeley) 1/4/94 | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
# | # | ||||
# Doing a "make install" builds /usr/include. | # Doing a "make install" builds /usr/include. | ||||
.include <src.opts.mk> | .include <src.opts.mk> | ||||
PACKAGE=runtime | PACKAGE=runtime | ||||
CLEANFILES= osreldate.h version | CLEANFILES= osreldate.h version | ||||
SUBDIR= arpa protocols rpcsvc rpc xlocale | SUBDIR= arpa protocols rpcsvc rpc xlocale | ||||
.if ${MACHINE_CPUARCH} == "amd64" | .if ${MACHINE_CPUARCH} == "amd64" | ||||
SUBDIR+= i386 | SUBDIR+= i386 | ||||
INCLUDE_SUBDIRS+= i386 | |||||
.endif | .endif | ||||
.if ${MACHINE_CPUARCH} == "aarch64" | |||||
SUBDIR+= arm | |||||
jrtc27: You can just `SUBDIR+=${INCUDE_SUBDIRS}` outside the ifs rather than duplicate each directory… | |||||
Done Inline ActionsI didn't want to assume that the source directory and the install directory had the same name. I didn't use the same name for INCLUDE_SUBDIRS because this is not necessarily related to LIBCOMPAT. karels: I didn't want to assume that the source directory and the install directory had the same name. | |||||
INCLUDE_SUBDIRS+= arm | |||||
.endif | |||||
SUBDIR_PARALLEL= | SUBDIR_PARALLEL= | ||||
INCS= a.out.h ar.h assert.h bitstring.h byteswap.h \ | INCS= a.out.h ar.h assert.h bitstring.h byteswap.h \ | ||||
complex.h cpio.h _ctype.h ctype.h \ | complex.h cpio.h _ctype.h ctype.h \ | ||||
Done Inline ActionsIs there some way to make this more generic... imp: Is there some way to make this more generic...
Maybe ala jrtc23's suggestions of defining a… | |||||
Done Inline ActionsI was going to put the list of LIBCOMPAT_INCLUDE_DIRS in a mk file like bsd.compat.mk, but that isn't included in the places that use this. I think that in this case, it probably isn't worth defining a list here and using it in just one place. Better ideas appreciated. karels: I was going to put the list of LIBCOMPAT_INCLUDE_DIRS in a mk file like bsd.compat.mk, but that… | |||||
Done Inline ActionsI know it's only one duplicated line below but I do think it would be better to have a similar approach to Makefile.inc1 here jrtc27: I know it's only one duplicated line below but I do think it would be better to have a similar… | |||||
db.h \ | db.h \ | ||||
dirent.h dlfcn.h elf.h elf-hints.h endian.h err.h fmtmsg.h fnmatch.h \ | dirent.h dlfcn.h elf.h elf-hints.h endian.h err.h fmtmsg.h fnmatch.h \ | ||||
fstab.h fts.h ftw.h getopt.h glob.h grp.h \ | fstab.h fts.h ftw.h getopt.h glob.h grp.h \ | ||||
ieeefp.h ifaddrs.h \ | ieeefp.h ifaddrs.h \ | ||||
inttypes.h iso646.h kenv.h langinfo.h libgen.h limits.h link.h \ | inttypes.h iso646.h kenv.h langinfo.h libgen.h limits.h link.h \ | ||||
locale.h malloc.h malloc_np.h memory.h monetary.h mpool.h mqueue.h \ | locale.h malloc.h malloc_np.h memory.h monetary.h mpool.h mqueue.h \ | ||||
ndbm.h netconfig.h \ | ndbm.h netconfig.h \ | ||||
netdb.h nl_types.h nlist.h nss.h nsswitch.h paths.h \ | netdb.h nl_types.h nlist.h nss.h nsswitch.h paths.h \ | ||||
▲ Show 20 Lines • Show All 323 Lines • ▼ Show 20 Lines | |||||
# Note: The "|| true" after find is needed in case one of the directories does | # Note: The "|| true" after find is needed in case one of the directories does | ||||
# not exist (yet). | # not exist (yet). | ||||
compat: | compat: | ||||
cd ${SDESTDIR}${INCLUDEDIR}; find ${LDIRS} ${LSUBDIRS} machine ${_MARCHS} \ | cd ${SDESTDIR}${INCLUDEDIR}; find ${LDIRS} ${LSUBDIRS} machine ${_MARCHS} \ | ||||
crypto -maxdepth 0 -mindepth 0 -type l -print -delete || true | crypto -maxdepth 0 -mindepth 0 -type l -print -delete || true | ||||
mtree -deU ${NO_ROOT:D-W} ${MTREE_FOLLOWS_SYMLINKS} \ | mtree -deU ${NO_ROOT:D-W} ${MTREE_FOLLOWS_SYMLINKS} \ | ||||
-f ${SRCTOP}/etc/mtree/BSD.include.dist \ | -f ${SRCTOP}/etc/mtree/BSD.include.dist \ | ||||
-p ${SDESTDIR}${INCLUDEDIR} > /dev/null | -p ${SDESTDIR}${INCLUDEDIR} > /dev/null | ||||
.if ${MACHINE_CPUARCH} == "amd64" | .for d in ${INCLUDE_SUBDIRS} | ||||
${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \ | ${INSTALL} -d ${TAG_ARGS} -o ${BINOWN} -g ${BINGRP} -m 755 \ | ||||
${SDESTDIR}${INCLUDEDIR}/i386 | ${SDESTDIR}${INCLUDEDIR}/${d} | ||||
.endif | .endfor | ||||
copies: .PHONY .META | copies: .PHONY .META | ||||
cd ${SDESTDIR}${INCLUDEDIR}; find ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto \ | cd ${SDESTDIR}${INCLUDEDIR}; find ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} crypto \ | ||||
machine machine/pc ${_MARCHS} -maxdepth 1 -mindepth 1 -type l \ | machine machine/pc ${_MARCHS} -maxdepth 1 -mindepth 1 -type l \ | ||||
-name "*.h" -print -delete || true | -name "*.h" -print -delete || true | ||||
.for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/evdev:Ndev/hid:Ndev/hyperv:Ndev/pci:Ndev/veriexec:Ndev/wg} ${LSUBSUBDIRS} | .for i in ${LDIRS} ${LSUBDIRS:Ndev/agp:Ndev/acpica:Ndev/evdev:Ndev/hid:Ndev/hyperv:Ndev/pci:Ndev/veriexec:Ndev/wg} ${LSUBSUBDIRS} | ||||
cd ${SRCTOP}/sys; \ | cd ${SRCTOP}/sys; \ | ||||
${INSTALL} -C ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ | ${INSTALL} -C ${TAG_ARGS:D${TAG_ARGS},dev} -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ | ||||
▲ Show 20 Lines • Show All 139 Lines • Show Last 20 Lines |
You can just SUBDIR+=${INCUDE_SUBDIRS} outside the ifs rather than duplicate each directory name. Though why not use the same variable name as Makefile.inc1?