unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* getopt_.h on Windows
@ 2011-02-07  2:09 Christoph
  2011-02-07  4:03 ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Christoph @ 2011-02-07  2:09 UTC (permalink / raw)
  To: emacs-devel

Hi,

On a clean checkout on Windows getopt_.h has to be generated manually 
before a bootstrap runs. This seems to be the case even if Sed is 
installed. Is there any reason we couldn't just check for Sed and abort 
if it is not present and otherwise build getopt_.h automatically?

Christoph



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

* Re: getopt_.h on Windows
  2011-02-07  2:09 getopt_.h on Windows Christoph
@ 2011-02-07  4:03 ` Eli Zaretskii
  2011-02-07  4:14   ` Christoph
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2011-02-07  4:03 UTC (permalink / raw)
  To: Christoph; +Cc: emacs-devel

> Date: Sun, 06 Feb 2011 19:09:06 -0700
> From: Christoph <cschol2112@googlemail.com>
> 
> On a clean checkout on Windows getopt_.h has to be generated manually 
> before a bootstrap runs.

Always, or because getopt.in.h was changed lately?  If the former,
then I did something wrong, because that's not what I meant to happen.
If the latter, someone needs to regenerate getopt_.h and commit it to
the repository.

Also, what do you mean by "manually"?  The intent was to run a
specific Make rule, not to create the file by hand.

> This seems to be the case even if Sed is installed.

The need for regenerating getopt_.h does not depend on Sed, it depends
on getopt.in.h being newer.

> Is there any reason we couldn't just check for Sed and abort 
> if it is not present and otherwise build getopt_.h automatically?

Patches welcome, but please remember that Windows Makefiles support
both a Unixy shell and the Windows cmd.exe, so whatever you want to
add must work with both of them.



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

* Re: getopt_.h on Windows
  2011-02-07  4:03 ` Eli Zaretskii
@ 2011-02-07  4:14   ` Christoph
  2011-02-07 12:29     ` Andy Moreton
  0 siblings, 1 reply; 12+ messages in thread
From: Christoph @ 2011-02-07  4:14 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

On 2/6/2011 9:03 PM, Eli Zaretskii wrote:

> Always, or because getopt.in.h was changed lately?  If the former,
> then I did something wrong, because that's not what I meant to happen.
> If the latter, someone needs to regenerate getopt_.h and commit it to
> the repository.

This is the error I get in a clean trunk checkout:

mingw32-make -w getopt_.h-CMD
mingw32-make[2]: Entering directory `D:/devel/emacs/emacs-bzr/trunk/lib'
getopt.in.h or ../arg-nonnull.h is newer than getopt_.h.
Run "gmake getopt_h" in the lib/ subdirectory.
You will need GNU Sed to be installed.
exit -1
mingw32-make[2]: *** [getopt_.h-CMD] Error -1
mingw32-make[2]: Leaving directory `D:/devel/emacs/emacs-bzr/trunk/lib'
mingw32-make[1]: *** [getopt_.h] Error 2
mingw32-make[1]: Leaving directory `D:/devel/emacs/emacs-bzr/trunk/lib'
mingw32-make: *** [bootstrap-gmake] Error 2

> Also, what do you mean by "manually"?  The intent was to run a
> specific Make rule, not to create the file by hand.

Well, following the instructions above, i.e. goint to lib/ and running 
mingw32-make getopt_.h. Manually as opposed to by a make rule.

> The need for regenerating getopt_.h does not depend on Sed, it depends
> on getopt.in.h being newer.

Sure, but in order to generate it, you need Sed, right?

>> Is there any reason we couldn't just check for Sed and abort
>> if it is not present and otherwise build getopt_.h automatically?
>
> Patches welcome, but please remember that Windows Makefiles support
> both a Unixy shell and the Windows cmd.exe, so whatever you want to
> add must work with both of them.

OK.

Thanks,
Christoph



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

* Re: getopt_.h on Windows
  2011-02-07  4:14   ` Christoph
@ 2011-02-07 12:29     ` Andy Moreton
  2011-02-07 13:56       ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: Andy Moreton @ 2011-02-07 12:29 UTC (permalink / raw)
  To: emacs-devel

