| 1 |
# Copyright 1999-2004 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/eclass/makeedit.eclass,v 1.6 2004/06/25 00:39:48 vapier Exp $
|
| 4 |
#
|
| 5 |
# Author: Spider
|
| 6 |
#
|
| 7 |
# makeedit eclass, will remove -Wreturn-type and -Wall from compiling,
|
| 8 |
# this will reduce the RAM requirements.
|
| 9 |
|
| 10 |
# Debug ECLASS
|
| 11 |
ECLASS="makeedit"
|
| 12 |
INHERITED="$INHERITED $ECLASS"
|
| 13 |
|
| 14 |
export CFLAGS="${CFLAGS} -Wno-return-type -w"
|
| 15 |
export CXXFLAGS="${CXXFLAGS} -Wno-return-type -w"
|
| 16 |
|
| 17 |
edit_makefiles () {
|
| 18 |
einfo "Parsing Makefiles ..."
|
| 19 |
find . -iname makefile | while read MAKEFILE
|
| 20 |
do
|
| 21 |
cp ${MAKEFILE} ${MAKEFILE}.old
|
| 22 |
# We already add "-Wno-return-type -w" to compiler flags, so
|
| 23 |
# no need to replace "-Wall" and "-Wreturn-type" with them.
|
| 24 |
sed -e 's:-Wall::g' \
|
| 25 |
-e 's:-Wreturn-type::g' \
|
| 26 |
-e 's:-pedantic::g' ${MAKEFILE}.old > ${MAKEFILE}
|
| 27 |
rm -f ${MAKEFILE}.old
|
| 28 |
done
|
| 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
|
| 38 |
}
|