On 2014-04-22 16:15 +0100, Gavin Smith wrote: > Is support for setting variables with names of source directories > after automake is run (with configure scripts, or on the command line > when make is run) is needed? If not, could variables in the paths of > source files ("$(testd)") above could be expanded when automake is > run? > > So Makefile currently has lines like > > include $(testd)/test-imgloader.Po > > and this would become > > include ctests/test-imgloader.Po > > with no opportunity to change the value of testd. Then config.status > could read the name of the file from Makefile and create it properly.
Even if the value depended on configure-time substitutions (@VAR@- style) I think there would be no problem here (maybe other problems though) because the depfiles creation step happens afterwards. Make-time substitutions for this sort of thing would be exceptionally weird and I can't imagine it actually working properly in current versions of Automake. If config.status knew how to perform the variable substitutions I think there would be no problem. This may be too tricky to implement in portable shell. However, the same substitutions could be done by postprocessing Makefile.in so I don't see why it could not be done at Automake-time. Cheers, -- Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)