On Mon 07 Feb 2011, Christoph wrote:

> On 2/6/2011 9:03 PM, Eli Zaretskii wrote:
>
>> Always, or because getopt.in.h was changed lately?  If the former,
>> then I did something wrong, because that's not what I meant to happen.
>> If the latter, someone needs to regenerate getopt_.h and commit it to
>> the repository.
>
> This is the error I get in a clean trunk checkout:
>
> mingw32-make -w getopt_.h-CMD
> mingw32-make[2]: Entering directory `D:/devel/emacs/emacs-bzr/trunk/lib'
> getopt.in.h or ../arg-nonnull.h is newer than getopt_.h.
> Run "gmake getopt_h" in the lib/ subdirectory.
> You will need GNU Sed to be installed.
> exit -1
> mingw32-make[2]: *** [getopt_.h-CMD] Error -1
> mingw32-make[2]: Leaving directory `D:/devel/emacs/emacs-bzr/trunk/lib'
> mingw32-make[1]: *** [getopt_.h] Error 2
> mingw32-make[1]: Leaving directory `D:/devel/emacs/emacs-bzr/trunk/lib'
> mingw32-make: *** [bootstrap-gmake] Error 2

I've found that just running "touch lib/getopt_.h" and then doing a
fresh bootstrap builds ok.

   AndyM




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

* Re: getopt_.h on Windows
  2011-02-07 12:29     ` Andy Moreton
@ 2011-02-07 13:56       ` Eli Zaretskii
  2011-02-07 15:54         ` Andy Moreton
  0 siblings, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2011-02-07 13:56 UTC (permalink / raw)
  To: Andy Moreton; +Cc: emacs-devel

> From: Andy Moreton <andrewjmoreton@gmail.com>
> Date: Mon, 07 Feb 2011 12:29:18 +0000
> 
> I've found that just running "touch lib/getopt_.h" and then doing a
> fresh bootstrap builds ok.

But then I'd expect programs that use getopt not to work correctly.

getopt_.h should be an edited copy of getopt.in.h, not an empty file.



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

* Re: getopt_.h on Windows
  2011-02-07 13:56       ` Eli Zaretskii
@ 2011-02-07 15:54         ` Andy Moreton
  2011-02-07 19:15           ` Eli Zaretskii
  2011-02-07 22:17           ` Andreas Schwab
  0 siblings, 2 replies; 12+ messages in thread
From: Andy Moreton @ 2011-02-07 15:54 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

On 07/02/2011 13:56, Eli Zaretskii wrote:
>>  From: Andy Moreton<andrewjmoreton@gmail.com>
>>  Date: Mon, 07 Feb 2011 12:29:18 +0000
>>
>>  I've found that just running "touch lib/getopt_.h" and then doing a
>>  fresh bootstrap builds ok.
>
> But then I'd expect programs that use getopt not to work correctly.
>
> getopt_.h should be an edited copy of getopt.in.h, not an empty file.

touch only creates an empty file if the file did not exist: in this case the 
tree already contains lib/getopt_.h so touch just updates its timestamp, which 
stops make form complaining. this is of course a temporary workaround rather 
than a proper fix :-)

     AndyM



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

* Re: getopt_.h on Windows
  2011-02-07 15:54         ` Andy Moreton
@ 2011-02-07 19:15           ` Eli Zaretskii
  2011-02-08  0:33             ` Sean Sieger
  2011-02-07 22:17           ` Andreas Schwab
  1 sibling, 1 reply; 12+ messages in thread
From: Eli Zaretskii @ 2011-02-07 19:15 UTC (permalink / raw)
  To: Andy Moreton; +Cc: emacs-devel

> Date: Mon, 07 Feb 2011 15:54:40 +0000
> From: Andy Moreton <andrewjmoreton@googlemail.com>
> CC: emacs-devel@gnu.org
> 
> On 07/02/2011 13:56, Eli Zaretskii wrote:
> >>  From: Andy Moreton<andrewjmoreton@gmail.com>
> >>  Date: Mon, 07 Feb 2011 12:29:18 +0000
> >>
> >>  I've found that just running "touch lib/getopt_.h" and then doing a
> >>  fresh bootstrap builds ok.
> >
> > But then I'd expect programs that use getopt not to work correctly.
> >
> > getopt_.h should be an edited copy of getopt.in.h, not an empty file.
> 
> touch only creates an empty file if the file did not exist: in this case the 
> tree already contains lib/getopt_.h so touch just updates its timestamp, which 
> stops make form complaining. this is of course a temporary workaround rather 
> than a proper fix :-)

