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