From: Derek G. <fri...@gm...> - 2018-08-31 11:23:25
|
On Thu, Aug 30, 2018 at 6:28 PM Paul T. Bauman <ptb...@gm...> wrote: > > It just occurred to me that in fact there are autoconf macros that should > do exactly this so configure should be able to generate the symlinks at > configure time and remove the need to manually run a shell script for > symlinking. I will look into this because this is super annoying. It will > not remove the need to run the script to add the file names to the build > system though. > Building these with configure is (arguably) worse. I don't want to have to run configure when I add a new header! No - these should be in the _Makefile_. You can write a generic rule that will generate them. Why is everyone so afraid of actually writing Make? I don't get it. Here is the bit of Makefile I created for doing something similar for MOOSE: https://github.com/idaholab/moose/blob/devel/framework/moose.mk#L60-L93 It works for every header file - in every directory and symlinks them all into another directory. It NEVER has to change: no matter if you add header files, add directories, add sub-directories, rename directories... ANYTHING. It is absolutely full-proof because it puts the symlink generation into the same dependency resolution stream as everything else in the Makefile. This is what I'm talking about - create a good, generic Make-based build system and it should never have to change (unless you actually want to change the behavior of the build system itself). Derek |