diff mbox series

[XEN,04/57] libs: Remove _paths.h from libs ctrl and util.

Message ID 20211206170241.13165-5-anthony.perard@citrix.com (mailing list archive)
State New, archived
Headers show
Series Toolstack build system improvement, toward non-recursive makefiles | expand

Commit Message

Anthony PERARD Dec. 6, 2021, 5:01 p.m. UTC
libxenutil doesn't include _paths.h so no need to generate it.

libxenctrl doesn't use macros from _paths.h so can be removed.
Fix libxenguest to include _paths.h properly instead of relying on
xc_private.h

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
---
 .gitignore                    | 2 --
 tools/libs/ctrl/Makefile      | 5 -----
 tools/libs/ctrl/xc_private.h  | 2 --
 tools/libs/guest/Makefile     | 2 +-
 tools/libs/guest/xg_suspend.c | 1 +
 tools/libs/util/Makefile      | 6 +-----
 6 files changed, 3 insertions(+), 15 deletions(-)

Comments

Jürgen Groß Dec. 7, 2021, 7:43 a.m. UTC | #1
On 06.12.21 18:01, Anthony PERARD wrote:
> libxenutil doesn't include _paths.h so no need to generate it.
> 
> libxenctrl doesn't use macros from _paths.h so can be removed.
> Fix libxenguest to include _paths.h properly instead of relying on
> xc_private.h
> 
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen
diff mbox series

Patch

diff --git a/.gitignore b/.gitignore
index cad5aacd8d..111eb03b86 100644
--- a/.gitignore
+++ b/.gitignore
@@ -117,7 +117,6 @@  tools/libs/hypfs/headers.chk
 tools/libs/hypfs/xenhypfs.pc
 tools/libs/call/headers.chk
 tools/libs/call/xencall.pc
-tools/libs/ctrl/_*.[ch]
 tools/libs/ctrl/libxenctrl.map
 tools/libs/ctrl/xencontrol.pc
 tools/libs/foreignmemory/headers.chk
@@ -157,7 +156,6 @@  tools/libs/store/utils.h
 tools/libs/store/xenstore.pc
 tools/libs/store/xs_lib.c
 tools/libs/util/*.pc
-tools/libs/util/_paths.h
 tools/libs/util/libxlu_cfg_y.output
 tools/libs/util/libxenutil.map
 tools/libs/vchan/headers.chk
diff --git a/tools/libs/ctrl/Makefile b/tools/libs/ctrl/Makefile
index 519246b0d6..5d866b8d04 100644
--- a/tools/libs/ctrl/Makefile
+++ b/tools/libs/ctrl/Makefile
@@ -54,11 +54,6 @@  NO_HEADERS_CHK := y
 
 include $(XEN_ROOT)/tools/libs/libs.mk
 
-genpath-target = $(call buildmakevars2header,_paths.h)
-$(eval $(genpath-target))
-
-$(LIB_OBJS) $(PIC_OBJS): _paths.h
-
 -include $(DEPS_INCLUDE)
 
 clean: cleanlocal
diff --git a/tools/libs/ctrl/xc_private.h b/tools/libs/ctrl/xc_private.h
index 2e483590e6..824d3cfc21 100644
--- a/tools/libs/ctrl/xc_private.h
+++ b/tools/libs/ctrl/xc_private.h
@@ -29,8 +29,6 @@ 
 #include <limits.h>
 #include <sys/ioctl.h>
 
-#include "_paths.h"
-
 #define XC_WANT_COMPAT_MAP_FOREIGN_API
 #define XC_INTERNAL_COMPAT_MAP_FOREIGN_API
 #include "xenctrl.h"
diff --git a/tools/libs/guest/Makefile b/tools/libs/guest/Makefile
index 2ce92d247e..b49e5059f2 100644
--- a/tools/libs/guest/Makefile
+++ b/tools/libs/guest/Makefile
@@ -111,7 +111,7 @@  libxenguest.so.$(MAJOR).$(MINOR): APPEND_LDFLAGS += $(COMPRESSION_LIBS) -lz
 genpath-target = $(call buildmakevars2header,_paths.h)
 $(eval $(genpath-target))
 
-xc_private.h: _paths.h
+$(LIB_OBJS) $(PIC_OBJS): _paths.h
 
 -include $(DEPS_INCLUDE)
 
diff --git a/tools/libs/guest/xg_suspend.c b/tools/libs/guest/xg_suspend.c
index 0ce6364963..128353029c 100644
--- a/tools/libs/guest/xg_suspend.c
+++ b/tools/libs/guest/xg_suspend.c
@@ -19,6 +19,7 @@ 
 #include <xenevtchn.h>
 
 #include "xc_private.h"
+#include "_paths.h"
 #include "xenguest.h"
 
 #define SUSPEND_LOCK_FILE    XEN_RUN_DIR "/suspend-evtchn-%d.lock"
diff --git a/tools/libs/util/Makefile b/tools/libs/util/Makefile
index f5f9e89fee..87425d862a 100644
--- a/tools/libs/util/Makefile
+++ b/tools/libs/util/Makefile
@@ -39,7 +39,7 @@  NO_HEADERS_CHK := y
 
 include $(XEN_ROOT)/tools/libs/libs.mk
 
-$(LIB_OBJS) $(PIC_OBJS): $(AUTOINCS) _paths.h
+$(LIB_OBJS) $(PIC_OBJS): $(AUTOINCS)
 
 %.c %.h:: %.y
 	@rm -f $*.[ch]
@@ -49,14 +49,10 @@  $(LIB_OBJS) $(PIC_OBJS): $(AUTOINCS) _paths.h
 	@rm -f $*.[ch]
 	$(FLEX) --header-file=$*.h --outfile=$*.c $<
 
-genpath-target = $(call buildmakevars2header,_paths.h)
-$(eval $(genpath-target))
-
 -include $(DEPS_INCLUDE)
 
 clean: cleanlocal
 
 .PHONY: cleanlocal
 cleanlocal:
-	$(RM) -f _*.h
 	$(RM) -f libxlutil.map