Tony Mechelynck wrote:
> On Fri, Aug 30, 2019 at 2:00 PM Bram Moolenaar <[email protected]> wrote: > > > > > > Patch 8.1.1942 > > Problem: Shadow directory gets outdated when files are added. > > Solution: Add the "shadowupdate" target and add a few comments. > > Files: src/Makefile > > > > > > *** ../vim-8.1.1941/src/Makefile 2019-08-27 22:48:12.737480696 +0200 > > --- src/Makefile 2019-08-30 13:57:52.671038119 +0200lorsque > > *************** > > *** 2828,2839 **** > > fi > > > > # Make a shadow directory for compilation on another system or with > > different > > ! # features. > > SHADOWDIR = shadow > > > > shadow: runtime pixmapslorsque > > $(MKDIR_P) $(SHADOWDIR) > > ! cd $(SHADOWDIR); ln -s ../*.[chm] ../*.in ../*.sh ../*.xs ../*.xbm > > ../gui_gtk_res.xml ../toolcheck ../proto ../libvterm ../vimtutor > > ../gvimtutor ../install-sh ../Make_all.mak . > > mkdir $(SHADOWDIR)/auto > > cd $(SHADOWDIR)/auto; ln -s ../../auto/configure . > > $(MKDIR_P) $(SHADOWDIR)/po > > --- 2828,2858 ---- > > fi > > > > # Make a shadow directory for compilation on another system or with > > different > > ! # features: > > ! # % make shadow > > ! # % cd shadow > > ! # edit configuration in src/shadow/Makefile > > ! # % make > > ! # > > ! # Alternatively use a link for the Makefile and run configure with flags > > in > > ! # another way. When new source files are added use "shadowupdate": > > ! # % cd shadow > > ! # % rm Makefile > > ! # % ln -s ../Makefile . > > ! # % ./configure {options} > > ! # % make > > ! # And later: > > ! # % git pull > > ! # % make distclean shadowupdate > > The problem with "make distclean" is that it removes all existing > objects, making an incremental compile impossible. Yes, but usually it's not much slower than building, unless you sync very often. E.g. when structs.h or vim.h gets changed then everything needs to be compiled anyway. Only running configure is extra. The problem with NOT running distclean, is that you do not pick up configuration changes, which may lead to an unpredictable result. You can leave it out, but you are taking a risk then. > This is equivalent > to (assuming config arguments are correctly set in the environment) > > cd .. > rm -R shadow > make shadow > cd shadow > make > > which was already possible before; but it is really overdoing it when > > ln ../somesource.c > make > > would have been enough. My aim was to include that ln step into the > incremental make. Only GNU make accepts wildcards in the target name, > you say? Well, IIUC that covers most users. All Linux users AFAIK, and > anyone else who uses gmake. I'll try. Deleting the shadow directory also deletes any changes you made there, to the code or to the configuration. When using git it's not too difficult to merge your changes with a new version, and might be the main reason to use a shadow directory. It can also be done with branches, but these can be hard to deal with. -- Fingers not found - Pound head on keyboard to continue. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/201908301906.x7UJ6kWG018538%40masaka.moolenaar.net.
