octave-maintainers
[Top][All Lists]
Advanced

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

FYI: libcruft merged into liboctave


From: John W. Eaton
Subject: FYI: libcruft merged into liboctave
Date: Sat, 1 Sep 2012 02:01:20 -0400

On 31-Aug-2012, Rik wrote:

| 8/31/12
| 
| All,
| 
| I have refactored liboctave into multiple directories using convenience
| libraries.  In addition, the top-level directory and library libcruft is
| now a subdirectory and sublibrary of liboctave. 
| 
| The source tree will hopefully be slightly easier to understand for new
| programmers coming to Octave.  A side effect, however, has been an
| explosion in the number of -I include statements during the build process.
| 
| As always, the exact division of files may be imperfect and is open to
| tinkering.

I had to make the changes in the attached patch to get the build to
finish successfully.

jwe

diff --git a/libgui/src/Makefile.am b/libgui/src/Makefile.am
--- a/libgui/src/Makefile.am
+++ b/libgui/src/Makefile.am
@@ -103,9 +103,16 @@
   -I$(srcdir)/m-editor \
   -I$(srcdir)/octave-adapter \
   -I$(srcdir)/qtinfo \
+  -I../../liboctave \
+  -I../../liboctave/numeric \
+  -I../../liboctave/operators \
+  -I$(srcdir)/../../liboctave \
+  -I$(srcdir)/../../liboctave/array \
   -I$(srcdir)/../../liboctave/cruft/misc \
-  -I../../liboctave \
-  -I$(srcdir)/../../liboctave \
+  -I$(srcdir)/../../liboctave/numeric \
+  -I$(srcdir)/../../liboctave/operators \
+  -I$(srcdir)/../../liboctave/system \
+  -I$(srcdir)/../../liboctave/util \
   -I../../libinterp \
   -I../../libinterp/interp-core \
   -I../../libinterp/interpfcn \
diff --git a/libinterp/link-deps.mk b/libinterp/link-deps.mk
--- a/libinterp/link-deps.mk
+++ b/libinterp/link-deps.mk
@@ -7,7 +7,6 @@
 endif
 
 LIBOCTINTERP_LINK_DEPS += \
-       $(GNULIB_LINK_DEPS) \
   $(GRAPHICS_LIBS) \
   $(FT2_LIBS) \
   $(HDF5_LIBS) \
diff --git a/liboctave/Makefile.am b/liboctave/Makefile.am
--- a/liboctave/Makefile.am
+++ b/liboctave/Makefile.am
@@ -28,8 +28,8 @@
 
 ## Search local directories before those specified by the user.
 AM_CPPFLAGS = \
+  -I$(srcdir)/array \
   -I$(srcdir)/cruft/misc \
-  -I$(srcdir)/array \
   -Inumeric -I$(srcdir)/numeric \
   -Ioperators -I$(srcdir)/operators \
   -I$(srcdir)/system \
@@ -94,11 +94,13 @@
 
 liboctave_la_LIBADD = \
   array/libarray.la \
-       cruft/libcruft.la \
-       numeric/libnumeric.la \
-       operators/liboperators.la \
-       system/libsystem.la \
-       util/libutil.la \
+  cruft/libcruft.la \
+  cruft/ranlib/libranlib.la \
+  numeric/libnumeric.la \
+  operators/liboperators.la \
+  system/libsystem.la \
+  util/libutil.la \
+  ../libgnu/libgnu.la \
   $(LIBOCTAVE_LINK_DEPS)
 
 # Increment these as needed and according to the rules in the libtool manual:
diff --git a/liboctave/cruft/Makefile.am b/liboctave/cruft/Makefile.am
--- a/liboctave/cruft/Makefile.am
+++ b/liboctave/cruft/Makefile.am
@@ -26,7 +26,7 @@
 AM_CPPFLAGS = \
   -I$(top_builddir)/libgnu -I$(top_srcdir)/libgnu
 
