bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
* Why does gnulib use makefile rules rather than configure?
@ 2019-09-08 21:06 Paul Smith
  2019-09-08 23:40 ` Paul Eggert
  2019-09-09 18:03 ` Bruno Haible
  0 siblings, 2 replies; 5+ messages in thread
From: Paul Smith @ 2019-09-08 21:06 UTC (permalink / raw)
  To: bug-gnulib

I'm looking at allowing GNU make to use more gnulib facilities, but
I've run into a serious problem.

It seems that a lot of gnulib modules rely on makefile rules added to
Makefile.in to construct files, rather than using traditional configure
replacement .in file conversions.

This is a real issue for me because I've always provided a shell
script, build.sh, which can be used to bootstrap an instance of make if
the user doesn't already have one.

The build.sh script relies on the user first running configure to
detect all the normal system-specific behaviors and generate the
standard configure output files such as config.h etc., but then instead
of running "make" (which they don't have), they run ./build.sh.

However, when using gnulib this no longer works because many gnulib
modules seem to delegate various configuration operations to the
generated makefile, rather than using configure to do it.

As a simple example, consider alloca-opt.  gnulib provides alloca.in.h
then adds a Makefile.am rule to convert it to alloca.h, that uses sed
to replace one value:

  sed -e 's|@''HAVE_ALLOCA_H''@|$(HAVE_ALLOCA_H)|g'

The prevalence of this type of behavior in gnulib means that I either
have to give up on using gnulib with GNU make, or else give up on
providing a bootstrapping script.


I don't see why these replacements couldn't instead be done via
configure and its built-in replacement facilities.  Why can't we add
these headers as AC_CONFIG_FILES() and allow them to be generated by
the configure script, instead of requiring makefile rules to do it?



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

end of thread, other threads:[~2019-09-16 22:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-08 21:06 Why does gnulib use makefile rules rather than configure? Paul Smith
2019-09-08 23:40 ` Paul Eggert
2019-09-16 20:47   ` Paul Smith
2019-09-16 22:36     ` Bruno Haible
2019-09-09 18:03 ` Bruno Haible

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).