Skip to Content.
Sympa Menu

freetds - Re: [freetds] status: documentation

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] status: documentation
  • Date: Wed, 24 Dec 2003 08:47:17 -0000

Il mer, 2003-12-24 alle 01:45, James K. Lowden ha scritto:
> On Tue, 23 Dec 2003, "ZIGLIO Frediano" <Frediano.Ziglio AT vodafone.com>
> wrote:
> >
> > You used a mix of pkddata and data, I changed to use just data (still
> > not in CVS... see below)
>
> I'm particularly glad you fixed that wart. But there are a few other
> things you're doing that I disagree with. I think my way is better, but
> maybe I don't understand.
>
> You have:
>
> if test -e $(DISTRIBUTED_UG_DIR) -a ! -e $(DOCDIR)/userguide ; then \
> cp -R $(DISTRIBUTED_UG_DIR) $(DOCDIR); \
> fi; \
>
> I had:
> if [ -e $(DISTRIBUTED_UG_DIR) -a ! -e $(BUILT_UG_DIR) ]; then \
> ln -s $(DISTRIBUTED_UG_DIR) $(BUILT_UG_DIR);\
> fi; \
>
> I think creating a symbolic link is more obvious, more reliable, faster,
> and conserves disk space.
>

I know, however distdir role seems to dislike links :( I had to change
that code for this reason... Note also that on Linux it seems to be a
problem creating links. ln check is first file exists than create the
link so it's better to create link only on current directory.

> install-data-local: installdirs $(DOCDIR)/reference/index.html
> $(DOCDIR)/userguide/index.htm
> $(mkinstalldirs) $(DOCDIR)
> if test -e $(DOCDIR)/userguide ; then d=.; else d="$(srcdir)"; fi; \
> $(INSTALL_DATA) -c $$d/$(DOCDIR)/userguide/*
> $(TARGET_DOCDIR)/userguide
>
> First of all, the test is unnecessary, because the
> $(DOCDIR)/userguide/index.htm: target should have created a useful source.
> More important, if "test -e $(DOCDIR)/userguide" fails, what guarantee is
> there that "$(srcdir)" will contain any HTML?
>

Simply cause install-data-local depends on
$(DOCDIR)/reference/index.html. So or $(DOCDIR)/reference/index.html or
$(srcdir)/$(DOCDIR)/reference/index.html exists. Similar code was in
generated Makefile.


> You have:
>
> install-data-hook:
> rm -rf $(TARGET_DOCDIR)
>

Removed in last CVS. After some updates I reach this code. I had to add
nobase_ prefix to data_DATA (rpm 4 fail cause it do not package 2
files... this was the reason of rm...).

> This is bad. After installing the documentation, you delete it?
>
> +++
>
> I'd like to:
>
> 1. Use '[', because I think it's fine.

Ok. I'm quite new to Unix so it was only a tale for me :)

> 2. Use "ln -s" instead of copying the files to the build directory.

First test that

mkdir build
cd build
../configure
make dist

works and do not rebuild UG/reference...

A question raised in my mind: does this code is necessary? We have

$(DOCDIR)/userguide/index.htm: $(srcdir)/userguide.sgml userguide.dsl

and then the cp/ln code. However if
$(srcdir)/$(DOCDIR)/userguide/index.htm is already compiled code is not
executed... So it's executed only if $(srcdir)/userguide.sgml and
userguide.dsl are newer (and so we need to rebuild docs...)

About userguide.dsl and distribution. From above role if userguide.dsl
is not in distribution it get built however doing so it's newer than
$(DOCDIR)/userguide/index.htm so userguide get rebuild... The solution
perhaps is replacing

$(DOCDIR)/userguide/index.htm: $(srcdir)/userguide.sgml userguide.dsl

with

$(DOCDIR)/userguide/index.htm: $(srcdir)/userguide.sgml userguide.dsl.in

and remove userguide.dsl role...

> 3. Change install-data-local to:
>
> install-data-local: installdirs \
> $(DOCDIR)/reference/index.html \
> $(DOCDIR)/userguide/index.htm
> $(INSTALL_DATA) -c $(DOCDIR)/userguide/* $(TARGET_DOCDIR)/userguide
> $(INSTALL_DATA) -c $(DOCDIR)/reference/* $(TARGET_DOCDIR)/reference
>

It doesn't work. If you issue make dist without make it fails. The
reason is simple, $(DOCDIR)/reference/index.html already exists (in
srcdir directory) so reference/userguide get no built... I put my test
script under misc/test-dist.sh. It's slow (it takes 8 minute on my
machine) but it's what we aim..

> 4. Remove the install-data-hook target.
>

Removed..

> Happy to discuss.
>

Happy too. I don't have a no-GNU make system and I want to get rid of
this issue ASAP...

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page