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

Diff of /eclass/makeedit.eclass

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

Revision 1.2 Revision 1.5
1# Copyright 1999-2002 Gentoo Technologies, Inc. 1# Copyright 1999-2003 Gentoo Technologies, Inc.
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.2 2002/07/26 21:50:16 danarmak Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/makeedit.eclass,v 1.5 2003/02/16 04:26:21 vapier Exp $
4 4#
5# Author: Spider 5# Author: Spider
6#
6# makeedit eclass, will remove -Wreturn-type and -Wall from compiling, this will reduce the RAM requirements. 7# makeedit eclass, will remove -Wreturn-type and -Wall from compiling,
8# this will reduce the RAM requirements.
7 9
8# Debug ECLASS 10# Debug ECLASS
9ECLASS="makeedit" 11ECLASS="makeedit"
10INHERITED="$INHERITED $ECLASS" 12INHERITED="$INHERITED $ECLASS"
11 13
12INHERITED="$INHERITED $ECLASS"
13export CFLAGS="${CFLAGS} -Wno-return-type" 14export CFLAGS="${CFLAGS} -Wno-return-type -w"
14export CXXFLAGS="${CXXFLAGS} -Wno-return-type" 15export CXXFLAGS="${CXXFLAGS} -Wno-return-type -w"
15 16
16edit_makefiles () { 17edit_makefiles () {
18 einfo "Parsing Makefiles..."
17 find . -iname makefile |while read MAKEFILE 19 find . -iname makefile | while read MAKEFILE
18 do einfo "parsing ${MAKEFILE}" 20 do
19 cp ${MAKEFILE} ${MAKEFILE}.old 21 cp ${MAKEFILE} ${MAKEFILE}.old
20 sed -e "s:-Wall:-Wall -Wno-return-type:g" \ 22 # We already add "-Wno-return-type -w" to compiler flags, so
21 -e "s:-Wreturn-type:-Wno-return-type:g" \ 23 # no need to replace "-Wall" and "-Wreturn-type" with them.
24 sed -e 's:-Wall::g' \
25 -e 's:-Wreturn-type::g' \
22 -e "s:-pedantic::g" ${MAKEFILE}.old > ${MAKEFILE} 26 -e 's:-pedantic::g' ${MAKEFILE}.old > ${MAKEFILE}
27 rm -f ${MAKEFILE}.old
23 done 28 done
24 29 # Mozilla use .mk includes
30 find . -name '*.mk' | while read MAKEFILE
31 do
32 cp ${MAKEFILE} ${MAKEFILE}.old
33 sed -e 's:-Wall::g' \
34 -e 's:-Wreturn-type::g' \
35 -e 's:-pedantic::g' ${MAKEFILE}.old > ${MAKEFILE}
36 rm -f ${MAKEFILE}.old
37 done
25} 38}

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.20