[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Module statically linked, and maintainer-clean rule
From: |
Vincent Torri |
Subject: |
Module statically linked, and maintainer-clean rule |
Date: |
Sun, 28 Oct 2012 11:34:54 +0100 |
Hey
Our project build some modules as shared lib. We added the possibility
to statically link them to the library with autoconf. We then define
BUILD_STATIC automake conditionnal to select what we want. The tree
directories are:
src/lib <--- where the lib is
src/module <-- where the module is.
* in src/module/Makefile.am:
if ! BUILD_STATIC
pkg_LTLIBRARIES = module.la
module_la_SOURCES = foo.c
else
noinst_LTLIBRARIES = mylib_module.la
mylib_module_la_SOURCES = foo.c
endif
* and in src/lib/Makefile.am
if BUILD_STATIC
SUBDIRS += ../module
mylib_la_LIBADD += ../module/mylib_module.la
endif
It works well, until I use the maintainer-clean rule. Indeed, because
of the SUBDIRS in src/lib/Makefile.am, maintainer-clean is launched
twice, hence an error as there is no Makefile anymore in src/module
when the 2nd maintainer-clean rule is executed.
I also tried this in src/lib/Makefile.am:
if BUILD_STATIC
mylib_la_SOURCES += ../module/foo.c
endif
but then same kind of error, with foo.Plo in src/module/.deps when the
2nd maintainer-clean rule is launched : that file does not exist
anymore
Does someone know what I have to do ?
thank you
Vincent Torri
- Module statically linked, and maintainer-clean rule,
Vincent Torri <=