all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* MinGW "pwd -W" configure.ac correction
@ 2013-10-23 23:12 Glenn Morris
  2013-10-23 23:37 ` Glenn Morris
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Glenn Morris @ 2013-10-23 23:12 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel


I think that (thanks to me) there's an issue with the

  test "$MSYSTEM" = "MINGW32" && abs_srcdir=`(cd "$abs_srcdir"; pwd -W | sed -e 's,^\([[A-Za-z]]\):,/\1,')`

stuff in configure.

Unlike $srcdir (which this used to use), it seems that $abs_srcdir it
not set at this stage in configure. Instead it only gets set by
config.status (IIUC).

Does this `pwd -W' correction only matter for epaths.h?
If so, could it be moved to the epaths-force-w32 rule in Makefile.in?
That rule already does some correcting of paths.

Or does every instance of $abs_srcdir in all the Makefiles need correcting?
If so, we'll have a find way to make config.status do it
(AC_CONFIG_COMMANDS?)...



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: MinGW "pwd -W" configure.ac correction
  2013-10-23 23:12 MinGW "pwd -W" configure.ac correction Glenn Morris
@ 2013-10-23 23:37 ` Glenn Morris
  2013-10-24  0:12   ` Glenn Morris
  2013-10-24 16:25 ` Eli Zaretskii
  2013-10-24 17:13 ` Achim Gratz
  2 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2013-10-23 23:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel


Also, I _think_ this line in configure.ac:

  CPPFLAGS="$CPPFLAGS -DUSE_CRT_DLL=1 -I $srcdir/nt/inc"

should be changed to something like:

  CPPFLAGS="$CPPFLAGS -DUSE_CRT_DLL=1 -I \$abs_srcdir/nt/inc"

(to defer expansion of $abs_srcdir until the Makefile stage).


(But since CPPFLAGS is supposed to be a user-option, which could be
overridden at build-time, should there not be a separate variable,
CPPFLAGS_NT or somesuch, which is unconditionally added in the
Makefiles where needed?)



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: MinGW "pwd -W" configure.ac correction
  2013-10-23 23:37 ` Glenn Morris
@ 2013-10-24  0:12   ` Glenn Morris
  2013-10-24  2:40     ` Glenn Morris
  0 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2013-10-24  0:12 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Glenn Morris wrote:

> Also, I _think_ this line in configure.ac:
>
>   CPPFLAGS="$CPPFLAGS -DUSE_CRT_DLL=1 -I $srcdir/nt/inc"
>
> should be changed to something like:
>
>   CPPFLAGS="$CPPFLAGS -DUSE_CRT_DLL=1 -I \$abs_srcdir/nt/inc"

Sorry, \$abs_top_srcdir. Confusing!

> (But since CPPFLAGS is supposed to be a user-option, which could be
> overridden at build-time, should there not be a separate variable,
> CPPFLAGS_NT or somesuch, which is unconditionally added in the
> Makefiles where needed?)

I see that other places in configure mess with CPPFLAGS too, so this is
not nt-specific.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: MinGW "pwd -W" configure.ac correction
  2013-10-24  0:12   ` Glenn Morris
@ 2013-10-24  2:40     ` Glenn Morris
  2013-10-24 12:39       ` Óscar Fuentes
  0 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2013-10-24  2:40 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Glenn Morris wrote:

>>   CPPFLAGS="$CPPFLAGS -DUSE_CRT_DLL=1 -I \$abs_srcdir/nt/inc"
>
> Sorry, \$abs_top_srcdir.

I installed a version of that, but obv. can't test it.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: MinGW "pwd -W" configure.ac correction
  2013-10-24  2:40     ` Glenn Morris
@ 2013-10-24 12:39       ` Óscar Fuentes
  0 siblings, 0 replies; 10+ messages in thread
From: Óscar Fuentes @ 2013-10-24 12:39 UTC (permalink / raw)
  To: emacs-devel

Glenn Morris <rgm@gnu.org> writes:

