public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: maintainer mode [was: Re: Building of generated parser files]
@ 1997-08-27 16:44 Kaveh R. Ghazi
  0 siblings, 0 replies; 12+ messages in thread
From: Kaveh R. Ghazi @ 1997-08-27 16:44 UTC (permalink / raw)
  To: egcs

 >    Date: 27 Aug 1997 14:08:27 +0200
 >    From: Samuel Tardieu <sam@inf.enst.fr>
 >  
 >    >>>>> "Ian" == Ian Lance Taylor <ian@cygnus.com> writes:
 >  
 >    Ian> I guess the main difficulty I see is the lack of a standard
 >    Ian> checksum program.  Everything else seems workable.
 >  
 >    Why not including a small one in the distribution, to be built soon enough?
 >  
 > That would lead us into a whole new set of problems, involving finding
 > a working compiler for the build system which can generate programs we
 > can execute.  Remember, we might be building with a cross compiler.
 > These problems are probably solvable, but at some point the solution
 > becomes worse than the disease.
 >  
 > Ian


	How about supplying both sysv and bsd checksums and allow the
comparison test to pass if either value matches that generated by the
system's "sum" program?

		--Kaveh
--
Kaveh R. Ghazi				Project Manager
ghazi@caip.rutgers.edu			ICon CMT Corp.

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

* Re: maintainer mode [was: Re: Building of generated parser files]
  1997-08-28  8:21 HAVE_STDLIB_H Craig Burley
@ 1997-08-28 14:34 ` Gary V Vaughan
  0 siblings, 0 replies; 12+ messages in thread
From: Gary V Vaughan @ 1997-08-28 14:34 UTC (permalink / raw)
  To: egcs

Surely, one could write a relatively bombproof checksum utility with a
few lines of shell (or sed), which the GNU standards allow us to assume
will be present in the build environment...  Just the choice of
algorithm really; how about SUM_OF_NON_WS_ASCII_ALNUM_CHARS modulo
MAX_INT?

Ian Lance Taylor wrote:
> 
>    Date: 27 Aug 1997 14:08:27 +0200
>    From: Samuel Tardieu <sam@inf.enst.fr>
> 
>    >>>>> "Ian" == Ian Lance Taylor <ian@cygnus.com> writes:
> 
>    Ian> I guess the main difficulty I see is the lack of a standard
>    Ian> checksum program.  Everything else seems workable.
> 
>    Why not including a small one in the distribution, to be built soon enough?
> 
> That would lead us into a whole new set of problems, involving finding
> a working compiler for the build system which can generate programs we
> can execute.  Remember, we might be building with a cross compiler.
> These problems are probably solvable, but at some point the solution
> becomes worse than the disease.
> 
> Ian

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

* Re: maintainer mode [was: Re: Building of generated parser files]
@ 1997-08-27 16:44 Ian Lance Taylor
  0 siblings, 0 replies; 12+ messages in thread
From: Ian Lance Taylor @ 1997-08-27 16:44 UTC (permalink / raw)
  To: egcs

   Date: 27 Aug 1997 14:08:27 +0200
   From: Samuel Tardieu <sam@inf.enst.fr>

   >>>>> "Ian" == Ian Lance Taylor <ian@cygnus.com> writes:

   Ian> I guess the main difficulty I see is the lack of a standard
   Ian> checksum program.  Everything else seems workable.

   Why not including a small one in the distribution, to be built soon enough?

That would lead us into a whole new set of problems, involving finding
a working compiler for the build system which can generate programs we
can execute.  Remember, we might be building with a cross compiler.
These problems are probably solvable, but at some point the solution
becomes worse than the disease.

Ian

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

* Re: maintainer mode [was: Re: Building of generated parser files]
  1997-08-27  8:07 Some Linux patches Richard Henderson
@ 1997-08-27 12:08 ` Samuel Tardieu
  0 siblings, 0 replies; 12+ messages in thread
