1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Makefile.lib: Add support for "unless" config-driven rules

Normally, you can add some objects or subdirs to the build if some
config variable is set to yes, by doing:

	SUBDIRS-$(CONFIG_FOO)

Now you can do it the other way too, including stuff if some
variable is set to no:

	SUBDIRS-unless$(CONFIG_FOO)

This will be used for switching between two HTML parser implementations.
This commit is contained in:
Petr Baudis 2007-08-28 22:55:26 +02:00 committed by Petr Baudis
parent e5539a9937
commit 14ae8ecc01

View File

@ -74,11 +74,11 @@ quiet_cmd_uninstall = " [$(UNINSTALL_COLOR)UNINSTALL$(END_COLOR)] $(3)/$(n
#############################################################################
# Special handling of conditional variables
SUBDIRS += $(SUBDIRS-yes)
OBJS += $(OBJS-yes)
SUBDIRS += $(SUBDIRS-yes) $(SUBDIRS-unlessno) $(SUBDIRS-unless)
OBJS += $(OBJS-yes) $(OBJS-unlessno) $(SUBDIRS-unless)
ALTDIRS = $(SUBDIRS-no) $(SUBDIRS-)
ALTOBJS = $(OBJS-no) $(OBJS-)
ALTDIRS = $(SUBDIRS-no) $(SUBDIRS-) $(SUBDIRS-unlessyes)
ALTOBJS = $(OBJS-no) $(OBJS-) $(OBJS-unlessyes)
ifneq ($(findstring cleanall,$(MAKECMDGOALS)),)
INCLUDE_ALL=1
@ -206,7 +206,7 @@ TESTDEPS += \
$(top_builddir)/src/util/string.o \
$(top_builddir)/src/util/time.o
TESTDEPS += $(TESTDEPS-yes)
TESTDEPS += $(TESTDEPS-yes) $(TESTDEPS-unlessno)
TEST_LIB=$(top_srcdir)/test/libtest.sh
export TEST_LIB