> Glenn Morris wrote:
>
>>>   CPPFLAGS="$CPPFLAGS -DUSE_CRT_DLL=1 -I \$abs_srcdir/nt/inc"
>>
>> Sorry, \$abs_top_srcdir.
>
> I installed a version of that, but obv. can't test it.

FWIW, just did a

make bootstrap -j 4

and it worked.

However, I experienced a recurring issue which is not serious enough to
report on its own, but now that we are talking about the config
scripts...

Often, after updating the sources and executing `make bootstrap', the
process starts with reconfiguring the project (because some dependency
of the configure script changed, I guess) then deletes everything and
continues configuring again. Running the configure scripts is a huge
time consumer on Windows (at least on the virtualized Windows XP machine
that I use) so running it for discarding its products just afterwards is
a waste.




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: MinGW "pwd -W" configure.ac correction
  2013-10-23 23:12 MinGW "pwd -W" configure.ac correction Glenn Morris
  2013-10-23 23:37 ` Glenn Morris
@ 2013-10-24 16:25 ` Eli Zaretskii
  2013-10-25  1:55   ` Glenn Morris
  2013-10-24 17:13 ` Achim Gratz
  2 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2013-10-24 16:25 UTC (permalink / raw)
  To: Glenn Morris; +Cc: emacs-devel

> From: Glenn Morris <rgm@gnu.org>
> cc: emacs-devel@gnu.org
> Date: Wed, 23 Oct 2013 19:12:44 -0400
> 
> 
> I think that (thanks to me) there's an issue with the
> 
>   test "$MSYSTEM" = "MINGW32" && abs_srcdir=`(cd "$abs_srcdir"; pwd -W | sed -e 's,^\([[A-Za-z]]\):,/\1,')`
> 
> stuff in configure.
> 
> Unlike $srcdir (which this used to use), it seems that $abs_srcdir it
> not set at this stage in configure. Instead it only gets set by
> config.status (IIUC).
> 
> Does this `pwd -W' correction only matter for epaths.h?
> If so, could it be moved to the epaths-force-w32 rule in Makefile.in?

This could maybe work today, but it's a time bomb: the underlying
problem, explained in configure.ac, will bite us if we ever invoke any
MinGW program (including, but not limited to, Emacs) during the build.
So it is best to get that problem out of our way as soon as possible.

> That rule already does some correcting of paths.

Those are different problems.

> Or does every instance of $abs_srcdir in all the Makefiles need correcting?

We cannot allow something like /usr/foo/bar in $abs_srcdir, anywhere.
It must be in the /x/foo/bar format, i.e. it must include the Windows
drive letter (in the "/x/" form) explicitly.  It's just that epaths.h
were the first place where this problem hit us.

> If so, we'll have a find way to make config.status do it
> (AC_CONFIG_COMMANDS?)...

How can we be sure that the same problem won't happen while the
configure script itself runs, before it invokes config.status?



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: MinGW "pwd -W" configure.ac correction
  2013-10-23 23:12 MinGW "pwd -W" configure.ac correction Glenn Morris
  2013-10-23 23:37 ` Glenn Morris
  2013-10-24 16:25 ` Eli Zaretskii
@ 2013-10-24 17:13 ` Achim Gratz
  2013-10-24 18:15   ` Eli Zaretskii
  2 siblings, 1 reply; 10+ messages in thread
From: Achim Gratz @ 2013-10-24 17:13 UTC (permalink / raw)
  To: emacs-devel

Glenn Morris writes:
>   | sed -e 's,^\([[A-Za-z]]\):,/\1,')`

If this is supposed to check for a DOS drive letter, then it's not
working correctly in some locales and for some versions of sed, I think.

http://lists.gnu.org/archive/html/bug-texinfo/2010-03/msg00033.html
http://thread.gmane.org/gmane.emacs.orgmode/30520/focus=31596


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: MinGW "pwd -W" configure.ac correction
  2013-10-24 17:13 ` Achim Gratz
