On Wed, May 18, 2011 at 09:16:21AM +0200, Paolo Bonzini wrote: > On 05/18/2011 05:42 AM, Alon Levy wrote: > >>>--- > >>> Makefile | 20 +++++++++++++++++++- > >>> Makefile.objs | 3 +++ > >>> configure | 12 +++++++++++- > >>> libcacard/Makefile | 32 ++++++++++++++++++++++++++++---- > >>> rules.mak | 3 +++ > >>> 5 files changed, 64 insertions(+), 6 deletions(-) > >>> > >>>diff --git a/Makefile b/Makefile > >>>index 2b0438c..c71026c 100644 > >>>--- a/Makefile > >>>+++ b/Makefile > >>>@@ -119,6 +119,23 @@ version.o: $(SRC_PATH)/version.rc config-host.mak > >>> > >>> version-obj-$(CONFIG_WIN32) += version.o > >>> ###################################################################### > >>>+# Support building shared library libcacard > >>>+ > >>>+.PHONY: libcacard.la install-libcacard > >>>+ifeq ($(LIBTOOL),) > >>>+libcacard.la: > >>>+ @echo libtool is missing, please install and rerun configure > >>>+ > >>>+install-libcacard: > >>>+ @echo libtool is missing, please install and rerun configure > >>>+else > >>>+libcacard.la: $(GENERATED_HEADERS) $(oslib-obj-y) qemu-malloc.o > >>>qemu-timer-common.o $(addsuffix .lo, $(basename $(trace-obj-y))) > >>>+ $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" > >>>TARGET_DIR="$*/" libcacard.la,) > >>>+ > >>>+install-libcacard: libcacard.la > >>>+ $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C libcacard V="$(V)" > >>>TARGET_DIR="$*/" install-libcacard,) > >>>+endif > > If you instead make the .lo rules display the error message (and add > "; exit 1" after the echo), you can remove this ifeq. I'll let you > decide whether to do this or not.
The reason for doing the check at high level and not low level was to avoid building any prerequisites and then find out no libtool and bail. But I think I'll add the check at the low level too like you suggest. > > Otherwise looks good, thanks! > > Paolo >