-octlib_LTLIBRARIES = libcruft.la
+noinst_LTLIBRARIES = libcruft.la
 
 libcruft_la_SOURCES =
 
@@ -38,34 +38,13 @@
   @CRUFT_DLL_DEFS@ \
   $(AM_CPPFLAGS)
 
-include link-deps.mk
-
-libcruft_la_LIBADD = \
-  libranlib.la \
-  $(top_builddir)/libgnu/libgnu.la \
-  $(LIBCRUFT_LINK_DEPS)
-
-# Increment these as needed and according to the rules in the libtool manual:
-libcruft_current = 1
-libcruft_revision = 0
-libcruft_age = 0
-
-libcruft_version_info = 
$(libcruft_current):$(libcruft_revision):$(libcruft_age)
-
-libcruft_la_LDFLAGS = \
-  -version-info $(libcruft_version_info) \
-  $(NO_UNDEFINED_LDFLAG) \
-  @XTRA_CRUFT_SH_LDFLAGS@ \
-  -bindir $(bindir) \
-  $(LIBCRUFT_LINK_OPTS)
-
 libcruft_la_DEPENDENCIES = cruft.def
 
-noinst_LTLIBRARIES = libranlib.la
+noinst_LTLIBRARIES += ranlib/libranlib.la
 
-libranlib_la_SOURCES =
+ranlib_libranlib_la_SOURCES =
 
-libranlib_la_DEPENDENCIES = ranlib.def
+ranlib_libranlib_la_DEPENDENCIES = ranlib.def
 
 octinclude_HEADERS =
 
diff --git a/liboctave/cruft/link-deps.mk b/liboctave/cruft/link-deps.mk
deleted file mode 100644
--- a/liboctave/cruft/link-deps.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-GNULIB_LINK_DEPS = \
-  $(COPYSIGNF_LIBM)\
-  $(COPYSIGN_LIBM)\
-  $(FLOOR_LIBM)\
-  $(GETHOSTNAME_LIB)\
-  $(LIBSOCKET)\
-  $(LIB_NANOSLEEP)\
-  $(LIB_SELECT)\
-  $(LTLIBINTL)\
-  $(ROUNDF_LIBM)\
-  $(ROUND_LIBM)\
-  $(TRUNCF_LIBM)\
-  $(TRUNC_LIBM)
-
-LIBCRUFT_LINK_DEPS = \
-       $(GNULIB_LINK_DEPS) \
-  $(LAPACK_LIBS) \
-  $(BLAS_LIBS) \
-  $(FLIBS) \
-  $(LIBS)
-
-LIBCRUFT_LINK_OPTS =
-
diff --git a/liboctave/cruft/ranlib/module.mk b/liboctave/cruft/ranlib/module.mk
--- a/liboctave/cruft/ranlib/module.mk
+++ b/liboctave/cruft/ranlib/module.mk
@@ -9,7 +9,7 @@
   ranlib/tstgmn.for \
   ranlib/tstmid.for
 
-libranlib_la_SOURCES += \
+ranlib_libranlib_la_SOURCES += \
   ranlib/advnst.f \
   ranlib/genbet.f \
   ranlib/genchi.f \
diff --git a/liboctave/link-deps.mk b/liboctave/link-deps.mk
--- a/liboctave/link-deps.mk
+++ b/liboctave/link-deps.mk
@@ -1,7 +1,19 @@
-include $(top_srcdir)/liboctave/cruft/link-deps.mk
+GNULIB_LINK_DEPS = \
+  $(COPYSIGNF_LIBM)\
+  $(COPYSIGN_LIBM)\
+  $(FLOOR_LIBM)\
+  $(GETHOSTNAME_LIB)\
+  $(LIBSOCKET)\
+  $(LIB_NANOSLEEP)\
+  $(LIB_SELECT)\
+  $(LTLIBINTL)\
+  $(ROUNDF_LIBM)\
+  $(ROUND_LIBM)\
+  $(TRUNCF_LIBM)\
+  $(TRUNC_LIBM)
 
 LIBOCTAVE_LINK_DEPS = \
