GNOME Bugzilla – Bug 566567
Scheme modifications are not built on windows
Last modified: 2018-06-29 22:15:26 UTC
The Make mechanism for scm files does not work very well on windows. On msys "ln -s" seems to be replaced by "cp -p" in the Makefiles. Thus report directories from the source are copied to the build dir and not linked. Modified or added reports are not copied again as long as ".scm-links" exists. Other information:
Windows (msys) doesn't have symbolic links. That's why it is using "cp -p". What other method do you propose?
The best mehtod to "build" the scheme files might be to define a dependency on the scheme files in the source dir, similar to the C Sources (cp instead of CC). If some scheme file has changed in the source dir, then copy it over to the build dir (i.e. execute the code of the target .scm-links). I don't know how to formulate this dependency in make and if it is possible at all. There might be good reasons for the present mechanism. As a workaround I use (find . -name ".scm-links" |xargs rm );make
It seems a waste on !Win32 because you're just re-symlinking the files.. You could just change the Makefiles to ignore .scm-links on Win32 to force a re-copy always?
Dereks idea could be implemented by checking th OS in the target .scm-links: if ! OS_WIN32 touch .scm-links endif This works for me on Win32. I could provide a patch to all relevant Makefile.am if you agree with this fix. It's probably not the most beautiful solution, because it is waste on Win32 to copy the scheme files on every make, but maybe that's just a waste of waste :-) Anyway, the current behaviour is very misleading and the fix might be worth the extra seconds per build.
I think this change is "good enough". Not many people do development on Win32, so I dont mind those few who do taking a little longer ;) So yeah, if you could provide a patch that does this everywhere, that would be great!
Created attachment 125889 [details] [review] Do not touch .scm-links on windows - always copy scm files .scm files must be copied on windows because linking won't work. Note: existing build directories will be fixed only after make clean or applying the statement of comment #2 in c:\soft\gnucash\build.
Looks good to me.
Applied to trunk, r17817, thanks a lot. Awaiting back-port.
2.2-branch, r17857. Thanks a lot!
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=566567. Please update any external references or bookmarks.