Magellan Linux

Annotation of /trunk/core/include/mozilla.sminc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (hide annotations) (download)
Fri Oct 10 13:29:42 2008 UTC (15 years, 7 months ago) by niro
File size: 1975 byte(s)
import repo
1 niro 2 # $Header: /magellan-cvs/smage/include/mozilla.sminc,v 1.2 2006/06/12 21:16:04 niro Exp $
2     # mozilla global smage2 functions
3    
4     mozconf_add()
5     {
6     echo "ac_add_options $@" >> .mozconfig || die
7     }
8    
9     rebuild_extension_list()
10     {
11     # do not use die here, if no extension are selected this will break
12    
13     # resolve multiple --enable-extensions down to one
14     declare exts=$(sed -n 's/^ac_add_options --enable-extensions=\([^ ]*\).*/\1/p' \
15     ${SRCDIR}/.mozconfig | xargs)
16     sed -i '/^ac_add_options --enable-extensions/d' ${SRCDIR}/.mozconfig
17     echo "ac_add_options --enable-extensions=${exts// /,}" >> ${SRCDIR}/.mozconfig
18     }
19    
20     mozilla_remove_cflags()
21     {
22     # This removes extraneous CFLAGS from the Makefiles to reduce RAM
23     # requirements while compiling (gentoo)
24     export CFLAGS="${CFLAGS} -Wno-return-type -w"
25     export CXXFLAGS="${CXXFLAGS} -Wno-return-type -w"
26    
27     echo "Parsing Makefiles ..."
28     find . -iname makefile | while read MAKEFILE
29     do
30     cp ${MAKEFILE} ${MAKEFILE}.old
31     # We already add "-Wno-return-type -w" to compiler flags, so
32     # no need to replace "-Wall" and "-Wreturn-type" with them.
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     # Mozilla use .mk includes
39     find . -name '*.mk' | while read MAKEFILE
40     do
41     cp ${MAKEFILE} ${MAKEFILE}.old
42     sed -e 's:-Wall::g' \
43     -e 's:-Wreturn-type::g' \
44     -e 's:-pedantic::g' ${MAKEFILE}.old > ${MAKEFILE}
45     rm -f ${MAKEFILE}.old
46     done
47     }
48    
49     # simulate the csh makemake script (gentoo)
50     makemake() {
51     typeset m topdir
52     for m in $(find . -name Makefile.in); do
53     topdir=$(echo "$m" | sed -r 's:[^/]+:..:g')
54     sed -e "s:@srcdir@:.:g" -e "s:@top_srcdir@:${topdir}:g" \
55     < ${m} > ${m%.in} || die "sed ${m} failed"
56     done
57     }
58    
59     makemake2() {
60     typeset m topdir
61     for m in $(find ../ -name Makefile.in); do
62     topdir=$(echo "$m" | sed -r 's:[^/]+:..:g')
63     sed -e "s:@srcdir@:.:g" -e "s:@top_srcdir@:${topdir}:g" \
64     < ${m} > ${m%.in} || die "sed ${m} failed"
65     done
66     }