After I apply a minor modification to the source code
(actually, just change 1 line in 1 file), how can I rebuild
the project to see the effect? At the moment, I am not familiar
with command-line compilation good enough, so I just use the
'make -w -f client.mk' command every time as a magic phrase
that does everything for me. The only problem is that compiling
a universal binary takes more than an hour on my iMac, even if
the changes were in a single line... Can I rebuild the project
faster?
In my particular case, I'm trying to modify nsWindowWatcher.cpp.
Is it sufficient just to rebuild a dynamic library Minefield
uses at run-time? If so, what exactly should I type in Terminal?
Should I modify my mozconfig file beforehand?
Thanks in advance for any hints!
Best regards,
Sergey.
> After I apply a minor modification to the source code
> (actually, just change 1 line in 1 file), how can I rebuild
> the project to see the effect? At the moment, I am not familiar
> with command-line compilation good enough, so I just use the
> 'make -w -f client.mk' command every time as a magic phrase
> that does everything for me. The only problem is that compiling
> a universal binary takes more than an hour on my iMac, even if
> the changes were in a single line... Can I rebuild the project
> faster?
If you are doing active development, I don't recommend making a UB. Just
make a build for your platform and test it. Once you have finished testing,
you can make a separate objdir and do a universal build.
> In my particular case, I'm trying to modify nsWindowWatcher.cpp.
> Is it sufficient just to rebuild a dynamic library Minefield
> uses at run-time? If so, what exactly should I type in Terminal?
> Should I modify my mozconfig file beforehand?
If you know what to remake you can just remake those directories in your
objdir. For instance, to remake the embedding component in a *non-static* build:
cd <objdir>/embedding/components
make
But on mac, you'll also need to remake the Minefield.app bundle:
cd <objdir>/browser/app
make repackage
If you have configured with --enable-static (the standard release
configuration), the embedding component would be linked into the final
binary and you'd have to remake browser/app.
In UB builds there are two objdirs, so you'd have to remake each objdir
separately and then glue them together again to make the UB.
--BDS
thank you very much for your answer!
>> After I apply a minor modification to the source code
>> (actually, just change 1 line in 1 file), how can I rebuild
>> the project to see the effect? At the moment, I am not familiar
>> with command-line compilation good enough, so I just use the
>> 'make -w -f client.mk' command every time as a magic phrase
>> that does everything for me. The only problem is that compiling
>> a universal binary takes more than an hour on my iMac, even if
>> the changes were in a single line... Can I rebuild the project
>> faster?
>
> If you are doing active development, I don't recommend making a UB. Just
> make a build for your platform and test it. Once you have finished testing,
> you can make a separate objdir and do a universal build.
>
Yes, that sounds logical indeed. Am I right assuming that in
order to build native-architecture-only version (not a UB),
it is sufficient just to remove the following line from
'.mozconfig'?
. $topsrcdir/build/macosx/universal/mozconfig
>> In my particular case, I'm trying to modify nsWindowWatcher.cpp.
>> Is it sufficient just to rebuild a dynamic library Minefield
>> uses at run-time? If so, what exactly should I type in Terminal?
>> Should I modify my mozconfig file beforehand?
>
> If you know what to remake you can just remake those directories in your
> objdir. For instance, to remake the embedding component in a *non-static*
> build:
>
> cd <objdir>/embedding/components
> make
>
This doesn't work for me. The compiler says,
"No targets specified and no makefile found. Stop."
Should I pass some parameters to the 'make' command?
> But on mac, you'll also need to remake the Minefield.app bundle:
> cd <objdir>/browser/app
> make repackage
>
Error again:
"No rule to make target `repackage'. Stop."
> If you have configured with --enable-static (the standard release
> configuration), the embedding component would be linked into the final
> binary and you'd have to remake browser/app.
>
It sounds like a reasonable argument for me to change my configuration
in order to produce dynamic (non-static) builds. If I get the idea
right, I should use '.mozconfig' like this:
. $topsrcdir/browser/config/mozconfig
ac_add_options --disable-optimize
ac_add_options --enable-debug
ac_add_options --enable-shared
ac_add_options --disable-static
ac_add_options --disable-tests
ac_add_app_options ppc --enable-prebinding
ac_add_options --enable-default-toolkit=cocoa
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../build
Is everything right?
Best regards,
Sergey.
> Yes, that sounds logical indeed. Am I right assuming that in
> order to build native-architecture-only version (not a UB),
> it is sufficient just to remove the following line from
> '.mozconfig'?
>
> . $topsrcdir/build/macosx/universal/mozconfig
Yes, though you should set MOZ_OBJDIR to something reasonable.
>
>>> In my particular case, I'm trying to modify nsWindowWatcher.cpp.
>>> Is it sufficient just to rebuild a dynamic library Minefield
>>> uses at run-time? If so, what exactly should I type in Terminal?
>>> Should I modify my mozconfig file beforehand?
>> If you know what to remake you can just remake those directories in your
>> objdir. For instance, to remake the embedding component in a *non-static*
>> build:
>>
>> cd <objdir>/embedding/components
>> make
>>
> This doesn't work for me. The compiler says,
> "No targets specified and no makefile found. Stop."
> Should I pass some parameters to the 'make' command?
You cannot do this in the source directory, you have to do it in the objdir.
--BDS