automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Advice on autoconfiscating a package


From: tomas
Subject: Advice on autoconfiscating a package
Date: Mon, 22 Mar 2004 17:20:17 +0100
User-agent: Mutt/1.5.3i

Automake gurus,

I'm trying to convert a package to using Automake.
At first sight it looked easy. It's a Zope product.

There's not much to do excepr copying a few files
to a target directory (preserving directory structure,
which is something like four-deep).

There's just one file I have some substitutions to
do, and AC_SUBST does its job perfectly.

The subdir part is causing me problems and I seem
to be just too dumb to extract the necessary
information from the manuals.

Here's my directory layout (strongly simplified):

    CMSConnector
    |-- AUTHORS
    |-- CMSConnector.py
    |-- CMSDebug.py
    |-- CMSResource.py
    |-- __init__.py.in
    |-- dtml
    |   |-- CMSConnector
    |   |   |-- add.dtml
    |   |   |-- debug.dtml
    |   |   |-- main.dtml
    |   |   `-- search.dtml
    |   `-- CMSResource
    |       |-- addCMSResourceForm.dtml
    |       |-- collection_props.dtml
    |       |-- components
    |       |   |-- add_object_widget.dtml
    |       |   |-- collection_item_row.dtml
    |       |   `-- select_style.dtml
    |       `-- views
    |           |-- manage_article.dtml
    |           |-- manage_centerpage.dtml
    |           `-- xsl_lab.dtml
    `-- resources
        |-- Preview.gif
        |-- collection.gif
        |-- connector.gif
        `-- u_arrow.gif

Now CMSConnector/configure.ac:

 ,---------------------------------------------------------
 | AC_INIT(CMSConnector,0.8)
 | AM_INIT_AUTOMAKE
 | # Hmmm. This looks fragile, but what shall I do?
 | bindir=\${prefix}
 | datadir=\${prefix}
 | # By default, those substs are ``identity'':
 | AC_SUBST(CMSConnector,CMSConnector)
 | AC_SUBST(CMSResource,CMSResource)
 | address@hidden@
 | AC_PREFIX_DEFAULT([/tmp/test-zope-install/Products/${product}])
 | # FIXME: check macro call:
 | AC_CONFIG_FILES([Makefile __init__.py])
 | AC_OUTPUT
 `---------------------------------------------------------

and CMSConnector/Makefile.am:

 ,---------------------------------------------------------
 | SUBDIRS = dtml resources
 | BUILT_SOURCES =__init__.py
 | bin_SCRIPTS = __init__.py CMSConnector.py CMSResource.py \
 |                CMSDebug.py XSLHelper.py
 | CLEANFILES = $(BUILT_SOURCES)
 | 
 | __init__.py: __init__.py.in
 `---------------------------------------------------------

Substitutions in __init__.py.in work as intended, and the install
target works as well, but the subdirs part doesn't:

 ,---------------------------------------------------------
 | [edoras]~/Zeit/CMS/CMSConnector.current> mkdir .build
 | [edoras]~/Zeit/CMS/CMSConnector.current> cd .build
 | [edoras]~/Zeit/CMS/CMSConnector.current/.build> ../configure
 | checking for a BSD-compatible install... /usr/bin/ginstall -c
 | checking whether build environment is sane... yes
 | checking whether make sets ${MAKE}... yes
 | checking for working aclocal... found
 | checking for working autoconf... found
 | checking for working automake... found
 | checking for working autoheader... found
 | checking for working makeinfo... found
 | configure: creating ./config.status
 | config.status: creating Makefile
 | config.status: creating __init__.py
 | [edoras]~/Zeit/CMS/CMSConnector.current/.build> make install
 | cd . \
 |   && CONFIG_FILES=Makefile CONFIG_HEADERS= /bin/sh ./config.status
 | config.status: creating Makefile
 | Making install in dtml
 | /bin/sh: cd: dtml: No such file or directory
 | make: *** [install-recursive] Error 1
 | [edoras]~/Zeit/CMS/CMSConnector.current/.build> cd ..
 | [edoras]~/Zeit/CMS/CMSConnector.current> exit
 `---------------------------------------------------------

(actually, the deeper subdirectories contain Makefile.am's,
 like so:)

CMSConnector/dtml/Makefile.am:
 ,---------------------------------------------------------
 | dtmldir = $(prefix)/dtml
 | SUBDIRS = CMSConnector
 `---------------------------------------------------------

and CMSConnector/dtml/CMSConnector/Makefile.am:
 ,---------------------------------------------------------
 | dtml_DATA = add.dtml \
 |             debug.dtml \
 |             main.dtml \
 |             search.dtml
 | 
 `---------------------------------------------------------

Mangling directory structure too much would be a pain, since
the thing lives on CVS :-(

Sorry for posing such stupid questions, but I'm having a very
hard time with a seemingly simple problem.

It's autoconf 2.53 and automake 1.4-p4 on a middle-aged Debian
GNU/Linux system.

Thanks
-- tomás




reply via email to

[Prev in Thread] Current Thread [Next in Thread]