Re: Support for a non-standard directory

2008-02-20 Thread Richard Bos
Hi Ralf,

thank you for your support.

Op Wednesday 20 February 2008 21:20:48 schreef Ralf Wildenhues:
  When I now run:
  DISTCHECK_CONFIGURE_FLAGS=--with-dist=suse --without-openpkg make
  distcheck it fails :(

 That is likely because distcheck ensures that with --prefix, all
 installed files can be redirected to be inside a subtree.

Okay, but other directories can be specified, and those parallel to the one 
specified with --prefix.  E.g. --prefix=/usr, while --sysconfigdir=/etc 
and --datadir=/var

 Do you have a way to override the webserver_document_root?  If yes,
 assuming that the possibility is --enable-webserver-document-root=DIR,
 you can add
   DISTCHECK_CONFIGURE_FLAGS='--with-dist=suse --without-openpkg
 --enable-webserver-document-root=${sharedstatedir}/htdocs'

 Alternatively, you could default the directory in configure.ac

   if test -n $enable_webserver_document_root; then
 ...
   else
 webserver_document_root='${sharedstatedir}/htdocs'
   fi
   AC_SUBST([webserver_document_root])

I don't know, if this is possible due to the way we have setup the automake 
chain.  We define webserver_document_root in a distribution dependend file, 
that is included in Makefile.am.  If you don't mind I'll sent you a tarbal 
(250k), with the project.  Having a look at the real files, with the 
possibility to execute, says much more than many words trying to explain how 
it works (or we have put it together).

  Whatever I do to the webserver_document_root (more details about this
  below) it either fails the 'make distcheck', or 'make install' installs
  in an incorrect location.
 
  I'm now going to use a workaround to (mis)use the configure argument
  --htmldir to define the webserver root directory.

 --htmldir should be for documentation in HTML format.

Yes, that is true.  Therefor I wrote (mis)use.  But this one works! ;)

  Two questions:
  1) is a feature request feasible, asking to extend configure so it gets a
  command line option that can be used to define the webserver root
  directory (--webserverdir e.g.)?

 No.  It is deliberate that all configure scripts understand the same
 flags, --enable-* and --with-* are for package-specific extensions (that
 are to be ignored by other packages).  The GNU Coding Standards mandate
 this; the rationale is to allow you to build trees of packages,
 connected by AC_CONFIG_SUBDIRS, and not have configure scripts fail due
 to arguments it does not know.

But, all directories options don't start with that, see ./configure --help:
Fine tuning of the installation directories:
  --bindir=DIR   user executables [EPREFIX/bin]
  --sbindir=DIR  system admin executables [EPREFIX/sbin]
  --libexecdir=DIR   program executables [EPREFIX/libexec]
  --sysconfdir=DIR   read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
  --localstatedir=DIRmodifiable single-machine data [PREFIX/var]
  --libdir=DIR   object code libraries [EPREFIX/lib]
  --includedir=DIR   C header files [PREFIX/include]
etc
As such, it would be nice if configure would include an option to specify 
an --serverdir or --servicedir.  Another reason would be, because /srv is 
adviced by FHS
http://www.pathname.com/fhs/pub/fhs-2.3.html#SRVDATAFORSERVICESPROVIDEDBYSYSTEM

   If I search the internet, more people are fighting
  this battle to obtain a webserver root directory with autotools and
  have 'make distcheck' work.  Hence, it would serve multiple people.

 FWIW, I have seen none of this battle so far.

