From 5f771b6035ee5baaabee52fdea85a324ecb9766e Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Mon, 16 Nov 2020 13:07:15 +0000 Subject: [PATCH] stop specifying explicit DEPENDENCIES by listing the .la files in LDADD/LIBADD --- bin/Makefile.am | 12 ++++-------- bin/Makefile.in | 19 +++++++++++-------- lib/Makefile.am | 16 +++++----------- lib/Makefile.in | 25 ++++++++++++------------- 4 files changed, 32 insertions(+), 40 deletions(-) diff --git a/bin/Makefile.am b/bin/Makefile.am index b5a675c..b6d277e 100644 --- a/bin/Makefile.am +++ b/bin/Makefile.am @@ -27,8 +27,7 @@ bin_PROGRAMS = hcl hcl_SOURCES = main.c ../lib/cb-impl.h ../lib/cb-impl.c hcl_CPPFLAGS = $(CPPFLAGS_COMMON) hcl_LDFLAGS = $(LDFLAGS_COMMON) -hcl_LDADD = -lhcl $(LIBADD_COMMON) -hcl_DEPENDENCIES = ../lib/libhcl.la +hcl_LDADD = ../lib/libhcl.la $(LIBADD_COMMON) if ENABLE_HCLX @@ -39,20 +38,17 @@ bin_PROGRAMS += hcls hcls_SOURCES = main-s.c hcls_CPPFLAGS = $(CPPFLAGS_COMMON) hcls_LDFLAGS = $(LDFLAGS_COMMON) -hcls_LDADD = -lhclx $(LIBADD_COMMON) -hcls_DEPENDENCIES = ../lib/libhclx.la +hcls_LDADD = ../lib/libhclx.la $(LIBADD_COMMON) bin_PROGRAMS += hclc hclc_SOURCES = main-c.c hclc_CPPFLAGS = $(CPPFLAGS_COMMON) hclc_LDFLAGS = $(LDFLAGS_COMMON) -hclc_LDADD = -lhclx $(LIBADD_COMMON) -hclc_DEPENDENCIES = ../lib/libhclx.la +hclc_LDADD = ../lib/libhclx.la $(LIBADD_COMMON) bin_PROGRAMS += hclj hclj_SOURCES = main-j.c hclj_CPPFLAGS = $(CPPFLAGS_COMMON) hclj_LDFLAGS = $(LDFLAGS_COMMON) -hclj_LDADD = -lhclx $(LIBADD_COMMON) -hclj_DEPENDENCIES = ../lib/libhclx.la +hclj_LDADD = ../lib/libhclx.la $(LIBADD_COMMON) endif diff --git a/bin/Makefile.in b/bin/Makefile.in index 569503b..6cb28f2 100644 --- a/bin/Makefile.in +++ b/bin/Makefile.in @@ -121,6 +121,7 @@ am__DEPENDENCIES_1 = @ENABLE_LIBLTDL_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) @ENABLE_LIBLTDL_FALSE@am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) am__DEPENDENCIES_4 = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_3) +hcl_DEPENDENCIES = ../lib/libhcl.la $(am__DEPENDENCIES_4) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent @@ -131,18 +132,24 @@ hcl_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ am__hclc_SOURCES_DIST = main-c.c @ENABLE_HCLX_TRUE@am_hclc_OBJECTS = hclc-main-c.$(OBJEXT) hclc_OBJECTS = $(am_hclc_OBJECTS) +@ENABLE_HCLX_TRUE@hclc_DEPENDENCIES = ../lib/libhclx.la \ +@ENABLE_HCLX_TRUE@ $(am__DEPENDENCIES_4) hclc_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(hclc_LDFLAGS) $(LDFLAGS) -o $@ am__hclj_SOURCES_DIST = main-j.c @ENABLE_HCLX_TRUE@am_hclj_OBJECTS = hclj-main-j.$(OBJEXT) hclj_OBJECTS = $(am_hclj_OBJECTS) +@ENABLE_HCLX_TRUE@hclj_DEPENDENCIES = ../lib/libhclx.la \ +@ENABLE_HCLX_TRUE@ $(am__DEPENDENCIES_4) hclj_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(hclj_LDFLAGS) $(LDFLAGS) -o $@ am__hcls_SOURCES_DIST = main-s.c @ENABLE_HCLX_TRUE@am_hcls_OBJECTS = hcls-main-s.$(OBJEXT) hcls_OBJECTS = $(am_hcls_OBJECTS) +@ENABLE_HCLX_TRUE@hcls_DEPENDENCIES = ../lib/libhclx.la \ +@ENABLE_HCLX_TRUE@ $(am__DEPENDENCIES_4) hcls_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(hcls_LDFLAGS) $(LDFLAGS) -o $@ @@ -362,23 +369,19 @@ LIBADD_COMMON = $(am__append_1) $(am__append_2) hcl_SOURCES = main.c ../lib/cb-impl.h ../lib/cb-impl.c hcl_CPPFLAGS = $(CPPFLAGS_COMMON) hcl_LDFLAGS = $(LDFLAGS_COMMON) -hcl_LDADD = -lhcl $(LIBADD_COMMON) -hcl_DEPENDENCIES = ../lib/libhcl.la +hcl_LDADD = ../lib/libhcl.la $(LIBADD_COMMON) @ENABLE_HCLX_TRUE@hcls_SOURCES = main-s.c @ENABLE_HCLX_TRUE@hcls_CPPFLAGS = $(CPPFLAGS_COMMON) @ENABLE_HCLX_TRUE@hcls_LDFLAGS = $(LDFLAGS_COMMON) -@ENABLE_HCLX_TRUE@hcls_LDADD = -lhclx $(LIBADD_COMMON) -@ENABLE_HCLX_TRUE@hcls_DEPENDENCIES = ../lib/libhclx.la +@ENABLE_HCLX_TRUE@hcls_LDADD = ../lib/libhclx.la $(LIBADD_COMMON) @ENABLE_HCLX_TRUE@hclc_SOURCES = main-c.c @ENABLE_HCLX_TRUE@hclc_CPPFLAGS = $(CPPFLAGS_COMMON) @ENABLE_HCLX_TRUE@hclc_LDFLAGS = $(LDFLAGS_COMMON) -@ENABLE_HCLX_TRUE@hclc_LDADD = -lhclx $(LIBADD_COMMON) -@ENABLE_HCLX_TRUE@hclc_DEPENDENCIES = ../lib/libhclx.la +@ENABLE_HCLX_TRUE@hclc_LDADD = ../lib/libhclx.la $(LIBADD_COMMON) @ENABLE_HCLX_TRUE@hclj_SOURCES = main-j.c @ENABLE_HCLX_TRUE@hclj_CPPFLAGS = $(CPPFLAGS_COMMON) @ENABLE_HCLX_TRUE@hclj_LDFLAGS = $(LDFLAGS_COMMON) -@ENABLE_HCLX_TRUE@hclj_LDADD = -lhclx $(LIBADD_COMMON) -@ENABLE_HCLX_TRUE@hclj_DEPENDENCIES = ../lib/libhclx.la +@ENABLE_HCLX_TRUE@hclj_LDADD = ../lib/libhclx.la $(LIBADD_COMMON) all: all-am .SUFFIXES: diff --git a/lib/Makefile.am b/lib/Makefile.am index cce002a..9b0ce2c 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -88,17 +88,12 @@ libhcl_la_SOURCES = \ libhcl_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) libhcl_la_LDFLAGS = $(LDFLAGS_LIB_COMMON) libhcl_la_LIBADD = $(LIBADD_LIB_COMMON) -libhcl_la_DEPENDENCIES = if ENABLE_STATIC_MODULE -libhcl_la_LIBADD += -lhcl-arr -libhcl_la_DEPENDENCIES += $(abs_builddir)/../mod/libhcl-arr.la -libhcl_la_LIBADD += -lhcl-dic -libhcl_la_DEPENDENCIES += $(abs_builddir)/../mod/libhcl-dic.la -libhcl_la_LIBADD += -lhcl-str -libhcl_la_DEPENDENCIES += $(abs_builddir)/../mod/libhcl-str.la -libhcl_la_LIBADD += -lhcl-sys -libhcl_la_DEPENDENCIES += $(abs_builddir)/../mod/libhcl-sys.la +libhcl_la_LIBADD += ../mod/libhcl-arr.la +libhcl_la_LIBADD += ../mod/libhcl-dic.la +libhcl_la_LIBADD += ../mod/libhcl-str.la +libhcl_la_LIBADD += ../mod/libhcl-sys.la endif if ENABLE_HCLX @@ -113,8 +108,7 @@ libhclx_la_SOURCES = \ hcl-c.c hcl-c.h libhclx_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) $(CPPFLAGS_PFMOD) libhclx_la_LDFLAGS = $(LDFLAGS_LIB_COMMON) -libhclx_la_LIBADD = -lhcl $(LIBADD_LIB_COMMON) -libhclx_la_DEPENDENCIES = libhcl.la +libhclx_la_LIBADD = libhcl.la $(LIBADD_LIB_COMMON) endif diff --git a/lib/Makefile.in b/lib/Makefile.in index badb447..23674ac 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -92,14 +92,12 @@ host_triplet = @host@ @ENABLE_LIBUNWIND_TRUE@am__append_3 = $(UNWIND_LIBS) @MACOSX_TRUE@@WIN32_FALSE@am__append_4 = -DHCL_DEFAULT_PFMODPOSTFIX=\".dylib\" @MACOSX_FALSE@@WIN32_FALSE@am__append_5 = -DHCL_DEFAULT_PFMODPOSTFIX=\".so\" -@ENABLE_STATIC_MODULE_TRUE@am__append_6 = -lhcl-arr -lhcl-dic \ -@ENABLE_STATIC_MODULE_TRUE@ -lhcl-str -lhcl-sys -@ENABLE_STATIC_MODULE_TRUE@am__append_7 = $(abs_builddir)/../mod/libhcl-arr.la \ -@ENABLE_STATIC_MODULE_TRUE@ $(abs_builddir)/../mod/libhcl-dic.la \ -@ENABLE_STATIC_MODULE_TRUE@ $(abs_builddir)/../mod/libhcl-str.la \ -@ENABLE_STATIC_MODULE_TRUE@ $(abs_builddir)/../mod/libhcl-sys.la -@ENABLE_HCLX_TRUE@am__append_8 = libhclx.la -@ENABLE_HCLX_TRUE@am__append_9 = hcl-c.h hcl-s.h hcl-tmr.h hcl-xutl.h hcl-json.h +@ENABLE_STATIC_MODULE_TRUE@am__append_6 = ../mod/libhcl-arr.la \ +@ENABLE_STATIC_MODULE_TRUE@ ../mod/libhcl-dic.la \ +@ENABLE_STATIC_MODULE_TRUE@ ../mod/libhcl-str.la \ +@ENABLE_STATIC_MODULE_TRUE@ ../mod/libhcl-sys.la +@ENABLE_HCLX_TRUE@am__append_7 = libhclx.la +@ENABLE_HCLX_TRUE@am__append_8 = hcl-c.h hcl-s.h hcl-tmr.h hcl-xutl.h hcl-json.h subdir = lib ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ax_check_sign.m4 \ @@ -151,6 +149,7 @@ am__DEPENDENCIES_1 = @ENABLE_LIBUNWIND_TRUE@am__DEPENDENCIES_4 = $(am__DEPENDENCIES_1) am__DEPENDENCIES_5 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \ $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_4) +libhcl_la_DEPENDENCIES = $(am__DEPENDENCIES_5) $(am__append_6) am_libhcl_la_OBJECTS = libhcl_la-bigint.lo libhcl_la-comp.lo \ libhcl_la-debug.lo libhcl_la-decode.lo libhcl_la-dic.lo \ libhcl_la-err.lo libhcl_la-exec.lo libhcl_la-fmt.lo \ @@ -167,6 +166,8 @@ am__v_lt_1 = libhcl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libhcl_la_LDFLAGS) $(LDFLAGS) -o $@ +@ENABLE_HCLX_TRUE@libhclx_la_DEPENDENCIES = libhcl.la \ +@ENABLE_HCLX_TRUE@ $(am__DEPENDENCIES_5) am__libhclx_la_SOURCES_DIST = tmr.c hcl-tmr.h xutl.c xutl-sa.h \ hcl-xutl.h json.c hcl-json.h cb-impl.h cb-impl.c hcl-s.c \ hcl-s.h hcl-c.c hcl-c.h @@ -424,8 +425,8 @@ LIBADD_LIB_COMMON = $(LIBM) $(am__append_1) $(am__append_2) \ @WIN32_TRUE@ -DHCL_DEFAULT_PFMODPOSTFIX=\"-1.dll\" \ @WIN32_TRUE@ $(am__append_4) $(am__append_5) pkginclude_HEADERS = hcl.h hcl-cmn.h hcl-fmt.h hcl-opt.h hcl-rbt.h \ - hcl-utl.h $(am__append_9) -pkglib_LTLIBRARIES = libhcl.la $(am__append_8) + hcl-utl.h $(am__append_8) +pkglib_LTLIBRARIES = libhcl.la $(am__append_7) libhcl_la_SOURCES = \ hcl.h \ hcl-cmn.h \ @@ -460,7 +461,6 @@ libhcl_la_SOURCES = \ libhcl_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) libhcl_la_LDFLAGS = $(LDFLAGS_LIB_COMMON) libhcl_la_LIBADD = $(LIBADD_LIB_COMMON) $(am__append_6) -libhcl_la_DEPENDENCIES = $(am__append_7) @ENABLE_HCLX_TRUE@libhclx_la_SOURCES = \ @ENABLE_HCLX_TRUE@ tmr.c hcl-tmr.h \ @ENABLE_HCLX_TRUE@ xutl.c xutl-sa.h hcl-xutl.h \ @@ -471,8 +471,7 @@ libhcl_la_DEPENDENCIES = $(am__append_7) @ENABLE_HCLX_TRUE@libhclx_la_CPPFLAGS = $(CPPFLAGS_LIB_COMMON) $(CPPFLAGS_PFMOD) @ENABLE_HCLX_TRUE@libhclx_la_LDFLAGS = $(LDFLAGS_LIB_COMMON) -@ENABLE_HCLX_TRUE@libhclx_la_LIBADD = -lhcl $(LIBADD_LIB_COMMON) -@ENABLE_HCLX_TRUE@libhclx_la_DEPENDENCIES = libhcl.la +@ENABLE_HCLX_TRUE@libhclx_la_LIBADD = libhcl.la $(LIBADD_LIB_COMMON) all: hcl-cfg.h $(MAKE) $(AM_MAKEFLAGS) all-am