automake
[Top][All Lists]
Advanced

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

non-recursive builds and directory specific "global" macros


From: Diab Jerius
Subject: non-recursive builds and directory specific "global" macros
Date: Mon, 21 Oct 2013 14:35:54 -0400

The compartmentalization which recursive makes provided is a very nice
feature which I'm finding difficult to efficiently replicate in
non-recursive makes.

For example, a particular project's tests require a different
definition of LDADD.  Previously, in the recursive world, I would
specify LDADD in tests/Makefile.am.  However in the non-recursive
world LDADD is shared by all, so I find myself doing this:

TESTS_LDADD = \
  $(LDADD) $(top_builddir)/$(PACKAGE_NAME)/lib$(PACKAGE_NAME).la

%C%_bpsource_LDADD = $(TESTS_LDADD)
%C%_bpfilter_LDADD = $(TESTS_LDADD)
%C%_bpsink_LDADD   = $(TESTS_LDADD)
%C%_dpktf_LDADD    = $(TESTS_LDADD)

[...ad nauseum...]

Not very DRY.  Is there a way to avoid this?  If not presently
possible, it would be nice to be able to do something similar to:

%C%_LDADD = ...

and have that override LDADD for targets in that directory.

Thanks,

Diab



reply via email to

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