All of lore.kernel.org
 help / color / mirror / Atom feed
From: Juergen Gross <jgross@suse.com>
To: Andrew Cooper <amc96@srcf.net>,
	Anthony PERARD <anthony.perard@citrix.com>,
	xen-devel@lists.xenproject.org
Cc: Anthony PERARD <anthony.perard@gmail.com>,
	Ian Jackson <iwj@xenproject.org>, Wei Liu <wl@xen.org>,
	Julien Grall <julien@xen.org>
Subject: Re: [XEN PATCH 36/57] tools/xenstore: Cleanup makefile
Date: Fri, 17 Dec 2021 06:24:52 +0100	[thread overview]
Message-ID: <ed48b603-b484-4544-f12a-1e816b6c007d@suse.com> (raw)
In-Reply-To: <42048d21-c02e-9fea-b228-7ffc60009be9@srcf.net>


[-- Attachment #1.1.1: Type: text/plain, Size: 5704 bytes --]

On 16.12.21 19:34, Andrew Cooper wrote:
> On 06/12/2021 17:02, Anthony PERARD wrote:
>> Regroup *FLAGS together, use $(LDLIBS).
>>
>> Remove $(LDLIBS_xenstored) which was the wrong name name as it doesn't
>> decribe how to link to a potential libxenstored.so, instead add the
>> value to $(LDLIBS) of xenstored.
>>
>> Add SYSTEMD_LIBS into $(LDLIBS) instead of $(LDFLAGS).
>>
>> Remove the "-I." from $(CFLAGS), it shouldn't be needed.
>>
>> Removed $(CFLAGS-y) and $(LDFLAGS-y). $(CFLAGS-y) is already included
>> in $(CFLAGS) and both aren't used anyway.
>>
>> Rename ALL_TARGETS to TARGETS.
>> Only add programmes we want to build in $(TARGETS), not phony-targets
>> (replace "clients").
>>
>> Store all `xenstored` objs into $(XENSTORED_OBJS-y).
>>
>> Replace one $< by $^ even if there's only one dependency,
>> (xenstore-control).
>>
>> clean: "init-xenstore-domain" isn't built here, so stop trying to
>> remove it, remove $(TARGETS).
>>
>> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
>> ---
>>   tools/xenstore/Makefile | 81 ++++++++++++++++++++++-------------------
>>   1 file changed, 44 insertions(+), 37 deletions(-)
>>
>> diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile
>> index 292b478fa1..7fe1d9c1e2 100644
>> --- a/tools/xenstore/Makefile
>> +++ b/tools/xenstore/Makefile
>> @@ -5,7 +5,6 @@ MAJOR = 3.0
>>   MINOR = 3
> 
> Actually, shouldn't this MAJOR/MINOR be dropped now that libxenstore
> moved to tools/libs ?

Yes, you are right. They should be dropped.

> 
> It's definitely wrong now, seeing as we bumped to 4.0 for Xen 4.16.
> 
>>   
>>   CFLAGS += -Werror
>> -CFLAGS += -I.
>>   # Include configure output (config.h)
>>   CFLAGS += -include $(XEN_ROOT)/tools/config.h
>>   CFLAGS += -I./include
>> @@ -16,36 +15,53 @@ CFLAGS += $(CFLAGS_libxentoolcore)
>>   CFLAGS += -DXEN_LIB_STORED="\"$(XEN_LIB_STORED)\""
>>   CFLAGS += -DXEN_RUN_STORED="\"$(XEN_RUN_STORED)\""
>>   
>> -CFLAGS  += $(CFLAGS-y)
>> -LDFLAGS += $(LDFLAGS-y)
>> +ifdef CONFIG_STUBDOM
>> +CFLAGS += -DNO_SOCKETS=1
>> +endif
>>   
>> -CLIENTS := xenstore-exists xenstore-list xenstore-read xenstore-rm xenstore-chmod
>> -CLIENTS += xenstore-write xenstore-ls xenstore-watch
>> +XENSTORED_OBJS-y := xenstored_core.o xenstored_watch.o xenstored_domain.o
>> +XENSTORED_OBJS-y += xenstored_transaction.o xenstored_control.o
>> +XENSTORED_OBJS-y += xs_lib.o talloc.o utils.o tdb.o hashtable.o
>>   
>> -XENSTORED_OBJS = xenstored_core.o xenstored_watch.o xenstored_domain.o
>> -XENSTORED_OBJS += xenstored_transaction.o xenstored_control.o
>> -XENSTORED_OBJS += xs_lib.o talloc.o utils.o tdb.o hashtable.o
>> +XENSTORED_OBJS-$(CONFIG_Linux) += xenstored_posix.o
>> +XENSTORED_OBJS-$(CONFIG_SunOS) += xenstored_solaris.o xenstored_posix.o xenstored_probes.o
>> +XENSTORED_OBJS-$(CONFIG_NetBSD) += xenstored_posix.o
>> +XENSTORED_OBJS-$(CONFIG_FreeBSD) += xenstored_posix.o
>> +XENSTORED_OBJS-$(CONFIG_MiniOS) += xenstored_minios.o
>>   
>> -XENSTORED_OBJS_$(CONFIG_Linux) = xenstored_posix.o
>> -XENSTORED_OBJS_$(CONFIG_SunOS) = xenstored_solaris.o xenstored_posix.o xenstored_probes.o
>> -XENSTORED_OBJS_$(CONFIG_NetBSD) = xenstored_posix.o
>> -XENSTORED_OBJS_$(CONFIG_FreeBSD) = xenstored_posix.o
>> -XENSTORED_OBJS_$(CONFIG_MiniOS) = xenstored_minios.o
>> +$(XENSTORED_OBJS-y): CFLAGS += $(CFLAGS_libxengnttab)
>>   
>> -XENSTORED_OBJS += $(XENSTORED_OBJS_y)
>> -LDLIBS_xenstored += -lrt
>> +xenstored: LDLIBS += $(LDLIBS_libxenevtchn)
>> +xenstored: LDLIBS += $(LDLIBS_libxengnttab)
>> +xenstored: LDLIBS += $(LDLIBS_libxenctrl)
>> +xenstored: LDLIBS += -lrt
>> +xenstored: LDLIBS += $(SOCKET_LIBS)
>>   
>> -ALL_TARGETS = clients
>> -ifeq ($(XENSTORE_XENSTORED),y)
>> -ALL_TARGETS += xs_tdb_dump xenstored
>> +ifeq ($(CONFIG_SYSTEMD),y)
>> +$(XENSTORED_OBJS-y): CFLAGS += $(SYSTEMD_CFLAGS)
>> +xenstored: LDLIBS += $(SYSTEMD_LIBS)
>>   endif
>>   
>> -ifdef CONFIG_STUBDOM
>> -CFLAGS += -DNO_SOCKETS=1
>> +xenstore: LDLIBS += $(LDLIBS_libxenstore)
>> +xenstore: LDLIBS += $(LDLIBS_libxentoolcore)
>> +xenstore: LDLIBS += $(SOCKET_LIBS)
>> +
>> +xenstore-control: LDLIBS += $(LDLIBS_libxenstore)
>> +xenstore-control: LDLIBS += $(LDLIBS_libxenctrl)
>> +xenstore-control: LDLIBS += $(LDLIBS_libxenguest)
>> +xenstore-control: LDLIBS += $(LDLIBS_libxentoolcore)
>> +xenstore-control: LDLIBS += $(SOCKET_LIBS)
>> +
>> +CLIENTS := xenstore-exists xenstore-list xenstore-read xenstore-rm xenstore-chmod
>> +CLIENTS += xenstore-write xenstore-ls xenstore-watch
>> +
>> +TARGETS := xenstore $(CLIENTS) xenstore-control
>> +ifeq ($(XENSTORE_XENSTORED),y)
>> +TARGETS += xs_tdb_dump xenstored
>>   endif
>>   
>>   .PHONY: all
>> -all: $(ALL_TARGETS)
>> +all: $(TARGETS)
>>   
>>   .PHONY: clients
>>   clients: xenstore $(CLIENTS) xenstore-control
>> @@ -62,37 +78,28 @@ xenstored_probes.o: xenstored_solaris.o
> 
> Urgh - there's a mess in here.
> 
> the `dtrace` line has trailing whitespace, but xenstored_probes.d is
> going to be clobbered by the dependency file logic.
> 
> Given this is utterly broken, perhaps better to drop the CONFIG_SunOS
> chunk entirely?

I've basically asking to do so since 5 years now. Last try wast last
year and the DilOS reply was:

   we have plans for XEN on 2021 year, but all depends on business needs
   and investments."

So the same as in 2016 (not there yet, but planning to do so):

   i have plans try to return back and look at latest Xen.

At least running xenstored in SunOS has been broken since years now, and
I'd like to suggest removing the CONFIG_SunOS parts from it (again).


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

  reply	other threads:[~2021-12-17  5:25 UTC|newest]

Thread overview: 115+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-06 17:01 [XEN PATCH 00/57] Toolstack build system improvement, toward non-recursive makefiles Anthony PERARD
2021-12-06 17:01 ` [XEN PATCH 01/57] .gitignore: Non existing toolcore/include files Anthony PERARD
2021-12-06 17:01 ` [XEN PATCH 02/57] tools/configure.ac: Remove left over system_aio Anthony PERARD
2021-12-06 17:01 ` [XEN PATCH 03/57] tools/Rules.mk: Remove $(CFLAGS.opic) from %.opic: %.S Anthony PERARD
2021-12-06 17:01 ` [XEN PATCH 04/57] libs: Remove _paths.h from libs ctrl and util Anthony PERARD
2021-12-07  7:43   ` Juergen Gross
2021-12-06 17:01 ` [XEN PATCH 05/57] libs: Remove -Iinclude from CFLAGS Anthony PERARD
2021-12-07  7:44   ` Juergen Gross
2021-12-06 17:01 ` [XEN PATCH 06/57] libs/libs.mk: Remove generic variable that already exist Anthony PERARD
2021-12-07  7:46   ` Juergen Gross
2021-12-06 17:01 ` [XEN PATCH 07/57] libs/guest: Drop spurious include in Makefile Anthony PERARD
2021-12-07  7:48   ` Juergen Gross
2021-12-06 17:01 ` [XEN PATCH 08/57] libs/light: Remove non-existing CFLAGS_libxl.o var Anthony PERARD
2021-12-07  7:49   ` Juergen Gross
2021-12-06 17:01 ` [XEN PATCH 09/57] libs/light: Remove -I Anthony PERARD
2021-12-07  7:59   ` Juergen Gross
2021-12-06 17:01 ` [XEN PATCH 10/57] libs/stat: Remove duplicated CFLAGS from deps Anthony PERARD
2021-12-07  8:01   ` Juergen Gross
2021-12-06 17:01 ` [XEN PATCH 11/57] libs/store: Remove PKG_CONFIG_REMOVE Anthony PERARD
2021-12-07  8:05   ` Juergen Gross
2021-12-06 17:01 ` [XEN PATCH 12/57] tools: remove some unneeded subdir-distclean-* targets Anthony PERARD
2021-12-06 17:01 ` [XEN PATCH 13/57] tools/firmware/hvmloader: remove "subdirs-*" prerequisite Anthony PERARD
2021-12-06 17:01 ` [XEN PATCH 14/57] tools/flask/utils: remove unused variables/targets from Makefile Anthony PERARD
2021-12-16 12:35   ` Daniel P. Smith
2021-12-16 12:36   ` Andrew Cooper
2021-12-21 17:00     ` Anthony PERARD
2021-12-06 17:01 ` [XEN PATCH 15/57] tools/libacpi: cleanup Makefile, don't check for iasl binary Anthony PERARD
2021-12-16 11:47   ` Andrew Cooper
2021-12-06 17:01 ` [XEN PATCH 16/57] tools/ocaml: Remove generation of _paths.h Anthony PERARD
2021-12-16 14:09   ` Andrew Cooper
2021-12-06 17:02 ` [XEN PATCH 17/57] tools/xl: Remove unnecessary -I. from CFLAGS Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 18/57] tools: Use config.h from autoconf instead of "buildmakevars2header" Anthony PERARD
2021-12-07 10:08   ` Juergen Gross
2021-12-07 10:49     ` Anthony PERARD
2021-12-07 10:53       ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 19/57] tools/configure.ac: Create ZLIB_LIBS and ZLIB_CFLAGS Anthony PERARD
2021-12-07 10:20   ` Juergen Gross
2021-12-16 17:16   ` Andrew Cooper
2021-12-21 17:17     ` Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 20/57] tools/Rules.mk: introduce FORCE target Anthony PERARD
2021-12-07 10:54   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 21/57] tools/include/xen-foreign: avoid to rely on default .SUFFIXES Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 22/57] tools/console: have one Makefile per program/directory Anthony PERARD
2021-12-16 17:26   ` Andrew Cooper
2021-12-21 17:25     ` Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 23/57] tools/debugger: Allow make to recurse into debugger/ Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 24/57] tools/debugger/gdbsx: Fix and cleanup makefiles Anthony PERARD
2021-12-16 17:55   ` Andrew Cooper
2021-12-21 17:30     ` Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 25/57] tools/examples: cleanup Makefile Anthony PERARD
2021-12-16 17:57   ` Andrew Cooper
2021-12-21 17:38     ` Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 26/57] tools/firmware/hvmloader: rework Makefile Anthony PERARD
2021-12-16 18:03   ` Andrew Cooper
2021-12-21 17:45     ` Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 27/57] tools/fuzz/libelf: rework makefile Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 28/57] tools/fuzz/x86_instruction_emulator: " Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 29/57] tools/helper: Cleanup Makefile Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 30/57] tools/hotplug: cleanup Makefiles Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 31/57] tools/libfsimage: Cleanup makefiles Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 32/57] tools/misc: rework Makefile Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 33/57] tools/vchan: Collect targets in TARGETS Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 34/57] tools/xcutils: rework Makefile Anthony PERARD
2021-12-16 18:20   ` Andrew Cooper
2021-12-06 17:02 ` [XEN PATCH 35/57] tools/xenpaging: Rework makefile Anthony PERARD
2021-12-16 18:25   ` Andrew Cooper
2021-12-06 17:02 ` [XEN PATCH 36/57] tools/xenstore: Cleanup makefile Anthony PERARD
2021-12-07 11:21   ` Juergen Gross
2021-12-16 17:19   ` Andrew Cooper
2021-12-16 18:34   ` Andrew Cooper
2021-12-17  5:24     ` Juergen Gross [this message]
2021-12-06 17:02 ` [XEN PATCH 37/57] tools/xentop: rework makefile Anthony PERARD
2021-12-16 18:36   ` Andrew Cooper
2021-12-06 17:02 ` [XEN PATCH 38/57] tools/xenstrace: rework Makefile Anthony PERARD
2021-12-16 18:38   ` Andrew Cooper
2021-12-06 17:02 ` [XEN PATCH 39/57] libs: Remove both "libs" and "build" target Anthony PERARD
2021-12-07 12:14   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 40/57] libs: rename LDUSELIBS to LDLIBS and use it instead of APPEND_LDFLAGS Anthony PERARD
2021-12-07 12:17   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 41/57] libs: Remove need for *installlocal targets Anthony PERARD
2021-12-07 13:20   ` Juergen Gross
2021-12-21 17:59     ` Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 42/57] libs,tools/include: Clean "clean" targets Anthony PERARD
2021-12-07 13:21   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 43/57] libs: Rename $(SRCS-y) to $(OBJS-y) Anthony PERARD
2021-12-07 13:24   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 44/57] libs/guest: rename ELF_OBJS to LIBELF_OBJS Anthony PERARD
2021-12-07 13:26   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 45/57] libs/guest: rework CFLAGS Anthony PERARD
2021-12-07 13:29   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 46/57] libs/store: use of -iquote instead of -I Anthony PERARD
2021-12-07 13:30   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 47/57] libs/stat: Fix and rework python-bindings build Anthony PERARD
2021-12-07 14:45   ` Juergen Gross
2021-12-16 18:47   ` Andrew Cooper
2021-12-21 18:03     ` Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 48/57] libs/stat: Fix and rework perl-binding build Anthony PERARD
2021-12-07 14:46   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 49/57] libs/toolcore: don't install xentoolcore_internal.h anymore Anthony PERARD
2021-12-07 14:47   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 50/57] tools/Rules.mk: Cleanup %.pc rules Anthony PERARD
2021-12-16 18:51   ` Andrew Cooper
2021-12-06 17:02 ` [XEN PATCH 51/57] .gitignore: Cleanup ignores of tools/libs/*/{headers.chk,*.pc} Anthony PERARD
2021-12-06 17:02 ` [XEN PATCH 52/57] stubdom: only build libxen*.a from tools/libs/ Anthony PERARD
2021-12-11 23:47   ` Samuel Thibault
2021-12-06 17:02 ` [XEN PATCH 53/57] stubdom: introduce xenlibs.mk Anthony PERARD
2021-12-11 23:49   ` Samuel Thibault
2021-12-06 17:02 ` [XEN PATCH 54/57] tools/libs: create Makefile.common to be used by stubdom build system Anthony PERARD
2021-12-07 14:57   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 55/57] tools/xenstore: introduce Makefile.common to be used by stubdom Anthony PERARD
2021-12-07 14:58   ` Juergen Gross
2021-12-06 17:02 ` [XEN PATCH 56/57] stubdom: build xenstore*-stubdom using new Makefile.common Anthony PERARD
2021-12-11 23:51   ` Samuel Thibault
2021-12-06 17:02 ` [XEN PATCH 57/57] stubdom: xenlibs linkfarm, ignore non-regular files Anthony PERARD
2021-12-11 23:53   ` Samuel Thibault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ed48b603-b484-4544-f12a-1e816b6c007d@suse.com \
    --to=jgross@suse.com \
    --cc=amc96@srcf.net \
    --cc=anthony.perard@citrix.com \
    --cc=anthony.perard@gmail.com \
    --cc=iwj@xenproject.org \
    --cc=julien@xen.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.