From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zheng Li Subject: Re: [PATCH 5 of 7] [OCAML] Minor makefile cleanup Date: Fri, 30 Sep 2011 17:43:30 +0100 Message-ID: <4E85F1B2.2040506@eu.citrix.com> References: <48d4f312d0693cf8a52e.1317331047@snoosnoo2.uk.xensource.com> <1317369085.26672.212.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1317369085.26672.212.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: Ian Campbell , Jonathan Ludlam List-Id: xen-devel@lists.xenproject.org Hello, On 30/09/2011 08:51, Ian Campbell wrote: > What does the cleanup actually do? IIRC, the patch meant to do 2 things: * A small improvement (in two occasions) E.g., for make rule lib$(1)_stubs.a: $(foreach obj,$($(1)_C_OBJS),$(obj).o) substitute the action part from $(call mk-caml-lib-stubs,$$@, $$+) to $(call mk-caml-lib-stubs,$(1), $$+) i.e. pass part of the target's name as the argument to mk-caml-lib-stubs instead of the whole name, so that we can avoid calling basename and sed later on to recover the sub string. I.e., from $(call quiet-command, $(AR) rcs $1 $2 && $(OCAMLMKLIB) -o `basename $1 .a | sed -e 's/^lib//'` $2,MKLIB,$1) to $(call quiet-command, $(AR) rcs lib$(1)_stubs.a $2 && $(OCAMLMKLIB) $(LIBS_$(1)) -o $(1)_stubs $2,MKLIB,$1) * Some correction on linking parameters for bytecode mode compilation IIRC, it's this line that changed from $(call mk-caml-lib-bytecode,$$@, -dllib dll$(1)_stubs.so -cclib -l$(1)_stubs, $$+) to $(call mk-caml-lib-bytecode,$$@, -dllib dll$(1)_stubs.so -cclib -l$(1)_stubs $(foreach lib,$(LIBS_$(1)),-cclib $(lib)), $$+) The former was able to produce bytecode as well, but there would be problem in dynamic loading the generated bytecode (e.g. in OCaml toplevel). The later version should work fine with the toplevel. >> -LIBS_evtchn = $(LDLIBS_libxenctrl) >> +LIBS_eventchn = -L$(XEN_ROOT)/tools/libxc -lxenctrl > > This should continue using LDLIBS_libxenctrl unless there is a good > reason not too. I think you are right. They are identical, only the name in the first line needs fixing, and using predefined $(LDLIBS_libxenctrl) is certainly better. The change dated back before your Makefile refactoring after Xen-4.1 and was probably a result of mix up during rebase. Cheers -- Zheng