aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxl/Makefile
diff options
context:
space:
mode:
authorRoger Pau Monne <roger.pau@citrix.com>2012-04-25 11:44:09 +0100
committerRoger Pau Monne <roger.pau@citrix.com>2012-04-25 11:44:09 +0100
commit5fce16c040f5e4fae51c5ad0db08f2cf3cd26094 (patch)
tree6e1c5b271c6543ce752002fa411d543512a0fb8f /tools/libxl/Makefile
parentd9abcb8495b2d481611f8d47b45680e5d9984a33 (diff)
downloadxen-5fce16c040f5e4fae51c5ad0db08f2cf3cd26094.tar.gz
xen-5fce16c040f5e4fae51c5ad0db08f2cf3cd26094.tar.bz2
xen-5fce16c040f5e4fae51c5ad0db08f2cf3cd26094.zip
libxl, configure: print a warning if flex/bison are needed
This patch adds better support for both Flex and Bison, which might be needed to compile libxl. Now configure script sets BISON and FLEX Makefile vars if bison and flex are found, but doesn't complain if they are not found. Also, added some Makefile soccery to print a warning message if Bison or Flex are needed but not found. [ Improved the warning message slightly. -iwj ] Signed-off-by: Roger Pau Monne <roger.pau@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/Makefile')
-rw-r--r--tools/libxl/Makefile16
1 files changed, 14 insertions, 2 deletions
diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
index 2f63a671de..54694542a3 100644
--- a/tools/libxl/Makefile
+++ b/tools/libxl/Makefile
@@ -48,6 +48,18 @@ please check libxl_linux.c and libxl_netbsd.c to see how to get it ported)
endif
endif
+ifeq ($(FLEX),)
+%.c %.h:: %.l
+ $(warning Flex is needed to rebuild some libxl parsers and \
+ scanners, please install it and rerun configure)
+endif
+
+ifeq ($(BISON),)
+%.c %.h:: %.y
+ $(warning Bison is needed to rebuild some libxl parsers and \
+ scanners, please install it an rerun configure)
+endif
+
LIBXL_LIBS += -lyajl
LIBXL_OBJS = flexarray.o libxl.o libxl_create.o libxl_dm.o libxl_pci.o \
@@ -82,11 +94,11 @@ all: $(CLIENTS) libxenlight.so libxenlight.a libxlutil.so libxlutil.a \
$(LIBXL_OBJS) $(LIBXLU_OBJS) $(XL_OBJS): $(AUTOINCS)
-%.c %.h: %.y
+%.c %.h:: %.y
@rm -f $*.[ch]
$(BISON) --output=$*.c $<
-%.c %.h: %.l
+%.c %.h:: %.l
@rm -f $*.[ch]
$(FLEX) --header-file=$*.h --outfile=$*.c $<