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

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

  ViewVC Help
Powered by ViewVC 1.1.20