FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 02-14-2009, 01:18 PM
Joris Dobbelsteen
 
Default Using automake

Hello,

I'm trying to build a application and was trying to use automake with
it. Now I've stumbled upon an issue, see below, I cannot resolve for a
few days. I think it is somewhere(tm) in the manual though.


Can anyone point me to the problem and/or solution?

Thanks,

- Joris

=====================

The error I get is:

make -k all
make all-recursive
make[1]: Entering directory
`/home/joris/livecdrecorder-project/liverecorder'

Making all in src
make[2]: Entering directory
`/home/joris/livecdrecorder-project/liverecorder/src'
g++ -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT streamprocessor.o -MD -MP
-MF .deps/streamprocessor.Tpo -c -o streamprocessor.o `test -f
'libsp/streamprocessor.cpp' || echo './'`libsp/streamprocessor.cpp

mv -f .deps/streamprocessor.Tpo .deps/streamprocessor.Po
rm -f libsp.a
ar cru libsp.a streamprocessor.o
ranlib libsp.a
make[2]: *** No rule to make target `livecdrecorder.o', needed by
`livecdrecorder'.

make[2]: Target `all' not remade because of errors.
make[2]: Leaving directory
`/home/joris/livecdrecorder-project/liverecorder/src'
make[2]: Entering directory
`/home/joris/livecdrecorder-project/liverecorder'

make[2]: Leaving directory `/home/joris/livecdrecorder-project/liverecorder'
make[1]: Leaving directory `/home/joris/livecdrecorder-project/liverecorder'
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

===================

makefile.am:

SUBDIRS = src
dist_doc_DATA = README


====================

src/makefile.am:

#SUBDIRS = libsp livecdrecorder

bin_PROGRAMS = livecdrecorder
lib_LIBRARIES = libsp.a

livecdrecorder_SOURCE = livecdrecorder/main.c
livecdrecorder_LDADD = libsp

libsp_a_SOURCES = libsp/streamprocessor.cpp
include_HEADERS = libsp/streamprocessor.h


=====================

configure.ac

AC_INIT([livecdrecorder], [0.1], [myname@mydomain])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_PROG_CC
AC_PROG_CXX
AC_PROG_RANLIB
#AC_PROG_LIBTOOL
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
Makefile
src/Makefile
])
AC_OUTPUT


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-15-2009, 04:58 PM
Laurent Guignard
 
Default Using automake

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Joris Dobbelsteen a écrit :
> Hello,
>
> I'm trying to build a application and was trying to use automake with
> it. Now I've stumbled upon an issue, see below, I cannot resolve for a
> few days. I think it is somewhere(tm) in the manual though.
>
> Can anyone point me to the problem and/or solution?
>
> Thanks,
>
> - Joris
>
> =====================
>
> The error I get is:
>
> make -k all
> make all-recursive
> make[1]: Entering directory
> `/home/joris/livecdrecorder-project/liverecorder'
> Making all in src
> make[2]: Entering directory
> `/home/joris/livecdrecorder-project/liverecorder/src'
> g++ -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT streamprocessor.o -MD -MP
> -MF .deps/streamprocessor.Tpo -c -o streamprocessor.o `test -f
> 'libsp/streamprocessor.cpp' || echo './'`libsp/streamprocessor.cpp
> mv -f .deps/streamprocessor.Tpo .deps/streamprocessor.Po
> rm -f libsp.a
> ar cru libsp.a streamprocessor.o
> ranlib libsp.a
> make[2]: *** No rule to make target `livecdrecorder.o', needed by
> `livecdrecorder'.
> make[2]: Target `all' not remade because of errors.
> make[2]: Leaving directory
> `/home/joris/livecdrecorder-project/liverecorder/src'
> make[2]: Entering directory
> `/home/joris/livecdrecorder-project/liverecorder'
> make[2]: Leaving directory
> `/home/joris/livecdrecorder-project/liverecorder'
> make[1]: Leaving directory
> `/home/joris/livecdrecorder-project/liverecorder'
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
>
> ===================
>
> makefile.am:
>
> SUBDIRS = src
> dist_doc_DATA = README
>
>
> ====================
>
> src/makefile.am:
>
> #SUBDIRS = libsp livecdrecorder
>
> bin_PROGRAMS = livecdrecorder
> lib_LIBRARIES = libsp.a
>
> livecdrecorder_SOURCE = livecdrecorder/main.c
> livecdrecorder_LDADD = libsp
>
> libsp_a_SOURCES = libsp/streamprocessor.cpp
> include_HEADERS = libsp/streamprocessor.h
>
>
> =====================
>
> configure.ac
>
> AC_INIT([livecdrecorder], [0.1], [myname@mydomain])
> AM_INIT_AUTOMAKE([-Wall -Werror foreign])
> AC_PROG_CC
> AC_PROG_CXX
> AC_PROG_RANLIB
> #AC_PROG_LIBTOOL
> AC_CONFIG_HEADERS([config.h])
> AC_CONFIG_FILES([
> Makefile
> src/Makefile
> ])
> AC_OUTPUT
>
>

