Add rules to build dependencies of libhamlib.la in other directories

This makes it possible to run "make -C src/" or "make -C tests/ rigctl"
or "make -C bindings/ check" (and so on) in a clean tree, but it doesn't
rebuild those targets if libhamlib.la is changed; for this run make from
the top directory as usual, to rebuild all SUBDIRS if needed.
pull/1729/head
Daniele Forsi IU5HKX 2025-05-03 22:23:53 +02:00
rodzic b73f64f498
commit 5c05881e0e
5 zmienionych plików z 17 dodań i 0 usunięć

Wyświetl plik

@ -30,6 +30,8 @@ example_DATA =
BUILT_SOURCES =
MOSTLYCLEANFILES =
$(top_builddir)/src/libhamlib.la:
$(MAKE) -C $(top_builddir)/src/ libhamlib.la
if ENABLE_PERL
##########################################

Wyświetl plik

@ -15,6 +15,8 @@ check_SCRIPTS = testcpp.sh
TESTS = $(check_SCRIPTS)
$(top_builddir)/src/libhamlib.la:
$(MAKE) -C $(top_builddir)/src/ libhamlib.la
testcpp.sh:
echo 'LD_LIBRARY_PATH=$(top_builddir)/c++/.libs:$(top_builddir)/dummy/.libs ./testcpp' > testcpp.sh

Wyświetl plik

@ -44,5 +44,7 @@ EXTRA_DIST =
#TESTS = $(check_SCRIPTS)
$(top_builddir)/src/libhamlib.la:
$(MAKE) -C $(top_builddir)/src/ libhamlib.la
CLEANFILES = simelelecraft simicgeneric simkenwood simyaesu

Wyświetl plik

@ -27,6 +27,15 @@ libhamlib_la_LIBADD = $(top_builddir)/lib/libmisc.la $(top_builddir)/security/li
libhamlib_la_DEPENDENCIES = $(top_builddir)/lib/libmisc.la $(top_builddir)/security/libsecurity.la $(BACKENDEPS) $(RIG_BACKENDEPS) $(ROT_BACKENDEPS) $(AMP_BACKENDEPS)
# Rule to build the dependencies of libhamlib.la that are not in this directory
# when running make in this directory instead of top_builddir
# (the % matches any number of subdirectories)
# warning: '%'-style pattern rules are a GNU make extension
$(top_builddir)/%.la:
$(MAKE) -C $(@D) $(@F)
#
EXTRA_DIST = Android.mk hamlibdatetime.h.in band_changed.c

Wyświetl plik

@ -110,6 +110,8 @@ check_SCRIPTS = testrig.sh testfreq.sh testbcd.sh testloc.sh testrigcaps.sh test
TESTS = $(check_SCRIPTS)
$(top_builddir)/src/libhamlib.la:
$(MAKE) -C $(top_builddir)/src/ libhamlib.la
testrig.sh:
echo 'LD_LIBRARY_PATH=$(top_builddir)/src/.libs:$(top_builddir)/dummy/.libs ./testrig 1' > testrig.sh