Skip to content


simple bash script to recompile libxul

Since I started working on L20n bindings for XUL I always felt frustrated that our build system cannot properly recompile the dependencies. When I work on XUL I’d like to just be able to type:

cd ./content/xul;
make;

and be done with it.

Unfortunately, for the reasons that are beyond my level of understanding, it never worked this way. Fortunately, the bits that you have to recompile are always the same so I created a small bash script that recompiles what I need plus the dependency:

DIR="$( cd "$( dirname "$0" )" && pwd )"

cd $1 && 
make &&
cd $DIR/layout &&
make &&
cd $DIR/toolkit/library &&
make

Just place it in your build-dir and then:

./rebuild.sh ./content/xul

will do the rest

enjoy!

 

Posted in main, mozilla, tech.

Tagged with , , , , .


3 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Andrew says

    Instead of changing directories, you can do make -C foo instead of cding into foo and doing make. I think.

  2. Josh Matthews says

    I know it was pointed out to you on IRC, but I’ll take a moment to plug my smartmake tool here as well:
    http://hg.mozilla.org/users/josh_joshmatthews.net/smartmake
    http://www.joshmatthews.net/blog/2011/05/build-smarter-not-harder/

  3. glandium says

    Like Andrew says:
    make -C $1 && make -C layout && make -C toolkit/library will do.
    make -C layout may be skipped once bug 644608 is fixed.