From: Samuel Tardieu @ 1997-08-27 12:08 UTC (permalink / raw)
  To: egcs

>>>>> "Ian" == Ian Lance Taylor <ian@cygnus.com> writes:

Ian> I guess the main difficulty I see is the lack of a standard
Ian> checksum program.  Everything else seems workable.

Why not including a small one in the distribution, to be built soon enough?

  Sam

  Sam
-- 
Samuel Tardieu -- sam@inf.enst.fr

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

* Re: maintainer mode [was: Re: Building of generated parser files]
@ 1997-08-27  0:20 Richard Stallman
  0 siblings, 0 replies; 12+ messages in thread
From: Richard Stallman @ 1997-08-27  0:20 UTC (permalink / raw)
  To: egcs

    I don't know what to do about the checksum program, though.  GNU
    systems will normally have md5sum, but unfortunately there isn't a
    standard sum program on other systems, since the BSD and System V
    checksum algorithms differ.

That seems like a pretty bad flaw in my idea.  Oh well.

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

* Re: maintainer mode [was: Re: Building of generated parser files]
@ 1997-08-26 21:22 Kaveh R. Ghazi
  0 siblings, 0 replies; 12+ messages in thread
From: Kaveh R. Ghazi @ 1997-08-26 21:22 UTC (permalink / raw)
  To: egcs

 > I don't know what to do about the checksum program, though.  GNU
 > systems will normally have md5sum, but unfortunately there isn't a
 > standard sum program on other systems, since the BSD and System V
 > checksum algorithms differ.
 >  
 > Ian

	You could provide both BSD and SYSV sums and if the computed sum
matches either of these, then assume everything is okay.

	There is a slight chance of mismatch (when a corrupted file's
computed SYSV sum matches the supplied BSD sum or vice versa) but for
this purpose it should be okay. 

		--Kaveh
--
Kaveh R. Ghazi				Project Manager
ghazi@caip.rutgers.edu			ICon CMT Corp.

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

* Re: maintainer mode [was: Re: Building of generated parser files]
  1997-08-26 20:50 Test run and a question Joe Buck
@ 1997-08-26 20:56 ` Alexandre Oliva
  0 siblings, 0 replies; 12+ messages in thread
From: Alexandre Oliva @ 1997-08-26 20:56 UTC (permalink / raw)
  To: egcs

Richard Stallman writes:

> When a distribution contains non-source files, the makefile rules
> for these targets could be designed to check checksums of them and
> the sources they were made from.

I was thinking the same.  Autoconf could produce the checksums itself,
and insert them in the generated file.  I had thought of somethink
such as:

configure.in should contain a line such as:

# Autoconf dependencies checksums: ;

the generated configure script would then contain:

# Autoconf dependencies checksums: configure.in:<checksum> ;

config.h.in could contain:
/* Autoconf dependencies checksums: acconfig.h:<checksum> aclocal.m4:<checksum> ; */
that would be replaced with:

/* Autoconf dependencies checksums: config.h:<checksum> ; */

It would be quite easy to check those dependencies on Makefiles.  In
fact, this check could be easily performed by the `missing' script, so
that it would only touch the file if the checksums matched.

