]>
git.saurik.com Git - apple/xnu.git/blob - SETUP/seed_objroot
5 echo "OBJROOT not defined"
9 if [ ! $PREBUILT_OBJROOT ]
11 PREBUILT_OBJROOT
=/Prebuilt
/$1/xnu
/BUILD
/obj
14 if [ ! -e $PREBUILT_OBJROOT ]
16 echo "$PREBUILT_OBJROOT doesn't exist"
19 if [ $# = 2 -a ! -e $PREBUILT_OBJROOT/$2 ]
21 echo "$PREBUILT_OBJROOT/$2 doesn't exist"
24 if [ -e $PREBUILT_OBJROOT/BUILDING_SEED_OBJROOT
]
26 echo "Building $PREBUILT_OBJROOT, try later"
39 echo "Copying $PREBUILT_OBJROOT in $OBJROOT"
42 echo "Remove $OBJROOT before calling seed_objroot"
48 if [ ! -e $OBJROOT/$2 ]
51 echo "Copying $PREBUILT_OBJROOT/$2 in $OBJROOT/$2"
53 RELEASE_OBJ
=`echo $2 | sed 's/DEBUG/RELEASE/'`
54 if [ $1 != $RELEASE_OBJ -a ! -e $OBJROOT/$RELEASE_OBJ ]
56 mkdir -p $OBJROOT/$RELEASE_OBJ
57 echo "Copying $PREBUILT_OBJROOT/$RELEASE_OBJ in $OBJROOT/$RELEASE_OBJ"
58 pax
-rw $RELEASE_OBJ $OBJROOT
62 echo "remove $OBJROOT/$2 before calling seed_objroot"
68 if [ ! -e $OBJROOT/EXPORT_HDRS
]
70 echo "Copying $PREBUILT_OBJROOT/EXPORT_HDRS in $OBJROOT/EXPORT_HDRS"
71 mkdir -p $OBJROOT/EXPORT_HDRS
72 pax
-rw EXPORT_HDRS
$OBJROOT
76 if [ -e RELEASE_PPC
/osfmk
/RELEASE
/config.RELEASE_PPC
]
78 PREV_OBJROOT
=`grep objectdir RELEASE_PPC/osfmk/RELEASE/config.RELEASE_PPC | cut -f 2 -d\" |
79 sed 's|/RELEASE_PPC/osfmk/RELEASE||'`
81 if [ -z $PREV_OBJROOT -a -e DEBUG_PPC
/osfmk
/DEBUG
/config.DEBUG_PPC
]
83 PREV_OBJROOT
=`grep objectdir DEBUG_PPC/osfmk/DEBUG/config.DEBUG_PPC | cut -f 2 -d\" |
84 sed 's|/DEBUG_PPC/osfmk/DEBUG||'`
86 if [ -z $PREV_OBJROOT -a -e RELEASE_I
386/osfmk
/RELEASE
/config.RELEASE_I386
]
88 PREV_OBJROOT
=`grep objectdir RELEASE_I386/osfmk/RELEASE/config.RELEASE_I386 | cut -f 2 -d\" |
89 sed 's|/RELEASE_I386/osfmk/RELEASE||'`
91 if [ -z $PREV_OBJROOT -a -e DEBUG_I
386/osfmk
/DEBUG
/config.DEBUG_I386
]
93 PREV_OBJROOT
=`grep objectdir DEBUG_I386/osfmk/DEBUG/config.DEBUG_I386 | cut -f 2 -d\" |
94 sed 's|/DEBUG_I386/osfmk/DEBUG||'`
96 if [ -z $PREV_OBJROOT ]
98 echo "PREV_OBJROOT not found"
102 if [ -e RELEASE_PPC
/osfmk
/RELEASE
/config.RELEASE_PPC
]
104 PREV_SRCROOT
=`grep sourcedir RELEASE_PPC/osfmk/RELEASE/config.RELEASE_PPC | cut -f 2 -d\"`
106 if [ -z $PREV_SRCROOT -a -e DEBUG_PPC
/osfmk
/DEBUG
/config.DEBUG_PPC
]
108 PREV_SRCROOT
=`grep sourcedir DEBUG_PPC/osfmk/DEBUG/config.DEBUG_PPC | cut -f 2 -d\"`
110 if [ -z $PREV_SRCROOT -a -e RELEASE_I
386/osfmk
/RELEASE
/config.RELEASE_I386
]
112 PREV_SRCROOT
=`grep sourcedir RELEASE_I386/osfmk/RELEASE/config.RELEASE_I386 | cut -f 2 -d\"`
114 if [ -z $PREV_SRCROOT -a -e DEBUG_I
386/osfmk
/DEBUG
/config.DEBUG_I386
]
116 PREV_SRCROOT
=`grep sourcedir DEBUG_I386/osfmk/DEBUG/config.DEBUG_I386 | cut -f 2 -d\"`
118 if [ -z $PREV_SRCROOT ]
120 echo "PREV_SRCROOT not found"
124 echo "s|$PREV_OBJROOT|$OBJROOT|" > prebuild.
sed
125 echo "s|$PREV_SRCROOT|$SRCROOT|" >>prebuild.
sed
127 for i
in `find . -name Makedep -print`
129 sed -f prebuild.
sed $i > $i.tmp
133 rm -f `find $OBJROOT -name Makefile -print` prebuild.
sed