@ 2013-10-24 18:15   ` Eli Zaretskii
  2013-10-24 19:54     ` Achim Gratz
  0 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2013-10-24 18:15 UTC (permalink / raw)
  To: Achim Gratz; +Cc: emacs-devel

> From: Achim Gratz <Stromeko@nexgo.de>
> Date: Thu, 24 Oct 2013 19:13:14 +0200
> 
> Glenn Morris writes:
> >   | sed -e 's,^\([[A-Za-z]]\):,/\1,')`
> 
> If this is supposed to check for a DOS drive letter, then it's not
> working correctly in some locales and for some versions of sed, I think.

The configure script sets LC_ALL=C at its very beginning.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: MinGW "pwd -W" configure.ac correction
  2013-10-24 18:15   ` Eli Zaretskii
@ 2013-10-24 19:54     ` Achim Gratz
  0 siblings, 0 replies; 10+ messages in thread
From: Achim Gratz @ 2013-10-24 19:54 UTC (permalink / raw)
  To: emacs-devel

Eli Zaretskii writes:
>> From: Achim Gratz <Stromeko@nexgo.de>
>> Date: Thu, 24 Oct 2013 19:13:14 +0200
>> 
>> Glenn Morris writes:
>> >   | sed -e 's,^\([[A-Za-z]]\):,/\1,')`
>> 
>> If this is supposed to check for a DOS drive letter, then it's not
>> working correctly in some locales and for some versions of sed, I think.
>
> The configure script sets LC_ALL=C at its very beginning.

Then ignore what I said.
:-)


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: MinGW "pwd -W" configure.ac correction
  2013-10-24 16:25 ` Eli Zaretskii
@ 2013-10-25  1:55   ` Glenn Morris
  0 siblings, 0 replies; 10+ messages in thread
From: Glenn Morris @ 2013-10-25  1:55 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii wrote:

>> Does this `pwd -W' correction only matter for epaths.h?
>> If so, could it be moved to the epaths-force-w32 rule in Makefile.in?
>
> This could maybe work today, but it's a time bomb: the underlying
> problem, explained in configure.ac, will bite us if we ever invoke any
> MinGW program (including, but not limited to, Emacs) during the build.

(We should use relative paths wherever possible, to avoid this and other
issues.)

This sounds like rather a general problem. Is it something to report to
autoconf they can improve support for it in some future version?

> We cannot allow something like /usr/foo/bar in $abs_srcdir, anywhere.
> It must be in the /x/foo/bar format, i.e. it must include the Windows
> drive letter (in the "/x/" form) explicitly.  It's just that epaths.h
> were the first place where this problem hit us.

I didn't appreciate at first that for autoconf, $srcdir is "special",
and not like eg "$abs_srcdir." You can easily change the former, but not
the latter (AFAICS).

If Emacs really needs a special value for "absolute path to sources on
MinGW" that is different to what autoconf provides, then the only method
I can think of is:

In configure.ac, on MinGW, define mingw_abs_srcdir = whatever

Use that variable directly in configure wherever needed.

In Makefiles, use

abs_srcdir = @abs_srcdir@
mingw_abs_srcdir = @mingw_abs_srcdir@
real_abs_srcdir = @real_abs_srcdir@

where configure sets
real_abs_srcdir = \${mingw_abs_srcdir} on MinGW, and \${abs_srcdir}
everywhere else.

Then in rules, remember to use $(real_abs_srcdir).

Bit messy. Maybe someone else has a better idea.



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-10-25  1:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-23 23:12 MinGW "pwd -W" configure.ac correction Glenn Morris
2013-10-23 23:37 ` Glenn Morris
2013-10-24  0:12   ` Glenn Morris
2013-10-24  2:40     ` Glenn Morris
2013-10-24 12:39       ` Óscar Fuentes
2013-10-24 16:25 ` Eli Zaretskii
2013-10-25  1:55   ` Glenn Morris
2013-10-24 17:13 ` Achim Gratz
2013-10-24 18:15   ` Eli Zaretskii
2013-10-24 19:54     ` Achim Gratz

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.