Patchwork libcacard: build vscclient from root only

login
register
mail settings
Submitter Alon Levy
Date Nov. 28, 2012, 9:26 a.m.
Message ID <1354094762-9538-1-git-send-email-alevy@redhat.com>
Download mbox | patch
Permalink /patch/202403/
State New
Headers show

Comments

Alon Levy - Nov. 28, 2012, 9:26 a.m.
Signed-off-by: Alon Levy <alevy@redhat.com>
---
 libcacard/Makefile | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
Paolo Bonzini - Nov. 28, 2012, 10:09 a.m.
Il 28/11/2012 10:26, Alon Levy ha scritto:
> Signed-off-by: Alon Levy <alevy@redhat.com>
> ---
>  libcacard/Makefile | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/libcacard/Makefile b/libcacard/Makefile
> index 7bce286..98c971d 100644
> --- a/libcacard/Makefile
> +++ b/libcacard/Makefile
> @@ -1,3 +1,7 @@
> +ifeq ($(BUILD_DIR),)
> +	BUILD_DIR=$(CURDIR)/../
> +endif
> +
>  -include ../config-host.mak
>  -include $(SRC_PATH)/rules.mak
>  -include $(SRC_PATH)/Makefile.objs
> @@ -49,12 +53,12 @@ libcacard.pc: $(libcacard_srcpath)/libcacard.pc.in
>  
>  .PHONY: install-libcacard
>  
> -install-libcacard: libcacard.pc libcacard.la vscclient
> +install-libcacard: libcacard.pc libcacard.la ../vscclient
>  	$(INSTALL_DIR) "$(DESTDIR)$(libdir)"
>  	$(INSTALL_DIR) "$(DESTDIR)$(libdir)/pkgconfig"
>  	$(INSTALL_DIR) "$(DESTDIR)$(libcacard_includedir)"
>  	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
> -	$(LIBTOOL) --mode=install $(INSTALL_PROG) vscclient "$(DESTDIR)$(bindir)"
> +	$(LIBTOOL) --mode=install $(INSTALL_PROG) ../vscclient "$(DESTDIR)$(bindir)"
>  	$(LIBTOOL) --mode=install $(INSTALL_DATA) libcacard.la "$(DESTDIR)$(libdir)"
>  	$(LIBTOOL) --mode=install $(INSTALL_DATA) libcacard.pc "$(DESTDIR)$(libdir)/pkgconfig"
>  	for inc in *.h; do \
> 

Can you instead move all the vscclient rules to libcacard/Makefile
(including building the program as libcacard/vscclient)?

Paolo

Patch

diff --git a/libcacard/Makefile b/libcacard/Makefile
index 7bce286..98c971d 100644
--- a/libcacard/Makefile
+++ b/libcacard/Makefile
@@ -1,3 +1,7 @@ 
+ifeq ($(BUILD_DIR),)
+	BUILD_DIR=$(CURDIR)/../
+endif
+
 -include ../config-host.mak
 -include $(SRC_PATH)/rules.mak
 -include $(SRC_PATH)/Makefile.objs
@@ -49,12 +53,12 @@  libcacard.pc: $(libcacard_srcpath)/libcacard.pc.in
 
 .PHONY: install-libcacard
 
-install-libcacard: libcacard.pc libcacard.la vscclient
+install-libcacard: libcacard.pc libcacard.la ../vscclient
 	$(INSTALL_DIR) "$(DESTDIR)$(libdir)"
 	$(INSTALL_DIR) "$(DESTDIR)$(libdir)/pkgconfig"
 	$(INSTALL_DIR) "$(DESTDIR)$(libcacard_includedir)"
 	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
-	$(LIBTOOL) --mode=install $(INSTALL_PROG) vscclient "$(DESTDIR)$(bindir)"
+	$(LIBTOOL) --mode=install $(INSTALL_PROG) ../vscclient "$(DESTDIR)$(bindir)"
 	$(LIBTOOL) --mode=install $(INSTALL_DATA) libcacard.la "$(DESTDIR)$(libdir)"
 	$(LIBTOOL) --mode=install $(INSTALL_DATA) libcacard.pc "$(DESTDIR)$(libdir)/pkgconfig"
 	for inc in *.h; do \