libs: Remove need for *installlocal targets
authorAnthony PERARD <anthony.perard@citrix.com>
Fri, 25 Feb 2022 15:13:07 +0000 (15:13 +0000)
committerJulien Grall <jgrall@amazon.com>
Thu, 16 Jun 2022 15:58:50 +0000 (16:58 +0100)
There is no need for an extra "installlocal" target, we can use
double-colon rules instead.

"install-headers" in "libs/store" was introduced for the same reason
that "installlocal" exist, so it is replaced as well.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
tools/libs/libs.mk
tools/libs/light/Makefile
tools/libs/stat/Makefile
tools/libs/store/Makefile

index 3118cb4194f2a215249425b5a9ba13b695c019cd..a173f59a8b045ef0dfac6c1a3435eb56a07b4e14 100644 (file)
@@ -100,7 +100,7 @@ endif
 endif
 
 .PHONY: install
-install: all
+install:: all
        $(INSTALL_DIR) $(DESTDIR)$(libdir)
        $(INSTALL_DIR) $(DESTDIR)$(includedir)
        $(INSTALL_SHLIB) lib$(LIB_FILE_NAME).so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)
@@ -111,7 +111,7 @@ install: all
        $(INSTALL_DATA) $(PKG_CONFIG) $(DESTDIR)$(PKG_INSTALLDIR)
 
 .PHONY: uninstall
-uninstall:
+uninstall::
        rm -f $(DESTDIR)$(PKG_INSTALLDIR)/$(LIB_FILE_NAME).pc
        for i in $(LIBHEADER); do rm -f $(DESTDIR)$(includedir)/$$i; done
        rm -f $(DESTDIR)$(libdir)/lib$(LIB_FILE_NAME).so
index 7c0a5dca8567cc764a1f6271a364e17fe9dde03a..769e2a83e2177284722650223d6ebd6db86a6ac9 100644 (file)
@@ -239,17 +239,11 @@ libxl-save-helper: $(SAVE_HELPER_OBJS) libxenlight.so
 testidl: testidl.o libxenlight.so
        $(CC) $(LDFLAGS) -o $@ testidl.o $(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) $(LDLIBS_libxentoolcore) $(APPEND_LDFLAGS)
 
-install: installlocal $(LIBHEADERS)
-
-.PHONY: installlocal
-installlocal: libxl-save-helper
+install:: $(LIBHEADERS) libxl-save-helper
        $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
        $(INSTALL_PROG) libxl-save-helper $(DESTDIR)$(LIBEXEC_BIN)
 
-uninstall: uninstalllocal
-
-.PHONY: uninstalllocal
-uninstalllocal:
+uninstall::
        rm -f $(DESTDIR)$(LIBEXEC_BIN)/libxl-save-helper
 
 clean: cleanlocal
index 6cd0af5239b1c90a8779f72dd1ab2c977cc65da2..1aef25a9bbd7c73d4ca15872f0df1d7345764ba3 100644 (file)
@@ -78,8 +78,8 @@ uninstall-python-bindings:
 ifeq ($(XENSTAT_PYTHON_BINDINGS),y)
 .PHONY: all
 all: python-bindings
-install: install-python-bindings
-uninstall: uninstall-python-bindings
+install:: install-python-bindings
+uninstall:: uninstall-python-bindings
 endif
 
 # Perl bindings
@@ -111,8 +111,8 @@ ifeq ($(XENSTAT_PERL_BINDINGS),y)
 all: perl-bindings
 
 .PHONY: install
-install: install-perl-bindings
-uninstall: uninstall-perl-bindings
+install:: install-perl-bindings
+uninstall:: uninstall-perl-bindings
 endif
 
 clean: cleanlocal
index 18ae1fe94da1a692f356da97c00cc43870666359..b94060be8da3a7710f016a3c92952c249b70e8b7 100644 (file)
@@ -30,10 +30,7 @@ xs.opic: CFLAGS += -DUSE_DLSYM
 endif
 
 .PHONY: install
-install: install-headers
-
-.PHONY: install-headers
-install-headers:
+install::
        $(INSTALL_DIR) $(DESTDIR)$(includedir)
        $(INSTALL_DIR) $(DESTDIR)$(includedir)/xenstore-compat
        $(INSTALL_DATA) $(XEN_INCLUDE)/xenstore-compat/xs.h $(DESTDIR)$(includedir)/xenstore-compat/xs.h
@@ -42,10 +39,7 @@ install-headers:
        ln -sf xenstore-compat/xs_lib.h $(DESTDIR)$(includedir)/xs_lib.h
 
 .PHONY: uninstall
-uninstall: uninstall-headers
-
-.PHONY: uninstall-headers
-uninstall-headers:
+uninstall::
        rm -f $(DESTDIR)$(includedir)/xs_lib.h
        rm -f $(DESTDIR)$(includedir)/xs.h
        rm -f $(DESTDIR)$(includedir)/xenstore-compat/xs_lib.h