One that is/was very similar is:
http://www.cygwin.com/ml/automake/2004-10/msg00032.html
I did not check other threads though (there won't be too many as calling 'make 
distcheck' with the environment variable DISTCHECK... resulting in an error 
is, I think, rather exceptional.

-- 
Richard Bos
We are borrowing the world of our children,
It is not inherited from our parents.




What is the best way to localize files

2005-11-13 Thread Richard Bos
What is the best way to use msgfmt in a Makefile.am for localization of  
files?  Back in 2003 there was a discussion about introducing something like:

  locale_POTS = foo.pot
  foo_pot_SOURCES = a.c a.h b.c b.h ...
  foo_pot_LANGFILE = LINGUAS
  foo_pot_XGETTEXTFLAGS = --keyword=_ --keyword=N_

Has this happened, is this available?

At the moment the Makefile.am has the following code:

.po.mo:
$(MSGFMT) -o $@ $

PHP_LOCALE_DE_PO = php/admin/locale/de/LC_MESSAGES/messages.po
PHP_LOCALE_DE_MO = php/admin/locale/de/LC_MESSAGES/messages.mo

localedir = $(phpkolabdir)/locale

phplocalededir = $(localedir)/de/LC_MESSAGES
phplocalede_DATA = $(PHP_LOCALE_DE_MO)

That is repeated for several languages.  If I may ask, how to improve 
this??  The current problem is that 'make distcheck' fails with the following 
error:
msgfmt -o 
php/admin/locale/de/LC_MESSAGES/messages.mo 
../../php/admin/locale/de/LC_MESSAGES/messages.po
msgfmt: error while opening php/admin/locale/de/LC_MESSAGES/messages.mo for 
writing: unknown directory of file.

This is due to the output directory not being created.

-- 
Thanks in advance,

Richard Bos
Without a home the journey is endless




Re: Variable defition works in configure.ac, but not in external file?

2005-11-12 Thread Richard Bos
Ralf,

Op zondag 13 november 2005 02:55, schreef Ralf Wildenhues:
 Hi Richard,

 * Richard Bos wrote on Sun, Nov 13, 2005 at 12:00:16AM CET:
  Problem: a variable remains undefined during 'make distcheck',
  although, it is present in the file that is included by Makefile.am.

 *snip*

  The file dist_conf/kolab (@distribution@) included by configure.ac as
  follows: AC_ARG_ENABLE([dist],
[AC_HELP_STRING([--enable-dist=DIST],
   [distribution target (default: openpkg)])],
   [distribution=dist_conf/$enable_dist],
 [distribution=dist_conf/kolab])
  AC_SUBST_FILE(distribution)

 Shot in the dark: Maybe you want
   distribution=$srcdir/dist_conf/kolab
 instead?  If you do VPATH builds (source tree != build tree), you should
 encounter the problem there as well.

You hit the 'bull' :))  Thanks a lot!

-- 
Richard Bos
Without a home the journey is endless




Re: Getting web content past distcheck

2004-10-13 Thread Richard Bos
Op woensdag 13 oktober 2004 20:11, schreef John Kodis:
     htmldir = $(WEBDIR)/html/$(PACKAGE)
     cgidir  = $(WEBDIR)/cgi-bin/$(PACKAGE)

 to get the web pages and cgi-bin scripts installed in the /var/www
 directory tree.  This all works fine, except that make distcheck
 only works when run as root, since make tries to install these files
 under /var/www rather than under the _inst directory.

 I've tried adding $(DESTDIR) and @DESTDIR@ in various places, but
 haven't found the magical invocation that will get distcheck to run
 successfully.

If I remember well you need to combine those:
     htmldir = $(DESTDIR)/$(WEBDIR)/html/$(PACKAGE)


-- 
Richard Bos
Without a home the journey is endless





confused: $DISTDIR not recognized by distcheck

2004-05-17 Thread Richard Bos
Hello list,

I'm confused how to use DESTDIR in an install hook in combination with target 
distcheck.

When using $(prefix) in Makefile.am 'make distcheck' is succesfull,
but make DESTDIR=$PWD/blah fails:
(below is my result with DESTDIR in the Makefile.am instead of prefix)

---
# make DESTDIR=$PWD/blah
..
make  install-data-hook
make[4]: Entering directory `/tmp/server.tmp'
echo DEBUG DEBUG  DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
echo prefix /
prefix /
echo

for i in cgi-bin icons; do \
  install -d -m 0755 //srv/server/www/cgi-bin/$i; \
done
install: cannot create directory `//srv/server': Permission denied
install: cannot create directory `//srv/server': Permission denied


Makeinstall
---
install-data-hook:
echo DEBUG DEBUG  DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
echo prefix $(prefix)
echo $(webserver_document_root)
for i in cgi-bin icons; do \
  install -d -m 0755 $(prefix)/srv/server/www/cgi-bin/$$i; \
done
for i in freebusy locks; do \
  install -d -m 0777 $(prefix)/srv/server/www/cgi-bin/$$i; \
done
echo DEBUG DEBUG  DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG


If I change $(prefix) into $(DESTDIR) in the generated Makefile,
make DESTDIR=$PWD/blah install succeeds:
---
make  install-data-hook
make[4]: Entering directory `/tmp/server.tmp'
echo DEBUG DEBUG  DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
for i in cgi-bin icons; do \
  install -d -m 0755 /tmp/server.tmp/blah/srv/server/www/cgi-bin/$i; \