-       $(GNULIB_LINK_DEPS) \
+  $(GNULIB_LINK_DEPS) \
   $(SPARSE_XLIBS) \
   $(ARPACK_LIBS) \
   $(QRUPDATE_LIBS) \
@@ -14,6 +26,7 @@
   $(REGEX_LIBS) \
   $(DL_LIBS) \
   $(PTHREAD_LIBS) \
+  $(FLIBS) \
   $(LIBS)
 
 LIBOCTAVE_LINK_OPTS = \
@@ -21,8 +34,3 @@
   $(ARPACK_LDFLAGS) \
   $(QRUPDATE_LDFLAGS) \
   $(FFTW_XLDFLAGS)
-
-if AMCOND_LINK_ALL_DEPS
-  LIBOCTAVE_LINK_DEPS += $(LIBCRUFT_LINK_DEPS)
-  LIBOCTAVE_LINK_OPTS += $(LIBCRUFT_LINK_OPTS)
-endif
diff --git a/liboctave/operators/module.mk b/liboctave/operators/module.mk
--- a/liboctave/operators/module.mk
+++ b/liboctave/operators/module.mk
@@ -46,13 +46,13 @@
 
 ## Special rules for sources which must be built before rest of compilation.
 $(VX_OP_INC) $(VX_OP_SRC) : $(OP_SRCDIR)/mk-ops.awk operators/vx-ops
-       (cd operators; $(AWK) -f ../$(OP_SRCDIR)/mk-ops.awk prefix=vx 
../$(OP_SRCDIR)/vx-ops)
+       (cd operators; $(AWK) -f $(OP_SRCDIR)/mk-ops.awk prefix=vx 
$(OP_SRCDIR)/vx-ops)
 
 $(MX_OP_INC) $(MX_OP_SRC) : $(OP_SRCDIR)/mk-ops.awk operators/mx-ops
-       (cd operators; $(AWK) -f ../$(OP_SRCDIR)/mk-ops.awk prefix=mx 
../$(OP_SRCDIR)/mx-ops)
+       (cd operators; $(AWK) -f $(OP_SRCDIR)/mk-ops.awk prefix=mx 
$(OP_SRCDIR)/mx-ops)
 
 $(SMX_OP_INC) $(SMX_OP_SRC) : $(OP_SRCDIR)/sparse-mk-ops.awk 
operators/sparse-mx-ops
-       (cd operators; $(AWK) -f ../$(OP_SRCDIR)/sparse-mk-ops.awk prefix=smx 
../$(OP_SRCDIR)/sparse-mx-ops)
+       (cd operators; $(AWK) -f $(OP_SRCDIR)/sparse-mk-ops.awk prefix=smx 
$(OP_SRCDIR)/sparse-mx-ops)
 
 operators/mx-ops.h : $(OP_SRCDIR)/mk-ops.awk operators/mx-ops
        $(AWK) -f $(OP_SRCDIR)/mk-ops.awk prefix=mx 
make_inclusive_header=mx-ops.h $(OP_SRCDIR)/mx-ops > address@hidden
diff --git a/src/Makefile.am b/src/Makefile.am
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -22,8 +22,11 @@
 
 ## Search local directories before those specified by the user.
 AM_CPPFLAGS = \
-  -I$(srcdir)/../libcruft/misc \
   -I$(srcdir)/../liboctave \
+  -I$(srcdir)/../liboctave/array \
+  -I$(srcdir)/../liboctave/cruft/misc \
+  -I$(srcdir)/../liboctave/numeric \
+  -I$(srcdir)/../liboctave/util \
   -I$(srcdir)/../libinterp \
   -I$(top_builddir)/libinterp/interpfcn \
   -I$(top_builddir)/libgnu -I$(top_srcdir)/libgnu

reply via email to

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