Sorry, I completely misunderstood you.

I regenerated getopt_.h and committed it to the repository.



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

* Re: getopt_.h on Windows
  2011-02-07 15:54         ` Andy Moreton
  2011-02-07 19:15           ` Eli Zaretskii
@ 2011-02-07 22:17           ` Andreas Schwab
  2011-02-07 23:19             ` Lennart Borgman
  1 sibling, 1 reply; 12+ messages in thread
From: Andreas Schwab @ 2011-02-07 22:17 UTC (permalink / raw)
  To: Andy Moreton; +Cc: Eli Zaretskii, emacs-devel

Andy Moreton <andrewjmoreton@googlemail.com> writes:

> touch only creates an empty file if the file did not exist:

Only if you use -c.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



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

* Re: getopt_.h on Windows
  2011-02-07 22:17           ` Andreas Schwab
@ 2011-02-07 23:19             ` Lennart Borgman
  0 siblings, 0 replies; 12+ messages in thread
From: Lennart Borgman @ 2011-02-07 23:19 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: Andy Moreton, Eli Zaretskii, emacs-devel

On Mon, Feb 7, 2011 at 11:17 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Andy Moreton <andrewjmoreton@googlemail.com> writes:
>
>> touch only creates an empty file if the file did not exist:
>
> Only if you use -c.

Do you mean that you have to use -c to prevent "touch FILENAME" from
creating a new empty file FILENAME? That is not what I see.



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

* Re: getopt_.h on Windows
  2011-02-07 19:15           ` Eli Zaretskii
@ 2011-02-08  0:33             ` Sean Sieger
  0 siblings, 0 replies; 12+ messages in thread
From: Sean Sieger @ 2011-02-08  0:33 UTC (permalink / raw)
  To: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

    I regenerated getopt_.h and committed it to the repository.

Thank you, the trunk builds fine now.




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

* Re: getopt_.h on Windows
@ 2011-02-08  1:31 grischka
  2011-02-08  3:55 ` Eli Zaretskii
  0 siblings, 1 reply; 12+ messages in thread
From: grischka @ 2011-02-08  1:31 UTC (permalink / raw)
  To: eliz; +Cc: emacs-devel

> I regenerated getopt_.h and committed it to the repository.

Interesting.  And how do you make sure that the VCS tool writes
getopt_.h after getopt.in.h into peoples' working trees?

--- grischka



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

* Re: getopt_.h on Windows
  2011-02-08  1:31 grischka
@ 2011-02-08  3:55 ` Eli Zaretskii
  0 siblings, 0 replies; 12+ messages in thread
From: Eli Zaretskii @ 2011-02-08  3:55 UTC (permalink / raw)
  To: grischka; +Cc: emacs-devel

> Date: Tue, 08 Feb 2011 02:31:32 +0100
> From: grischka <grishka@gmx.de>
> CC: emacs-devel@gnu.org
> 
> > I regenerated getopt_.h and committed it to the repository.
> 
> Interesting.  And how do you make sure that the VCS tool writes
> getopt_.h after getopt.in.h into peoples' working trees?

Magic.



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

end of thread, other threads:[~2011-02-08  3:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-07  2:09 getopt_.h on Windows Christoph
2011-02-07  4:03 ` Eli Zaretskii
2011-02-07  4:14   ` Christoph
2011-02-07 12:29     ` Andy Moreton
2011-02-07 13:56       ` Eli Zaretskii
2011-02-07 15:54         ` Andy Moreton
2011-02-07 19:15           ` Eli Zaretskii
2011-02-08  0:33             ` Sean Sieger
2011-02-07 22:17           ` Andreas Schwab
2011-02-07 23:19             ` Lennart Borgman
  -- strict thread matches above, loose matches on Subject: below --
2011-02-08  1:31 grischka
2011-02-08  3:55 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).