done
for i in freebusy locks; do \
  install -d -m 0777 /tmp/server.tmp/blah/srv/server/www/cgi-bin/$i; \
done
echo DEBUG DEBUG  DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
make[4]: Leaving directory `/tmp/server.tmp'



If I use $(DESTDIR) in Makefile.am instead of $(prefix) the make distcheck
fails:

# make distcheck
..
make  install-data-hook
make[5]: Entering directory `/tmp/server.tmp/server-2.0/_build'
echo DEBUG DEBUG  DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
echo DESTDIR
DESTDIR
for i in cgi-bin icons; do \
  install -d -m 0755 /srv/server/www/cgi-bin/$i; \
done
install: cannot create directory `/srv/server': Permission denied
install: cannot create directory `/srv/server': Permission denied
make[5]: *** [install-data-hook] Error 1


Makefile.am

install-data-hook:
echo DEBUG DEBUG  DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG
echo DESTDIR $(DESTDIR)
for i in cgi-bin icons; do \
  install -d -m 0755 $(DESTDIR)/srv/server/www/cgi-bin/$$i; \
done
for i in freebusy locks; do \
  install -d -m 0777 $(DESTDIR)/srv/server/www/cgi-bin/$$i; \
done
echo DEBUG DEBUG  DEBUG DEBUG DEBUG DEBUG DEBUG DEBUG

The 'make DESTDIR=$PWD/blah install' command succeeds.

Why does my 'make distcheck' fail??


--
TIA,
 
Richard Bos
Without a home the journey is endless





Re: confused: $DISTDIR not recognized by distcheck

2004-05-17 Thread Richard Bos
Op maandag 17 mei 2004 14:59, schreef Andrew Suffield:
 This would work:
            install -d -m 0755
 $(DESTDIR)$(prefix)/srv/server/www/cgi-bin/$$i; \

Rald, Andrew,

thank you both for your reply.  The above construction works indeed.

-- 
Richard Bos
Without a home the journey is endless





Re: how to address a directory as /srv

2004-05-15 Thread Richard Bos
Op zaterdag 15 mei 2004 03:31, schreef Andrew Suffield:
  Makefile.am
  wsadmindir = $(DESTDIR)/srv/www/html/server/admin

                ^^

 That's wrong. Take it out. Automake already supports DESTDIR natively;
 you're just stuffing it in the path twice.

It improve's the 'make DESTDIR= install' command.  This one is now 
succesfull.  The 'make distcheck' still fails with the 'no permission':
/bin/sh ../mkinstalldirs /srv/www/html/server/admin/addressbook
mkdir -p -- /srv/www/html/server/admin/addressbook
mkdir: cannot create directory `/srv/www/html': Permission denied
make[3]: *** [install-wsaddressbookDATA] Error 1

To me it looks like that 'distcheck' misses support to create directories that 
are not prefixed with an automake variable, is that possible?

-- 
Richard Bos
Without a home the journey is endless





Re: how to address a directory as /srv

2004-05-15 Thread Richard Bos
Op zaterdag 15 mei 2004 14:20, schreef Andrew Suffield:
 Ah, you need a $(prefix) in there, and you really want to add a
This works indeed.

 --srvdir argument to configure - but I don't think autoconf exposes an
 interface for doing that. You probably want to start by getting /srv
 explicitly supported by autoconf.

 Usual batch of --prefix problems apply

Like setting --bindir, --sbindir, etc explicitely?  But for now this seem to 
solve my problem.  Thanks, Andrew! 

-- 
Richard Bos
Without a home the journey is endless