I want to configure my autotools build so header/data files only get installed when they are newer than a file already installed.
On Linux, makefiles get INSTALL = /usr/bin/install, on Solaris INSTALL = install-sh. Both take a -C parameter that should do what I want, but I don’t see any examples of AC_PROG_INSTALL, or other macro, that show how this gets configured to use the -C.
Is there an elegant method, or do I result to something ugly?
Like William mentioned in his comments, a clean solution is to overwrite INSTALL during configure time.
If you do not want
make installto touch the files in$PREFIXunless needed useinstall -C.If you you want to avoid rebuilding targets due to changed creation times of headers, preserve timestamps of files with