This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add support for html/install-html.

On May 24, 2006, "Carlos O'Donell" <> wrote:

>> I'm not sure I can or should approve this, but the rest is ok, except
>> for...

> I will have to send this to the GNU Classpath maintainers?
Possibly, but at the very least to, to check
whether they approve of divergence or not.

>> > Index: gcc/
>> > -$(htmldir)/%/index.html: %.texi
>> > +# Note: lang.html is a special target which triggers language fragment
>> > +#       html builds. It is not included in HTMLS because we do not install
>> > +#       language html files.
>> > +html:: $(HTMLS) lang.html
>> > +
>> > +$(gcc_htmldir)/%: %.texi
>> >  	$(mkinstalldirs) $(@D)
>> > -	rm -f $(@D)/*
>> > -	$(TEXI2HTML) -I $(abs_docdir) -I $(abs_docdir)/include -o $(@D) $<
>> > +	rm -f $(@)/*
>> > +	$(TEXI2HTML) -I $(abs_docdir) -I $(abs_docdir)/include -o $(@) $<
>> >  # Duplicate entry to handle renaming of gccinstall
>> > -$(htmldir)/gccinstall/index.html: $(TEXI_GCCINSTALL_FILES)
>> > +$(gcc_htmldir)/gccinstall: $(TEXI_GCCINSTALL_FILES)
>> >  	$(mkinstalldirs) $(@D)
>> > -	echo rm -f $(@D)/*
>> > -	$(TEXI2HTML) -I $(abs_docdir) -I $(abs_docdir)/include -o $(@D) $<
>> > +	echo rm -f $(@)/*
>> > +	$(TEXI2HTML) -I $(abs_docdir) -I $(abs_docdir)/include -o $(@) $<
>> I'd rather spell $(@) as $@.  The change from $(@D) to $@ got me
>> confused for a moment, but now i see what you're doing.

> Ok.

>> That said, I don't think I like the idea of directories as targets.
>> They seem too fragile.  Any reason to have decided to change it from
>> <dir>/index.html to just <dir>?  If not, I'd rather keep it the way it
>> was.

> Rather than maintain two separate variables I modified the 'html' target
> to accept the same targets as 'install-html.'

The main problem with directories as targets is that, if the build is
interrupted after mkinstalldirs and before the rule is complete, the
next build won't fix the incorrect build, since the directory will be
there, and it will be newer than the dependencies.

Hopefully texi2html generates index.html as the last thing it does,
using a temporary file name and renaming it to the final name at the
end, such that no such problem occurs.  Besides, make will generally
remove the target file if it's interrupted with ^C, but it won't
remove directories.

> The install-html rule uses "test -f" and "test -d" to determine if a
> single file, or an entire directory, should be installed.

That's not quite the point.  The problem I have in mind is the use of
directories as targets.

> The proposed install-html rule is essentially a backport of the autoconf
> CVS install-html rule.

I assume you mean automake above, since autoconf doesn't have Makefile
rules, or at least it didn't last I looked closely at it.  Or maybe I
just misunderstand what you mean :-)

Alexandre Oliva
Secretary for FSF Latin America
Red Hat Compiler Engineer   aoliva@{,}
Free Software Evangelist  oliva@{,}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]