[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XEN PATCH 22/57] tools/console: have one Makefile per program/directory



On 06/12/2021 17:02, Anthony PERARD wrote:
> Sources of both xenconsoled and xenconsole are already separated into
> different directory and don't share anything in common. Having two
> different Makefile means it's easier to deal with *FLAGS.
>
> Some common changes:
> Rename $(BIN) to $(TARGETS), this will be useful later.
> Stop removing *.so *.rpm *.a as they aren't created here.
> Use $(OBJS-y) to list objects.
> Update $(CFLAGS) for the directory rather than a single object.
>
> daemon:
>     Remove the need for $(LDLIBS_xenconsoled), use $(LDLIBS) instead.
>     Remove the need for $(CONSOLE_CFLAGS-y) and use $(CFLAGS-y)
>       instead.
>
> client:
>     Remove the unused $(LDLIBS_xenconsole)
>
> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
> ---
>  .gitignore                    |  4 +--
>  tools/console/Makefile        | 49 +++-------------------------------
>  tools/console/client/Makefile | 39 +++++++++++++++++++++++++++
>  tools/console/daemon/Makefile | 50 +++++++++++++++++++++++++++++++++++
>  4 files changed, 94 insertions(+), 48 deletions(-)
>  create mode 100644 tools/console/client/Makefile
>  create mode 100644 tools/console/daemon/Makefile
>
> diff --git a/.gitignore b/.gitignore
> index b39b996718..c31fa9b841 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -159,8 +159,8 @@ tools/libs/util/libxenutil.map
>  tools/libs/vchan/headers.chk
>  tools/libs/vchan/libxenvchan.map
>  tools/libs/vchan/xenvchan.pc
> -tools/console/xenconsole
> -tools/console/xenconsoled
> +tools/console/client/xenconsole
> +tools/console/daemon/xenconsoled

$ git ls-files -- :/ | grep gitignore
../.gitignore
../tools/fuzz/cpu-policy/.gitignore
../tools/libs/.gitignore
../tools/misc/.gitignore
../tools/tests/cpu-policy/.gitignore
../tools/tests/resource/.gitignore
../tools/tests/tsx/.gitignore
../tools/tests/vhpet/.gitignore
../tools/tests/xenstore/.gitignore
tools/kconfig/.gitignore
xsm/flask/.gitignore


We're starting to use per-dir gitignores, because it has far less
problematic behaviour for code movement.

I think we ought to take this opportunity to clean things up for the better.

> diff --git a/tools/console/client/Makefile b/tools/console/client/Makefile
> new file mode 100644
> index 0000000000..44176c6d93
> --- /dev/null
> +++ b/tools/console/client/Makefile
> @@ -0,0 +1,39 @@
> +XEN_ROOT=$(CURDIR)/../../..
> +include $(XEN_ROOT)/tools/Rules.mk
> +
> +CFLAGS += -Werror

-Werror really ought to come from somewhere common, seeing as we expect
it to be unilaterally set.

~Andrew



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.