automake
[Top][All Lists]
Advanced

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

problem with make maintainer-clean while doing static linking


From: Vincent Torri
Subject: problem with make maintainer-clean while doing static linking
Date: Thu, 9 Jul 2009 08:28:50 +0200 (CEST)


Hey,

We have a library that uses modules. These modules can be shared lib or can be statically linked to the library. We use that tree structure:

evas
  src
    lib
  modules
    loaders
      png

the library itself is in evas/src/lib
the modules (here the png loader) is in evas/src/modules/loaders/png
We first compile the library, then the modules.

the configure script allows user to choose if he wants shared lib or static linking for the loader.

In evas/src/lib/Makefile.am we have added:

if EVAS_STATIC_BUILD_PNG
SUBDIRS += ../modules/loaders/png
EVAS_STATIC_MODULE += ../modules/loaders/png/libevas_loader_png.la
EVAS_STATIC_LIBADD += @evas_image_loader_png_libs@
endif

And in evas/src/modules/loaders/png/Makefile.am:

if BUILD_LOADER_PNG
if !EVAS_STATIC_BUILD_PNG

pkgdir = $(libdir)/evas/modules/loaders/png/$(MODULE_ARCH)
pkg_LTLIBRARIES = module.la

module_la_SOURCES = evas_image_load_png.c

module_la_LIBADD = @EINA_LIBS@ @evas_image_loader_png_libs@ @EVIL_LIBS@ 
$(top_builddir)/src/lib/libevas.la
module_la_LDFLAGS = -no-undefined @lt_enable_auto_import@ -module -avoid-version
module_la_LIBTOOLFLAGS = --tag=disable-static

else

noinst_LTLIBRARIES = libevas_loader_png.la
libevas_loader_png_la_SOURCES = evas_image_load_png.c
libevas_loader_png_la_LIBADD = @evas_image_loader_png_libs@

endif
endif

The problem is that, when doing 'make maintainer-clean', the clean is done first in evas/src/lib, hence, with the code in evas/src/lib/Makefile.am, in evas/src/modules/loaders/png too. So no more Makefile in evas/src/modules/loaders/png. Then 'make maintainer-clean' is done later in evas/src/modules/loaders/png but as there is no Makefile, an error occurs.

I have 2 questions:

1) Is our use for doing static linking correct ? If no, what should I do instead ?

2) If yes, what should I do to correct the problem above (more precisely, I want 'make distcheck' to succeed, but it's the same problem than 'make maintainer-clean')

thank you

Vincent Torri




reply via email to

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