[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH] libs: Fix unstable libs build on FreeBSD, auto-generate version-script
On 15.02.2023 18:41, Anthony PERARD wrote: > On Wed, Feb 15, 2023 at 04:30:43PM +0100, Jan Beulich wrote: >> On 15.02.2023 16:21, Anthony PERARD wrote: >>> @@ -13,6 +14,10 @@ MAJOR := $(shell $(XEN_ROOT)/version.sh >>> $(XEN_ROOT)/xen/Makefile) >>> endif >>> MINOR ?= 0 >>> >>> +ifeq ($(origin version-script), undefined) >>> +version-script := libxen$(LIBNAME).map.tmp >>> +endif >> >> Such a use of $(origin ...) is pretty fragile. Maybe better use ?= ? > > I'm not sure why I used $(origin), I've written that more than 6 month > ago, but this way of using it is actually described in the manual, when > documenting ?= but with a = instead of := . > So, maybe I wanted to have ?= but with immediate evaluation rather than > deferred. Maybe I had issue with $(version-script) evaluating to > different values. What's wrong with using deferred evaluation for this macro? $(LIBNAME) (and $(LIB_FILE_NAME)) don't vary over time, do they? Plus ... >>> lib$(LIB_FILE_NAME).a: $(OBJS-y) >> >> Seeing this right adjacent in context - any reason you use libxen$(LIBNAME) >> and not the same lib$(LIB_FILE_NAME) for the base file name? > > That was the name used before, I guess it would be fine to rename. I > just need to set $(version-script) later as $(LIB_FILE_NAME) would not > be defined yet. ... you'd likely deal with that issue as well, unless there's a "too early" use of $(version-script) somewhere. Jan
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |