You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Jason Stewart <ja...@gmail.com> on 2008/03/12 23:04:43 UTC

problems with automake on FreeBSD (minotaur)

Hey,

I need help with the new build system.

I added 'swig' into SUBDIRS in Makefile.am and on linux this is
sufficient to build a Makefile.in from the Makefile.am in the swig/
directory.

I tested this on minotaur and apparently it isn't working on FreeBSD?
Because after a ./reconf and ./configure I do not get a Makefile.in
and thus not a Makefile...

I ran automake with -v and it never reads swig/Makefile.am on minotaur.

Does this happen with other architectures?

How can I tell automake to build my Makefile.in?

Cheers, jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: problems with automake on FreeBSD (minotaur)

Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Hi Jason,

Jason Stewart <ja...@gmail.com> writes:

> On 13/03/2008, Boris Kolpackov <bo...@codesynthesis.com> wrote:
>
> > BTW, if you make swig build by default (and that's what what
> >  happens if you add it to SUBDIRS in top-level Makefile.am), you
> >  need to make sure that all other build targets are also implemented.
> >  These include 'all', 'clean', 'distclean', 'install', and 'dist'.
> >  Normally, automake takes care of this but since you use a different
> >  build system (Makefile.PL), you will need to make sure that these
> >  targets are implemented properly.
>
> Since I am not wanting to make the components in swig/ by default, is
> this still important? There would be problems with the 'all' target -
> right now it means 'make perl', but later with more target languages
> it wouldn't make sense, so why implement it now? 'dist' and 'install'
> are the same, but 'clean', and 'distclean' are useful and I will
> implement them regardless.

Sorry, I missed this email. I think we first need to decide how to
split swig. If we leave something "buildable" in Xerces-C++ (that
will be included in the build if configured with --with-swig) then
we need to support all those targets. Hopefully the only thin we
will need to build is util which will use automake so this will
all be taken care automatically.

Boris

-- 
Boris Kolpackov, Code Synthesis Tools
Open source XML data binding for C++:   http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: problems with automake on FreeBSD (minotaur)

Posted by Jason Stewart <ja...@gmail.com>.
Hey Boris,

On 13/03/2008, Boris Kolpackov <bo...@codesynthesis.com> wrote:

> BTW, if you make swig build by default (and that's what what
>  happens if you add it to SUBDIRS in top-level Makefile.am), you
>  need to make sure that all other build targets are also implemented.
>  These include 'all', 'clean', 'distclean', 'install', and 'dist'.
>  Normally, automake takes care of this but since you use a different
>  build system (Makefile.PL), you will need to make sure that these
>  targets are implemented properly.

Since I am not wanting to make the components in swig/ by default, is
this still important? There would be problems with the 'all' target -
right now it means 'make perl', but later with more target languages
it wouldn't make sense, so why implement it now? 'dist' and 'install'
are the same, but 'clean', and 'distclean' are useful and I will
implement them regardless.

Cheers, jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: problems with automake on FreeBSD (minotaur)

Posted by Jason Stewart <ja...@gmail.com>.
Hey Boris,

On 14/03/2008, Boris Kolpackov <bo...@codesynthesis.com> wrote:

> You can write normal Makefile rules in Makefile.am. You can use
>  the existing test-suite target found in the top-level Makefile.am
>  as a starting point. While you can easily create, targets such
>  as xerces-p (to build) xerces-c-check (to test), and xerces-c-install
>  (install), other targets such as clean, distclean, and dist should
>  work throughout the distribution which might be more tricky. I
>  suggest that you check the Automake documentation to find out how
>  to this:
>
>  http://sources.redhat.com/automake/automake.html
>

Right, thanks. My problem has been once there is a large existing set
of autoconf/automake rules, it becomes really hard to understand how
it all fits together. In the world of Perl, autoconf is not used -
MakeMaker is, in the world of Java its Ant, in Ruby it's rake... So
I'm really wanting to make sure I add the pieces into Xerces-C
properly and not mess it up..

>  For example, reading Section 13, "What Gets Cleaned", it appear that
>  you can use the clean-local and distclean-local to connect makefiles
>  in swig, something along these lines:
>
>  clean-local:
>         $(MAKE) -C swig clean

Ah! That helps. Because often I want the default targets generated for
most sub-directories, for example swig/util/, but for other
directories I need something special, say for swig/perl/.

I'll look into this. Cheers, jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: problems with automake on FreeBSD (minotaur)

Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Hi Jason,

Jason Stewart <ja...@gmail.com> writes:

> Ah, thanks for explaining. I do *not* want swig/ built by default.

Ok, then I removed swig from the SUBDIRS list.

> It is only intended for people who want to install the perl bindings
> - I need help learning how to put a xerces-p: target in the
> Makefile.am - and for running the test-suite.

You can write normal Makefile rules in Makefile.am. You can use
the existing test-suite target found in the top-level Makefile.am
as a starting point. While you can easily create, targets such
as xerces-p (to build) xerces-c-check (to test), and xerces-c-install
(install), other targets such as clean, distclean, and dist should
work throughout the distribution which might be more tricky. I
suggest that you check the Automake documentation to find out how
to this:

http://sources.redhat.com/automake/automake.html

For example, reading Section 13, "What Gets Cleaned", it appear that
you can use the clean-local and distclean-local to connect makefiles
in swig, something along these lines:

clean-local:
	$(MAKE) -C swig clean


Boris

-- 
Boris Kolpackov, Code Synthesis Tools
Open source XML data binding for C++:   http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: problems with automake on FreeBSD (minotaur)

Posted by Jason Stewart <ja...@gmail.com>.
Hey Boris,

On 13/03/2008, Boris Kolpackov <bo...@codesynthesis.com> wrote:

> BTW, if you make swig build by default (and that's what what
>  happens if you add it to SUBDIRS in top-level Makefile.am),

Ah, thanks for explaining. I do *not* want swig/ built by default.

It is only intended for people who want to install the perl bindings
- I need help learning how to put a xerces-p: target in the
Makefile.am - and for running the test-suite.

>  > How can I tell automake to build my Makefile.in?
>
>
> I think you need to add swig/Makefile to the AC_CONFIG_FILES section
>  in configure.ac.
>

Ah!!! Thanks Boris. That's what I was missing.

I committed those changes and noticed that you had commented out the
test-suite for the beta - that's fine.

Cheers, jas.

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


Re: problems with automake on FreeBSD (minotaur)

Posted by Boris Kolpackov <bo...@codesynthesis.com>.
Hi Jason,

Jason Stewart <ja...@gmail.com> writes:

> I added 'swig' into SUBDIRS in Makefile.am and on linux this is
> sufficient to build a Makefile.in from the Makefile.am in the swig/
> directory.

BTW, if you make swig build by default (and that's what what
happens if you add it to SUBDIRS in top-level Makefile.am), you
need to make sure that all other build targets are also implemented.
These include 'all', 'clean', 'distclean', 'install', and 'dist'.
Normally, automake takes care of this but since you use a different
build system (Makefile.PL), you will need to make sure that these
targets are implemented properly.

In addition, you will probably also need to add configure checks
if the tools that you use in swig are available (e.g., perl, the
swig compiler if there is such a thing, etc.).

> How can I tell automake to build my Makefile.in?

I think you need to add swig/Makefile to the AC_CONFIG_FILES section
in configure.ac.

Boris

-- 
Boris Kolpackov, Code Synthesis Tools
Open source XML data binding for C++:   http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org