[Geany-devel] Remove MSYS dependency of Geany on Win~1
dimitar.zhekov at xxxxx
Mon Jul 9 18:13:19 UTC 2012
On Sun, 08 Jul 2012 13:04:54 +0100
Nick Treleaven <nick.treleaven at btinternet.com> wrote:
> BTW I've run into 2 problems with the install target:
> 1. cp -r and xcopy treat the destination path differently. Currently
> MSYS install is broken and will install data files as
> $DESTDIR/data/data/* - I've replaced xcopy with separate copy targets
> locally. Unfortunately that causes errors with subdirectories so I had
> to ignore them, which I'd prefer not to do. See attached diff.
"cp: omitting directory 'foo'" errors on any subdirectories with GNU
cp. Wait... the _only_ 'cp' we have under Win~1 GNU cp, right? Instead
of the patch, we can define CP_R as 'cp -r --remove-destination'. This
non-POSIX option exists since at least fileutils-4.1 from 2001. Well,
it'll remove $(DESTDIR)/data before copying, which I would prefer not
to do, but there shoudn't be any user files anyway.
> 2. A weird problem. Installing from cmd.exe doesn't overwrite
> geany.glade (and maybe some other files) even though it appears to
> succeed. I only noticed this because I'm missing the View->Editor->Color
> Schemes menu which was added about a month ago (I tend to test in place
> rather than install each time).
OMG... Then we must choose between copy and xcopy depending on which one
works. Or we can define:
for cmd: 'CP_R = xcopy /s /y /i' and 'RM_R = del /s'
for MSYS: 'CP_R = cp -r' and 'RM_R = rm -r'
and replace the '-$(MKDIR) "$(DESTDIR)/data"' with '-$(RM_R)
That will (a) nullify the differences between 'cp -r' and 'xcopy /s',
(b) be a bit shorter than the individual MKDIR/CP commands from the
patch, and (c) fix the overriding problem, since the target files will
not exist - or maybe reveal something about the reason why it fails.
Well, we haven't run out of options yet. I'll test the patch tomorrow.
More information about the Devel