After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 566567 - Scheme modifications are not built on windows
Scheme modifications are not built on windows
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Build system
git-master
Other Windows
: Normal enhancement
: ---
Assigned To: Derek Atkins
Derek Atkins
Depends on:
Blocks: backport
 
 
Reported: 2009-01-04 22:54 UTC by C.Ernst
Modified: 2018-06-29 22:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Do not touch .scm-links on windows - always copy scm files (11.13 KB, patch)
2009-01-06 21:57 UTC, C.Ernst
committed Details | Review

Description C.Ernst 2009-01-04 22:54:12 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:
Comment 1 Christian Stimming 2009-01-05 11:55:51 UTC
Windows (msys) doesn't have symbolic links. That's why it is using "cp -p".

What other method do you propose?
Comment 2 C.Ernst 2009-01-05 21:13:34 UTC
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

Comment 3 Derek Atkins 2009-01-05 21:40:29 UTC
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?
Comment 4 C.Ernst 2009-01-06 21:00:50 UTC
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. 
Comment 5 Derek Atkins 2009-01-06 21:10:32 UTC
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!
Comment 6 C.Ernst 2009-01-06 21:57:19 UTC
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.
Comment 7 Christian Stimming 2009-01-07 12:28:38 UTC
Looks good to me.
Comment 8 Christian Stimming 2009-01-14 20:03:50 UTC
Applied to trunk, r17817, thanks a lot. Awaiting back-port.
Comment 9 Christian Stimming 2009-01-31 10:47:05 UTC
2.2-branch, r17857. Thanks a lot!
Comment 10 John Ralls 2018-06-29 22:15:26 UTC
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.