I have recorded that it took 50 minutes for an initial compilation of the OpenWrt firmware image, assuming all the necessary packages have been installed via
sudo apt-get install. My BuildRoot Root Dir is
Subsequently, I found that if I rename the directory above the
openwrt folder, with a minor change in a file say
wifi.lua the next make (in
openwrt folder) takes 21 minutes to compile successfully.
However, if I don't rename the directory above the
openwrt folder, with a similar minor change in the same file, the next make V=99 takes only 3 minutes to compile successfully.
When I now rename the directory above and do the same as above again, the make takes 21 minutes to compile successfully. With make V=99, I can see that there were many more compilation steps taken compared to the case where I did not rename the top directory.
I can see that the Makefile compilation is much faster if I do not rename the top directory.
This brings me to the related question: In Linux, will renaming or moving a directory change the times of the files in subdirectories?
I know that the Makefile does not build a target again if the modification time of the target is more recent than all its dependencies.
I was also reading about some issues with the GNU Makefile: http://www.conifersystems.com/whitepapers/gnu-make/
Does the OpenWrt Makefile, supposed to be much more advanced than the original Linux Makefile, address some or all of these issues?
(To get the Makefile to compile faster, I also have the
openwrt/dl as a symbolic link to a folder in my home directory, so that the user-space package tarballs don't need to be downloaded again.)