I particularly disliked the `Autoconf dependencies checksums' string,
but I could not thing of anything better.  Maybe a RCS-like
$Checksums$ string would do it...

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
Universidade Estadual de Campinas, SP, Brasil

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

* Re: maintainer mode [was: Re: Building of generated parser files]
@ 1997-08-26 20:18 Ian Lance Taylor
  0 siblings, 0 replies; 12+ messages in thread
From: Ian Lance Taylor @ 1997-08-26 20:18 UTC (permalink / raw)
  To: egcs

   Date: Tue, 26 Aug 1997 15:15:02 -0400
   From: Richard Stallman <rms@gnu.ai.mit.edu>

   Here is another idea.  When a distribution contains non-source files,
   the makefile rules for these targets could be designed to check
   checksums of them and the sources they were made from.  If these show
   that a certain target file and the relevant sources are all unchanged
   from the distribution versions, the rule would either do nothing, or
   just touch the output file.

I guess the main difficulty I see is the lack of a standard checksum
program.  Everything else seems workable.

$(srcdir)/configure.in.sum: $(srcdir)/configure.in
	$(SUM) $(srcdir)/configure.in > $(srcdir)/configure.in.sum

$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/configure.in.sum
	$(SUM) $(srcdir)/configure.in > test.sum
	if [ cmp test.sum $(srcdir)/configure.in.sum >/dev/null ]; then \
	  touch $(srcdir)/configure.in; \
	else \
	  cd $(srcdir) && autoconf; \
	fi

This would have to be modified a bit to allow for read-only source
distributions.

I don't know what to do about the checksum program, though.  GNU
systems will normally have md5sum, but unfortunately there isn't a
standard sum program on other systems, since the BSD and System V
checksum algorithms differ.

Ian

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

* Re: maintainer mode [was: Re: Building of generated parser files]
@ 1997-08-26 20:18 Fred Fish
  0 siblings, 0 replies; 12+ messages in thread
From: Fred Fish @ 1997-08-26 20:18 UTC (permalink / raw)
  To: egcs

> Here is another idea.  When a distribution contains non-source files,
> the makefile rules for these targets could be designed to check
> checksums of them and the sources they were made from.  If these show
> that a certain target file and the relevant sources are all unchanged
> from the distribution versions, the rule would either do nothing, or
> just touch the output file.

There would need to be a way to force the target to be remade if, for
example, I fixed a bug in the tool that generated the target from it's
source files and wanted to regenerate the target with the new tool.
Same goes for installed an updated tool, like a new release of bison
for example.

-Fred

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

* Re: maintainer mode [was: Re: Building of generated parser files]
@ 1997-08-26 19:15 Richard Stallman
  0 siblings, 0 replies; 12+ messages in thread
From: Richard Stallman @ 1997-08-26 19:15 UTC (permalink / raw)
  To: egcs

Here is another idea.  When a distribution contains non-source files,
the makefile rules for these targets could be designed to check
checksums of them and the sources they were made from.  If these show
that a certain target file and the relevant sources are all unchanged
from the distribution versions, the rule would either do nothing, or
just touch the output file.

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

* Re: maintainer mode [was: Re: Building of generated parser files]
@ 1997-08-26 15:53 Ian Lance Taylor
  0 siblings, 0 replies; 12+ messages in thread
From: Ian Lance Taylor @ 1997-08-26 15:53 UTC (permalink / raw)
  To: egcs

   From: Frangois Pinard <pinard@iro.umontreal.ca>
   Date: 26 Aug 1997 11:29:45 -0400

   This yields Makefiles to be incorrect, as necessary dependencies are being
   lost.  If people do not have autoconf or automake installed, and Makefiles
   were correct, Makefiles should at least loudly warn about the fact autoconf
   and automake are needed, for when they are needed.  This is the purpose
   of the `missing' script, which Automake now distributes and prefers.

I disagree.  Timestamps often get messed up as programs travel around
the net.  When there are default rules for files like configure and
Makefile.in, this can lead make to try to rebuild them.  When naive
users see the loud warnings from the missing program, they will
believe that something has gone wrong, and will report it as a bug.
In fact, though, nothing has gone wrong.

Even worse, if the users happen to have an old version of autoconf or
automake installed, then configure or Makefile.in will be rebuilt, but
may be rebuilt incorrectly.  This will be reported as a more subtle
bug.

I also don't want to get into a debate about this.  In fact, I don't
see any way to resolve such a debate.  Either choice has problems.  I
happen to weigh the problems differently, which leads me to a
different preference.

Ian

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

* maintainer mode [was: Re: Building of generated parser files]
  1997-08-26 14:34 Some Haifa scheduler bugs Bernd Schmidt
