3 # generate src/compat/* Makefile's based on SUBDIR values in
7 rwsrcdir
=/home
/current
/src
10 CHECK_SUBDIRS
="gnu/lib gnu/lib/libgcc4 lib lib/csu lib/i18n_module external/bsd/atf/lib external/bsd/openldap/lib lib/libpam/modules"
12 # lib/libm needs to be special -- i387
13 # gnu/lib/libsupc++ -- fails to get NOPROFILE properly
15 for _dir
in ${CHECK_SUBDIRS}; do
16 if [ ${_dir} = "lib/csu" ]; then
17 _subdirs
="i386_elf sparc_elf"
19 _subdirs
=`cd ${srcdir}/${_dir}; ${MAKE} -V SUBDIR`
22 echo "looking in: $_dir: subdirs $_subdirs"
23 for _sd
in $_subdirs; do
25 if [ "$_dir" = "lib" -a "$_sd" = "csu" ]; then
29 if [ "$_sd" = ".WAIT" ]; then
32 _libdplibs
="`cd ${srcdir}/${_dir}/${_sd}; ${MAKE} -V LIBDPLIBS`"
33 echo "creating stuff for subdir: $_sd"
34 echo " - libdplibs = ${_libdplibs}"
35 mkdir
-p ${rwsrcdir}/compat/${_dir}/${_sd}
38 # $NetBSD: build-makefiles,v 1.4 2008/10/27 07:17:05 mrg Exp $
49 echo "NOPROFILE= # defined"
53 echo "nsparser.h: nsparser.c"
57 echo "grammar.h: grammar.c"
61 echo "policy_parse.h: policy_parse.c"
65 if [ -n "${_libdplibs}" ]; then
66 echo "LIBDPLIBS= ${_libdplibs}"
74 # Resolve pathnames in variables.
75 _RESOLVE_VARS= CFLAGS CPPFLAGS DPADD LDADD LIBDPLIBS LIB_ROOT_DIR
76 .for var in ${_RESOLVE_VARS}
83 printf ".PATH: \${NETBSDSRCDIR}/${_dir}/${_sd}\n"
84 printf ".CURDIR:=\${NETBSDSRCDIR}/${_dir}/${_sd}\n\n"
86 .include "${NETBSDSRCDIR}/compat/Makefile.compat"
87 .include "${.CURDIR}/Makefile"
89 # Resolve pathnames from "real" Makefile, and switch .CURDIR back.
90 _RESOLVE_VARS= CFLAGS CPPFLAGS DPADD LDADD ARCHDIR COMPATDIR COMPATARCHDIR LIBCDIR RPC_INCS RPC_XDIR LIBEDITDIR MODOBJDIR RUMPTOP
91 .for var in ${_RESOLVE_VARS}
98 ) > ${rwsrcdir}/compat/${_dir}/${_sd}/Makefile
101 if [ "${_dir}" = "lib" -a "${_sd}" = "csu" ]; then
102 (printf '# $'NetBSD
'$\n\n'
103 printf "_CURDIR:= \${.CURDIR}\n\n"
104 printf ".CURDIR:=\${NETBSDSRCDIR}/${_dir}\n\n"
105 printf ".include "'"'"\${.CURDIR}/Makefile"'"'"\n\n"
106 printf ".CURDIR:= \${_CURDIR}\n"
107 ) > ${rwsrcdir}/compat
/${_dir}/Makefile
109 if [ -f "${srcdir}/${_dir}/Makefile.inc" ]; then
110 (printf '# $'NetBSD
'$\n\n'
111 printf "_CURDIR:= \${.CURDIR}\n\n"
112 printf ".include "'"'"\${NETBSDSRCDIR}/${_dir}/Makefile.inc"'"'"\n\n"
113 printf ".CURDIR:= \${_CURDIR}\n"
114 ) > ${rwsrcdir}/compat
/${_dir}/Makefile.inc