Skip to content

Commit

Permalink
Start using GNU Automake in lib/
Browse files Browse the repository at this point in the history
Rename lib/Makefile as lib/Makefile.am and make the changes required to
use Automake and libtool in order to build the library.
This requires changes in configure.ac as well as in files in other
directories.

Libtool has its own 3-part versioning format (i.e. A.B.C) that forces
changes to the final name of the generated library.  However, we can
still adopt the same numbers and continue progressing the version used
in the library provided that functions are not removed from the ABI.

Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
  • Loading branch information
tuliom committed Dec 24, 2021
1 parent 25d37ee commit 1643961
Show file tree
Hide file tree
Showing 19 changed files with 31,506 additions and 917 deletions.
3 changes: 2 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include config.mk
ACLOCAL_AMFLAGS = -I m4

include aminclude.am

# List of directories built by default.
Expand Down
60 changes: 46 additions & 14 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,10 @@ subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_compile_flag.m4 \
$(top_srcdir)/m4/ax_pthread.m4 \
$(top_srcdir)/m4/ax_with_prog.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/configure.ac
$(top_srcdir)/m4/ax_with_prog.m4 $(top_srcdir)/m4/libtool.m4 \
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
$(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
Expand Down Expand Up @@ -203,7 +205,7 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/aminclude.am \
$(srcdir)/config.h.in $(srcdir)/config.mk.in \
$(top_srcdir)/oct/config.mk.in \
$(top_srcdir)/test/run_test.sh.in compile config.guess \
config.sub depcomp install-sh missing
config.sub depcomp install-sh ltmain.sh missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
Expand Down Expand Up @@ -258,13 +260,19 @@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BASH = @BASH@
CC = @CC@
CCAS = @CCAS@
CCASDEPMODE = @CCASDEPMODE@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DSYMUTIL = @DSYMUTIL@
DUMPBIN = @DUMPBIN@
DX_CONFIG = @DX_CONFIG@
DX_DOCDIR = @DX_DOCDIR@
DX_DOXYGEN = @DX_DOXYGEN@
Expand All @@ -284,22 +292,33 @@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
GREP = @GREP@
GZIP = @GZIP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
Expand All @@ -317,6 +336,7 @@ SED = @SED@
SET_MAKE = @SET_MAKE@
SHA256SUM = @SHA256SUM@
SHELL = @SHELL@
SOVERSION = @SOVERSION@
STRIP = @STRIP@
VALGRIND = @VALGRIND@
VERSION = @VERSION@
Expand All @@ -325,7 +345,9 @@ abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
Expand Down Expand Up @@ -377,6 +399,7 @@ target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I m4
@DX_COND_doc_TRUE@@DX_COND_html_TRUE@DX_CLEAN_HTML = @DX_DOCDIR@/html
@DX_COND_doc_TRUE@@DX_COND_man_TRUE@DX_CLEAN_MAN = @DX_DOCDIR@/man
@DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf @DX_DOCDIR@/latex
Expand All @@ -390,8 +413,6 @@ top_srcdir = @top_srcdir@
@DX_COND_doc_TRUE@ $(DX_CLEAN_PDF)


#include config.mk

# List of directories built by default.
SUBDIRS = lib test samples
DIST_SUBDIRS = doc inc_nx m4 oct
Expand Down Expand Up @@ -458,6 +479,15 @@ oct/config.mk: $(top_builddir)/config.status $(top_srcdir)/oct/config.mk.in
cd $(top_builddir) && $(SHELL) ./config.status $@
test/run_test.sh: $(top_builddir)/config.status $(top_srcdir)/test/run_test.sh.in
cd $(top_builddir) && $(SHELL) ./config.status $@

mostlyclean-libtool:
-rm -f *.lo

clean-libtool:
-rm -rf .libs _libs

distclean-libtool:
-rm -f libtool config.lt
install-dist_docDATA: $(dist_doc_DATA)
@$(NORMAL_INSTALL)
@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
Expand Down Expand Up @@ -845,12 +875,13 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive

clean-am: clean-generic mostlyclean-am
clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
distclean-am: clean-am distclean-generic distclean-hdr \
distclean-libtool distclean-tags

dvi: dvi-recursive

Expand Down Expand Up @@ -900,7 +931,7 @@ maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-recursive

mostlyclean-am: mostlyclean-generic
mostlyclean-am: mostlyclean-generic mostlyclean-libtool

@DX_COND_doc_FALSE@pdf: pdf-recursive

Expand All @@ -918,9 +949,10 @@ uninstall-am: uninstall-dist_docDATA uninstall-includeHEADERS

.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
am--refresh check check-am clean clean-cscope clean-generic \
cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
dist-zstd distcheck distclean distclean-generic distclean-hdr \
clean-libtool cscope cscopelist-am ctags ctags-am dist \
dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
dist-xz dist-zip dist-zstd distcheck distclean \
distclean-generic distclean-hdr distclean-libtool \
distclean-tags distcleancheck distdir distuninstallcheck dvi \
dvi-am html html-am info info-am install install-am \
install-data install-data-am install-dist_docDATA install-dvi \
Expand All @@ -929,9 +961,9 @@ uninstall-am: uninstall-dist_docDATA uninstall-includeHEADERS
install-info-am install-man install-pdf install-pdf-am \
install-ps install-ps-am install-strip installcheck \
installcheck-am installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am tags tags-am uninstall uninstall-am \
uninstall-dist_docDATA uninstall-includeHEADERS
maintainer-clean-generic mostlyclean mostlyclean-generic \
mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
uninstall-am uninstall-dist_docDATA uninstall-includeHEADERS

.PRECIOUS: Makefile

Expand Down
25 changes: 25 additions & 0 deletions aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,26 @@ m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])

# Figure out how to run the assembler. -*- Autoconf -*-

# Copyright (C) 2001-2020 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# AM_PROG_AS
# ----------
AC_DEFUN([AM_PROG_AS],
[# By default we simply use the C compiler to build assembly code.
AC_REQUIRE([AC_PROG_CC])
test "${CCAS+set}" = set || CCAS=$CC
test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)])
AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
])

# AM_AUX_DIR_EXPAND -*- Autoconf -*-

# Copyright (C) 2001-2020 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1174,4 +1194,9 @@ AC_SUBST([am__untar])
m4_include([m4/ax_check_compile_flag.m4])
m4_include([m4/ax_pthread.m4])
m4_include([m4/ax_with_prog.m4])
m4_include([m4/libtool.m4])
m4_include([m4/ltoptions.m4])
m4_include([m4/ltsugar.m4])
m4_include([m4/ltversion.m4])
m4_include([m4/lt~obsolete.m4])
m4_include([acinclude.m4])
6 changes: 6 additions & 0 deletions config.h.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/* config.h.in. Generated from configure.ac by autoheader. */

/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H

/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H

Expand Down Expand Up @@ -131,6 +134,9 @@
slash. */
#undef LSTAT_FOLLOWS_SLASHED_SYMLINK

/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR

/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT

Expand Down
Loading

0 comments on commit 1643961

Please sign in to comment.