/[gentoo-x86]/eclass/makeedit.eclass
Gentoo

Diff of /eclass/makeedit.eclass

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

Revision 1.1 Revision 1.1.1.1
1# Copyright 1999-2002 Gentoo Technologies, Inc. 1# Copyright 1999-2004 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/makeedit.eclass,v 1.1 2002/07/24 23:57:00 spider Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/makeedit.eclass,v 1.1.1.1 2005/11/30 09:59:23 chriswhite Exp $
4#
5# Author: Spider
6#
7# To use this eclass, do 2 things:
8# 1. append-flags "$MAKEEDIT_FLAGS". If you filter-flags, make sure to do
9# the append-flags afterward, otherwise you'll lose them.
10# 2. after running configure or econf, call edit_makefiles to remove
11# extraneous CFLAGS from your Makefiles.
12#
13# This combination should reduce the RAM requirements of your build, and maybe
14# even speed it up a bit.
4 15
5# Author: Spider
6# makeedit eclass, will remove -Wreturn-type and -Wall from compiling, this will reduce the RAM requirements.
7 16
8# Debug ECLASS 17MAKEEDIT_FLAGS="-Wno-return-type -w"
9ECLASS="makeedit"
10 18
11INHERITED="$INHERITED $ECLASS"
12export CFLAGS="${CFLAGS} -Wno-return-type"
13export CXXFLAGS="${CXXFLAGS} -Wno-return-type"
14
15edit_makefiles () { 19edit_makefiles() {
16 find . -iname makefile |while read MAKEFILE 20 # We already add "-Wno-return-type -w" to compiler flags, so
17 do einfo "parsing ${MAKEFILE}" 21 # no need to replace "-Wall" and "-Wreturn-type" with them.
18 cp ${MAKEFILE} ${MAKEFILE}.old 22 einfo "Parsing Makefiles ..."
19 sed -e "s:-Wall:-Wall -Wno-return-type:g" \ 23 find . \( -iname makefile -o -name \*.mk -o -name GNUmakefile \) -print0 | \
20 -e "s:-Wreturn-type:-Wno-return-type:g" \ 24 xargs -0 sed -i \
21 -e "s:-pedantic::g" ${MAKEFILE}.old > ${MAKEFILE} 25 -e 's:-Wall::g' \
22 done 26 -e 's:-Wreturn-type::g' \
23 27 -e 's:-pedantic::g'
24} 28}

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.1.1

  ViewVC Help
Powered by ViewVC 1.1.20