@ 1997-08-26 15:29 ` François Pinard
  0 siblings, 0 replies; 12+ messages in thread
From: François Pinard @ 1997-08-26 15:29 UTC (permalink / raw)
  To: egcs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2605 bytes --]

Hi, people.  Please, please read me carefully.  I do not want to make
a long crusade nor to get involved into a debate, so I tried to say
everything important at once, here, in one single blow.  Keep happy!

Ian Lance Taylor <ian@cygnus.com> summarises what "maintainer mode" is:
| --enable-maintainer-mode is currently being used by automake.  [...]
| The intention is that people who configure normally, without
| --enable-maintainer-mode, will not have to worry about the timestamp
| of their configure.in vs. their configure, and so forth.  This matters
| because most people will not have autoconf or automake installed.

This yields Makefiles to be incorrect, as necessary dependencies are being
lost.  If people do not have autoconf or automake installed, and Makefiles
were correct, Makefiles should at least loudly warn about the fact autoconf
and automake are needed, for when they are needed.  This is the purpose
of the `missing' script, which Automake now distributes and prefers.

It is very wrong, in my opinion, that "maintainer mode" in GNU opens
the door to buggy Makefiles, and to undependable or unreliable builds.
GNU should just distribute plain correct Makefiles.  If they have to be
made incorrect, that should be under explicit request, and never be the
default state in a distribution.  I think that GNU should not even favour
an option to turn GNU Makefiles into incorrect Makefiles.

Richard Stallman <rms@gnu.ai.mit.edu> writes:
| [...] but I am not sure the change is actually an improvement.

The whole concept of "maintainer mode" is very far from being an
improvement.  It is an aberration.  It is an historical error in GNU,
which should be corrected and forgotten as fast as possible, really.

Jim Meyering <meyering@eng.ascend.com> writes:
| FYI, the fileutils, sh-utils, and textutils have been providing
| --enable-maintainer-mode for over a year.  It seems to have had
| the desired effect.

And on the same thread, Niklas Hallqvist <niklas@petra.appli.se> writes:
> Personally, I like --enable-maintainer-mode, and I think we should go
> with it.

If people learn to like "maintainer mode", that is, buggy Makefiles, then
"maintainer mode" has a long term and very undesirable side effect, not
worth the temporary good it can bring.  The three *utils have been wrong
for over a year at purposely distributing incorrect Makefiles.  To be
wrong for a long while does not make something good, it only make it worse.

-- 
François Pinard                          mailto:pinard@iro.umontreal.ca
Support Programming Freedom, join our League!  Ask lpf@lpf.org for info

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

end of thread, other threads:[~1997-08-28 14:34 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-27 16:44 maintainer mode [was: Re: Building of generated parser files] Kaveh R. Ghazi
  -- strict thread matches above, loose matches on Subject: below --
1997-08-28  8:21 HAVE_STDLIB_H Craig Burley
1997-08-28 14:34 ` maintainer mode [was: Re: Building of generated parser files] Gary V Vaughan
1997-08-27 16:44 Ian Lance Taylor
1997-08-27  8:07 Some Linux patches Richard Henderson
1997-08-27 12:08 ` maintainer mode [was: Re: Building of generated parser files] Samuel Tardieu
1997-08-27  0:20 Richard Stallman
1997-08-26 21:22 Kaveh R. Ghazi
1997-08-26 20:50 Test run and a question Joe Buck
1997-08-26 20:56 ` maintainer mode [was: Re: Building of generated parser files] Alexandre Oliva
1997-08-26 20:18 Ian Lance Taylor
1997-08-26 20:18 Fred Fish
1997-08-26 19:15 Richard Stallman
1997-08-26 15:53 Ian Lance Taylor
1997-08-26 14:34 Some Haifa scheduler bugs Bernd Schmidt
1997-08-26 15:29 ` maintainer mode [was: Re: Building of generated parser files] François Pinard

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