[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnulib and automake
From: |
John W. Eaton |
Subject: |
Re: gnulib and automake |
Date: |
Sun, 15 Nov 2009 12:38:58 -0500 |
On 15-Nov-2009, Michael Goffioul wrote:
| I didn't change src/Makefile.am, so it's the same as yours. OCTINTERP_DLL_DEFS
| is only applied to liboctinterp_la_CPPFLAGS, but the latter gets appended to
| the compilation of oct files. Here's for instance a piece of my src/Makefile:
|
| DLD-FUNCTIONS/liboctinterp_la-__contourc__.lo: DLD-FUNCTIONS/__contourc__.cc
| # $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS)
| --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
| $(liboctinterp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT
| DLD-FUNCTIONS/liboctinterp_la-__contourc__.lo -MD -MP -MF
| DLD-FUNCTIONS/$(DEPDIR)/liboctinterp_la-__contourc__.Tpo -c -o
| DLD-FUNCTIONS/liboctinterp_la-__contourc__.lo `test -f
| 'DLD-FUNCTIONS/__contourc__.cc' || echo
| '$(srcdir)/'`DLD-FUNCTIONS/__contourc__.cc
| # $(am__mv)
| DLD-FUNCTIONS/$(DEPDIR)/liboctinterp_la-__contourc__.Tpo
| DLD-FUNCTIONS/$(DEPDIR)/liboctinterp_la-__contourc__.Plo
| source='DLD-FUNCTIONS/__contourc__.cc'
| object='DLD-FUNCTIONS/liboctinterp_la-__contourc__.lo' libtool=yes \
| DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) \
| $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS)
| --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
| $(liboctinterp_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c
| -o DLD-FUNCTIONS/liboctinterp_la-__contourc__.lo `test -f
| 'DLD-FUNCTIONS/__contourc__.cc' || echo
| '$(srcdir)/'`DLD-FUNCTIONS/__contourc__.cc
OK, automake is not being too smart here. It is generating these
rules as if __contourc__ (and other DLD-FUNCTIONS files) are part of
liboctinterp when they are not. The relevant part of src/Makefile.am
is
if AMCOND_ENABLE_DYNAMIC_LINKING
DLD_DYNAMIC_SRC = $(DLD_FUNCTIONS_SRC)
DLD_STATIC_SRC =
OCT_FILES = $(DLD_FUNCTIONS_SRC:.cc=.oct)
else
DLD_DYNAMIC_SRC =
DLD_STATIC_SRC = $(DLD_FUNCTIONS_SRC)
OCT_FILES =
endif
liboctinterp_la_SOURCES = \
$(DIST_SRC) \
$(DLD_STATIC_SRC) \
$(OPERATORS_SRC) \
$(TEMPLATE_INST_SRC)
DLD_DYNAMIC_DEF_FILES = $(DLD_DYNAMIC_SRC:.cc=.df)
DLD_STATIC_DEF_FILES = $(DLD_STATIC_SRC:.cc=.df)
SRC_DEF_FILES := $(shell $(srcdir)/find-defun-files.sh "$(srcdir)"
$(DIST_SRC))
DEF_FILES = $(SRC_DEF_FILES) $(DLD_DYNAMIC_DEF_FILES) $(DLD_STATIC_DEF_FILES)
The problem persists even if I write this as
if AMCOND_ENABLE_DYNAMIC_LINKING
OCT_FILES = $(DLD_FUNCTIONS_SRC:.cc=.oct)
liboctinterp_la_SOURCES = \
$(DIST_SRC) \
$(OPERATORS_SRC) \
$(TEMPLATE_INST_SRC)
else
OCT_FILES =
liboctinterp_la_SOURCES = \
$(DIST_SRC) \
$(OPERATORS_SRC) \
$(TEMPLATE_INST_SRC) \
$(DLD_FUNCTIONS_SRC)
endif
DEF_FILES = \
$(shell $(srcdir)/find-defun-files.sh "$(srcdir)" $(DIST_SRC)) \
$(DLD_FUNCTIONS_SRC:.cc=.df)
Since you want to do dynamic linking, try the following change and see
if it solves the problem. Then I will try to figure out if this is a
bug in automake or just pilot error.
jwe
diff --git a/src/Makefile.am b/src/Makefile.am
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -430,28 +430,15 @@
include OPERATORS/module.mk
include TEMPLATE-INST/module.mk
-if AMCOND_ENABLE_DYNAMIC_LINKING
- DLD_DYNAMIC_SRC = $(DLD_FUNCTIONS_SRC)
- DLD_STATIC_SRC =
- OCT_FILES = $(DLD_FUNCTIONS_SRC:.cc=.oct)
-else
- DLD_DYNAMIC_SRC =
- DLD_STATIC_SRC = $(DLD_FUNCTIONS_SRC)
- OCT_FILES =
-endif
-
+OCT_FILES = $(DLD_FUNCTIONS_SRC:.cc=.oct)
liboctinterp_la_SOURCES = \
$(DIST_SRC) \
- $(DLD_STATIC_SRC) \
$(OPERATORS_SRC) \
$(TEMPLATE_INST_SRC)
-DLD_DYNAMIC_DEF_FILES = $(DLD_DYNAMIC_SRC:.cc=.df)
-DLD_STATIC_DEF_FILES = $(DLD_STATIC_SRC:.cc=.df)
-
-SRC_DEF_FILES := $(shell $(srcdir)/find-defun-files.sh "$(srcdir)" $(DIST_SRC))
-
-DEF_FILES = $(SRC_DEF_FILES) $(DLD_DYNAMIC_DEF_FILES) $(DLD_STATIC_DEF_FILES)
+DEF_FILES = \
+ $(shell $(srcdir)/find-defun-files.sh "$(srcdir)" $(DIST_SRC)) \
+ $(DLD_FUNCTIONS_SRC:.cc=.df)
if AMCOND_ENABLE_DYNAMIC_LINKING
OCTAVE_LIBS = \
- Re: gnulib and automake, (continued)
- Re: gnulib and automake, Michael Goffioul, 2009/11/13
- Re: gnulib and automake, John W. Eaton, 2009/11/13
- Re: gnulib and automake, John W. Eaton, 2009/11/13
- Re: gnulib and automake, Michael Goffioul, 2009/11/13
- Re: gnulib and automake, John W. Eaton, 2009/11/13
- Re: gnulib and automake, John W. Eaton, 2009/11/13
- Re: gnulib and automake, Michael Goffioul, 2009/11/14
- Re: gnulib and automake, Michael Goffioul, 2009/11/15
- Re: gnulib and automake, John W. Eaton, 2009/11/15
- Re: gnulib and automake, Michael Goffioul, 2009/11/15
- Re: gnulib and automake,
John W. Eaton <=
- Re: gnulib and automake, Michael Goffioul, 2009/11/15
- Re: gnulib and automake, John W. Eaton, 2009/11/15
- Re: gnulib and automake, Michael Goffioul, 2009/11/16
- Re: gnulib and automake, John W. Eaton, 2009/11/16
- Re: gnulib and automake, Michael Goffioul, 2009/11/17
- Re: gnulib and automake, John W. Eaton, 2009/11/17
- Re: gnulib and automake, Michael Goffioul, 2009/11/17
- Re: gnulib and automake, John W. Eaton, 2009/11/17