On Thu, 2011-12-15 at 08:45 +0100, Per Jessen wrote: > Warlich, Christof wrote: > > > > > Thus, I need to reparse the Makefile whenever mounting was > > > > needed. > > > >> An include file might help you with that. > > > > I reread the section about the include directive in the manual, > > but I'm not sure if I really understand: As the whole point is > > about reparsing, I assume you refer to make's ability to generate > > non-existing include files? An if I got the idea behind that right, > > Make will then repase its Makefile (and the newly generated include > > file)? > > I haven't thought it through, but yes, something like that. IIRC, Make > will first check for dependencies on include files, and do any > rebuilds. If an include file is update, Make will start over and > reparse the Makefile.
If you create a sentinel makefile that exists on the filesystem and you "include" it (it can even be empty), and your makefile has a rule to build it and that rule involves mounting the partition then touching the file for example, then: make will try to include the file, see that it doesn't exist, run the rule to create it (which will mount the partition), then re-exec itself to re-read the makefile. Should work. -- ------------------------------------------------------------------------------- Paul D. Smith <[email protected]> Find some GNU make tips at: http://www.gnu.org http://make.mad-scientist.net "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Help-make mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-make
