On 11/30/11 11:11 AM, Joakim Tjernlund wrote:
Question: "make install" always install all targets, even if some of then
haven't been rebuilt
since last install. Is it possible to have some dependency sensitive install so
only rebuilt
targets are reinstalled?
Hi Jocke,
In one of my projects I have the following snippet in top Makefile.am
# like the normal install target, but does not update header files
# (and their time stamps) if the content did not change.
install-modified:
$(MAKE) install $(AM_MAKEFLAGS) INSTALL_HEADER="$(install_sh_DATA) -C"
It's useful when installing frequently and wanna avoid recompilations in
downstream projects, but note that the install takes a bit longer time
since it needs to compare all files to decide whether it should be
copied instead.
It would be faster to use the time-stamp to make that decision but when
I looked into it, it seemed dangerous. Unfortunately, I cannot remember
the details from top of my head.
Cheers,
Peter