/[gentoo-x86]/eclass/kernel-2.eclass
Gentoo

Diff of /eclass/kernel-2.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.171 Revision 1.172
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.171 2006/04/24 11:59:20 johnm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.172 2006/05/03 11:10:11 johnm Exp $
4 4
5# Description: kernel.eclass rewrite for a clean base regarding the 2.6 5# Description: kernel.eclass rewrite for a clean base regarding the 2.6
6# series of kernel with back-compatibility for 2.4 6# series of kernel with back-compatibility for 2.4
7# 7#
8# Maintainer: John Mylchreest <johnm@gentoo.org> 8# Maintainer: John Mylchreest <johnm@gentoo.org>
338} 338}
339 339
340# Unpack functions 340# Unpack functions
341#============================================================== 341#==============================================================
342unpack_2_4() { 342unpack_2_4() {
343 env_setup_xmakeopts
344
345 cd "${S}"
346 # this file is required for other things to build properly, 343 # this file is required for other things to build properly,
347 # so we autogenerate it 344 # so we autogenerate it
348 make -s mrproper ${xmakeopts} || die "make mrproper failed" 345 make -s mrproper ${xmakeopts} || die "make mrproper failed"
349 make -s symlinks ${xmakeopts} || die "make symlinks failed" 346 make -s symlinks ${xmakeopts} || die "make symlinks failed"
350 make -s include/linux/version.h ${xmakeopts} || die "make include/linux/version.h failed" 347 make -s include/linux/version.h ${xmakeopts} || die "make include/linux/version.h failed"
351 echo ">>> version.h compiled successfully." 348 echo ">>> version.h compiled successfully."
352} 349}
353 350
354unpack_2_6() { 351unpack_2_6() {
355 env_setup_xmakeopts
356
357 cd "${S}"
358
359 # since KBUILD_OUTPUT should only be used on the active kernel
360 # sources, we should unset it here.
361 [[ -n "${KBUILD_OUTPUT}" ]] && unset KBUILD_OUTPUT
362
363 # this file is required for other things to build properly, so we 352 # this file is required for other things to build properly, so we
364 # autogenerate it ... touch .config to keep version.h build from 353 # autogenerate it ... generate a .config to keep version.h build from
365 # spitting out an annoying warning 354 # spitting out an annoying warning
366 make -s mrproper ${xmakeopts} 2>/dev/null || die "make mrproper failed" 355 make -s mrproper ${xmakeopts} 2>/dev/null || die "make mrproper failed"
367 touch .config 356 make -s defconfig &>/dev/null 2>&1 || die "make defconfig failed"
368 make -s include/linux/version.h ${xmakeopts} || die "make include/linux/version.h failed" 357 make -s include/linux/version.h ${xmakeopts} || die "make include/linux/version.h failed"
369 rm -f .config 358 rm -f .config
370} 359}
371 360
372universal_unpack() { 361universal_unpack() {
1019 1008
1020 [[ -z ${K_NOSETEXTRAVERSION} ]] && unpack_set_extraversion 1009 [[ -z ${K_NOSETEXTRAVERSION} ]] && unpack_set_extraversion
1021 unpack_fix_docbook 1010 unpack_fix_docbook
1022 unpack_fix_install_path 1011 unpack_fix_install_path
1023 1012
1013 # Setup xmakeopts and cd into sourcetree.
1014 env_setup_xmakeopts
1015 cd "${S}"
1016
1017 # since KBUILD_OUTPUT should only be used on the active kernel
1018 # sources, we should unset it here.
1019 [[ -n "${KBUILD_OUTPUT}" ]] && unset KBUILD_OUTPUT
1020
1021 # We dont need a version.h for anything other than headers
1022 # at least, I should hope we dont. If this causes problems
1023 # take out the if/fi block and inform me please.
1024 # unpack_2_6 should now be 2.6.17 safe anyways
1025 if [[ ${ETYPE} == headers ]]; then
1024 kernel_is 2 4 && unpack_2_4 1026 kernel_is 2 4 && unpack_2_4
1025 kernel_is 2 6 && unpack_2_6 1027 kernel_is 2 6 && unpack_2_6
1028 fi
1026} 1029}
1027 1030
1028kernel-2_src_compile() { 1031kernel-2_src_compile() {
1029 cd "${S}" 1032 cd "${S}"
1030 [[ ${ETYPE} == headers ]] && compile_headers 1033 [[ ${ETYPE} == headers ]] && compile_headers

Legend:
Removed from v.1.171  
changed lines
  Added in v.1.172

  ViewVC Help
Powered by ViewVC 1.1.20