anchor.diff:  	${IPKG_TARGET} update
   	${IPKG_TARGET} install ${TOOLCHAIN_TARGET_TASK}
   
  -	mkdir -p ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}
  -	cp -pPR ${SDK_OUTPUT}/${prefix}/usr/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}
  -	rm -rf ${SDK_OUTPUT}/${prefix}/usr/
  -
  -	cp -pPR ${SDK_OUTPUT}/${prefix}/lib/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib
  -	rm -rf ${SDK_OUTPUT}/${prefix}/lib/*
  +	mkdir -p ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/include
  +	mkdir -p ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/.debug/
  +	mkdir -p ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/share
  +	mv ${SDK_OUTPUT}/temp-target/usr/lib/ipkg/status ${SDK_OUTPUT}/${prefix}/package-status
  +	rm -rf ${SDK_OUTPUT}/temp-target/usr/lib/ipkg/
  +	cp -pPR ${SDK_OUTPUT}/temp-target/usr/include/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/include/
  +	cp -pPR ${SDK_OUTPUT}/temp-target/usr/lib/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/
  +	if [ -d ${SDK_OUTPUT}/temp-target/usr/lib/.debug ]; then
  +		cp -pPR ${SDK_OUTPUT}/temp-target/usr/lib/.debug/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/.debug/
  +	fi
  +	cp -pPR ${SDK_OUTPUT}/temp-target/usr/share/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/share/
  +	cp -pPR ${SDK_OUTPUT}/temp-target/lib/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/
  +	if [ -d ${SDK_OUTPUT}/temp-target/lib/.debug ]; then
  +		cp -pPR ${SDK_OUTPUT}/temp-target/lib/.debug/* ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/.debug/
  +	fi
  +	rm -rf ${SDK_OUTPUT}/temp-target/
   
   	for fn in `ls ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/`; do
   		if [ -h ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/$fn ]; then
  
positive.code: 	# gcc-cross-sdk get built :( (30/11/07)
  	ln -sf libgcc_s.so.1 ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/libgcc_s.so
  
  	# remove unwanted executables
  	rm -rf ${SDK_OUTPUT}/${prefix}/sbin ${SDK_OUTPUT}/${prefix}/etc
  
  	# remove broken .la files
  	rm -f ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/*.la
  
  	# fix pkgconfig data files
  	if [ -e ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/pkgconfig ]; then
  
negative.code: 		done
  	fi
  	
  
  	# Setup site file for external use
  	siteconfig=${SDK_OUTPUT}/${prefix}/site-config
  	touch $siteconfig
  	for sitefile in ${CONFIG_SITE} ; do
  		cat $sitefile >> $siteconfig
  	done
  
  	# Create environment setup script
  	script=${SDK_OUTPUT}/${prefix}/environment-setup
  	touch $script
  	echo 'export PATH=${prefix}/bin:$PATH' >> $script
  	echo 'export PKG_CONFIG_SYSROOT_DIR=${prefix}/${TARGET_SYS}' >> $script
  	echo 'export PKG_CONFIG_PATH=${prefix}/${TARGET_SYS}/lib/pkgconfig' >> $script
  	echo 'export CONFIG_SITE=${prefix}/site-config' >> $script
  
  	# Add version information
  	versionfile=${SDK_OUTPUT}/${prefix}/version
  	touch $versionfile
  	echo 'Distro: ${DISTRO}' >> $versionfile
  	echo 'Distro Version: ${DISTRO_VERSION}' >> $versionfile
  	echo 'Metadata Revision: ${METADATA_REVISION}' >> $versionfile
  	echo 'Timestamp: ${DATETIME}' >> $versionfile
  
  	# Package it up
  	mkdir -p ${SDK_DEPLOY}
  	cd ${SDK_OUTPUT}
  	fakeroot tar cfj ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.tar.bz2 .
  	cd ${SDK_OUTPUT2}
  	fakeroot tar cfj ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}-extras.tar.bz2 .
  }
  
  do_populate_sdk[nostamp] = "1"
  