all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Making gnulib imports build on Windows
@ 2011-01-26 19:29 Eli Zaretskii
  2011-01-26 21:48 ` Paul Eggert
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Eli Zaretskii @ 2011-01-26 19:29 UTC (permalink / raw)
  To: emacs-devel

One problem with these imports that may mean a relatively significant
change in the build prerequisites is the fact that during the build,
getopt.in.h needs to be edited into getopt.h.  This editing is done by
Sed in lib/Makefile.in:

  getopt.h: getopt.in.h $(ARG_NONNULL_H)
	  $(AM_V_GEN)rm -f $@-t $@ && \
	  { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
	    sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
		-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
		-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
		-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
		-e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
		-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
		< $(srcdir)/getopt.in.h; \
	  } > $@-t && \
	  mv -f $@-t $@

Until now, building Emacs for Windows did not require Sed.  I see the
following possible ways to deal with this:

  1) Add Sed to programs required for the build, and run it as part of
     each build.

  2) Have a maintainer-only rule to produce getopt.h for Windows (by
     using Sed).  Someone(TM) will invoke that rule whenever
     getopt.in.h changes, and commit the result to the bzr repo, to be
     used by all the other people who build Emacs on Windows.

  3) Write an auxiliary C program to perform replacements like Sed
     does (but without all the other bells and whistles in Sed), build
     it at the beginning of the build, and use it instead of Sed.

I don't like asking every end user to have Sed, especially since many
Windows ports of Sed are notoriously broken (I had to port it myself
to get a reliable tool).  And since 3) sounds like wheel reinvention,
I tend to alternative 2).

Comments and ideas are welcome.



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

end of thread, other threads:[~2011-01-28 20:49 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-26 19:29 Making gnulib imports build on Windows Eli Zaretskii
2011-01-26 21:48 ` Paul Eggert
2011-01-27  4:04   ` Eli Zaretskii
2011-01-26 22:40 ` Andy Moreton
2011-01-27  4:08   ` Eli Zaretskii
2011-01-27 14:22     ` Andy Moreton
2011-01-27 14:32       ` Eli Zaretskii
2011-01-27 15:36         ` Andy Moreton
2011-01-27 14:34       ` Lennart Borgman
2011-01-27 15:13         ` Eli Zaretskii
2011-01-27 15:15           ` Lennart Borgman
2011-01-27 16:43 ` Sam Steingold
2011-01-27 16:58   ` Lennart Borgman
2011-01-27 17:28     ` Sam Steingold
2011-01-27 20:13   ` Juanma Barranquero
2011-01-28 13:08     ` martin rudalics
2011-01-28 15:12       ` Sam Steingold
2011-01-28 15:20         ` Juanma Barranquero
2011-01-28 17:32       ` Sean Sieger
2011-01-28 19:30         ` Sam Steingold
2011-01-28 20:44           ` Martin Stemplinger
2011-01-28 20:49             ` Lennart Borgman
2011-01-27 20:32   ` Martin Stemplinger
2011-01-28 14:30     ` Eli Zaretskii

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.