Hi Joris,
I think that you need a Makefile in your directory "livecdrecorder" to
build all sources in this directory.
For me projects, i build a Makefile.am in each sub-drirectories of
project and include SUBDIRS directive in parent directory Makefile.am
So after you build the livecdrecorder.o, you will be able to build your
software.
I think it's the same for your libsp/streamprocessor.o

May be i am wrong, or it isn't the good way to get the binary, but in my
projects this is working.

Best regards,
Laurent

- --
Laurent Guignard, Registered as user #301590 with the Linux Counter
Site : http://www.famille-guignard.org
Blog : http://blog.famille-guignard.org
Projet : http://sicontact.sourceforge.net
GULL de Villefranche sur Saône : http://www.cagull.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFJmFfYjcKpXFc/7oYRApukAKCoMrxqxZETXCaxA4Ts9fJei+Ao9ACeLGO+
0Y3tjngtY5nkxHV52SAikvM=
=7NTk
-----END PGP SIGNATURE-----


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-16-2009, 08:48 PM
Joris Dobbelsteen
 
Default Using automake

Laurent Guignard wrote, On 15-02-09 18:58:

Joris Dobbelsteen a écrit :

Hello,

I'm trying to build a application and was trying to use automake with
it. Now I've stumbled upon an issue, see below, I cannot resolve for a
few days. I think it is somewhere(tm) in the manual though.

Can anyone point me to the problem and/or solution?

Thanks,

- Joris

=====================

The error I get is:

make -k all
make all-recursive
make[1]: Entering directory
`/home/joris/livecdrecorder-project/liverecorder'
Making all in src
make[2]: Entering directory
`/home/joris/livecdrecorder-project/liverecorder/src'
g++ -DHAVE_CONFIG_H -I. -I.. -g -O2 -MT streamprocessor.o -MD -MP
-MF .deps/streamprocessor.Tpo -c -o streamprocessor.o `test -f
'libsp/streamprocessor.cpp' || echo './'`libsp/streamprocessor.cpp
mv -f .deps/streamprocessor.Tpo .deps/streamprocessor.Po
rm -f libsp.a
ar cru libsp.a streamprocessor.o
ranlib libsp.a
make[2]: *** No rule to make target `livecdrecorder.o', needed by
`livecdrecorder'.
make[2]: Target `all' not remade because of errors.
make[2]: Leaving directory
`/home/joris/livecdrecorder-project/liverecorder/src'
make[2]: Entering directory
`/home/joris/livecdrecorder-project/liverecorder'
make[2]: Leaving directory
`/home/joris/livecdrecorder-project/liverecorder'
make[1]: Leaving directory
`/home/joris/livecdrecorder-project/liverecorder'
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

===================

makefile.am:

SUBDIRS = src
dist_doc_DATA = README


====================

src/makefile.am:

#SUBDIRS = libsp livecdrecorder

bin_PROGRAMS = livecdrecorder
lib_LIBRARIES = libsp.a

livecdrecorder_SOURCE = livecdrecorder/main.c
livecdrecorder_LDADD = libsp

libsp_a_SOURCES = libsp/streamprocessor.cpp
include_HEADERS = libsp/streamprocessor.h


=====================

configure.ac

AC_INIT([livecdrecorder], [0.1], [myname@mydomain])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_PROG_CC
AC_PROG_CXX
AC_PROG_RANLIB
#AC_PROG_LIBTOOL
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
Makefile
src/Makefile
])
AC_OUTPUT




Hi Joris,
I think that you need a Makefile in your directory "livecdrecorder" to
build all sources in this directory.
For me projects, i build a Makefile.am in each sub-drirectories of
project and include SUBDIRS directive in parent directory Makefile.am
So after you build the livecdrecorder.o, you will be able to build your
software.
I think it's the same for your libsp/streamprocessor.o
May be i am wrong, or it isn't the good way to get the binary, but in my
projects this is working.


I think you mean that you mean the SUBDIRS directive should be enabled
again and the respective _SOURCE _LDADD BIN_ LIB_ directives should move
to the subdirecties makefile.am?
That was the path I had taken earlier and it was the same (worse
actually) misery as I'm currently in.


If you don't mind, I would really like to see an example of your
configure.ac and makefile.am files as reference. The examples in the
automake manual are just too trivial for my taste. I really don't have
any clue in how to get this thing to work.


Thanks,

- Joris


Best regards,
Laurent

- --
Laurent Guignard, Registered as user #301590 with the Linux Counter
Site : http://www.famille-guignard.org
Blog : http://blog.famille-guignard.org
Projet : http://sicontact.sourceforge.net
GULL de Villefranche sur Saône : http://www.cagull.org



--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 08:07 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org