blob: f3bcb71bd3a3c2f9866d4f958970ac2354fd1f43 (
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
37
38
|
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/eclass/makeedit.eclass,v 1.5 2003/02/16 04:26:21 vapier 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
}
|