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

Diff of /eclass/makeedit.eclass

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

Revision 1.8 Revision 1.12
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2008 Gentoo Foundation
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.8 2005/07/02 03:19:12 agriffis Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/makeedit.eclass,v 1.12 2008/07/17 09:58:40 pva Exp $
4
5# @ECLASS: makeedit.eclass
6# @MAINTAINER:
7# Author: Spider
8# @BLURB: An eclass to replace some flags in makefiles
9# @DESCRIPTION:
4# 10#
5# Author: Spider 11# @CODE
6#
7# To use this eclass, do 2 things: 12# To use this eclass, do 2 things:
8# 1. append-flags "$MAKEEDIT_FLAGS". If you filter-flags, make sure to do 13# 1. append-flags "$MAKEEDIT_FLAGS". If you filter-flags, make sure to do
9# the append-flags afterward, otherwise you'll lose them. 14# the append-flags afterward, otherwise you'll lose them.
10# 2. after running configure or econf, call edit_makefiles to remove 15# 2. after running configure or econf, call edit_makefiles to remove
11# extraneous CFLAGS from your Makefiles. 16# extraneous CFLAGS from your Makefiles.
17# @CODE
12# 18#
13# This combination should reduce the RAM requirements of your build, and maybe 19# This combination should reduce the RAM requirements of your build, and maybe
14# even speed it up a bit. 20# even speed it up a bit.
15 21
16ECLASS="makeedit"
17INHERITED="$INHERITED $ECLASS"
18 22
19MAKEEDIT_FLAGS="-Wno-return-type -w" 23MAKEEDIT_FLAGS="-Wno-return-type -w"
20 24
25# @FUNCTION: edit_makefiles
26# @DESCRIPTION:
27# Removes some flags in makefiles
21edit_makefiles() { 28edit_makefiles() {
22 # We already add "-Wno-return-type -w" to compiler flags, so 29 # We already add "-Wno-return-type -w" to compiler flags, so
23 # no need to replace "-Wall" and "-Wreturn-type" with them. 30 # no need to replace "-Wall" and "-Wreturn-type" with them.
24 einfo "Parsing Makefiles ..." 31 einfo "Parsing Makefiles ..."
25 find . -iname makefile -o -name \*.mk -o -name GNUmakefile -print0 | \ 32 find . \( -iname makefile -o -name \*.mk -o -name GNUmakefile \) -print0 | \
26 xargs -0 sed -i \ 33 xargs -0 sed -i \
27 -e 's:-Wall::g' \ 34 -e 's:-Wall::g' \
28 -e 's:-Wreturn-type::g' \ 35 -e 's:-Wreturn-type::g' \
29 -e 's:-pedantic::g' 36 -e 's:-pedantic::g'
30} 37}

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.20