[v2] soccr: Generate config.h dynamically

Submitted by Cyrill Gorcunov on Oct. 5, 2016, 1:38 p.m.

Details

Message ID 20161005133829.GG2922@uranus.lan
State Superseded
Series "soccr: Generate config.h dynamically"
Headers show

Commit Message

Cyrill Gorcunov Oct. 5, 2016, 1:38 p.m.
On Wed, Oct 05, 2016 at 04:29:56PM +0300, Cyrill Gorcunov wrote:
> On Wed, Oct 05, 2016 at 04:25:28PM +0300, Cyrill Gorcunov wrote:
> > Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
> > ---
> >  Makefile       | 3 +++
> >  soccr/config.h | 2 +-
> >  2 files changed, 4 insertions(+), 1 deletion(-)
> 
> Drop it

	Cyrill
From b2f2256f2846473c80621238ca86a4f60d5959c5 Mon Sep 17 00:00:00 2001
From: Cyrill Gorcunov <gorcunov@openvz.org>
Date: Wed, 5 Oct 2016 16:24:29 +0300
Subject: [PATCH] soccr: Generate config.h dynamically

Otherwise there is a broken symlink which makes tags/etags unhappy.

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
 Makefile       | 8 ++++++--
 soccr/config.h | 1 -
 2 files changed, 6 insertions(+), 3 deletions(-)
 delete mode 120000 soccr/config.h

Patch hide | download patch | download mbox

diff --git a/Makefile b/Makefile
index 37ae7cb6b7d3..9effc3b9a6ab 100644
--- a/Makefile
+++ b/Makefile
@@ -209,9 +209,12 @@  include Makefile.compel
 # Next the socket CR library
 #
 SOCCR_A := soccr/libsoccr.a
-soccr/%: $(CONFIG_HEADER) .FORCE
+SOCCR_CONFIG := $(SRC_DIR)/soccr/config.h
+$(SOCCR_CONFIG): $(CONFIG_HEADER)
+	$(Q) ln -s $(CONFIG_HEADER) $@
+soccr/%: $(SOCCR_CONFIG) .FORCE
 	$(Q) $(MAKE) $(build)=soccr $@
-soccr/built-in.o: $(CONFIG_HEADER) .FORCE
+soccr/built-in.o: $(SOCCR_CONFIG) .FORCE
 	$(Q) $(MAKE) $(build)=soccr all
 $(SOCCR_A): |soccr/built-in.o
 
@@ -265,6 +268,7 @@  mrproper: subclean
 	$(Q) $(MAKE) $(build)=compel/plugins $@
 	$(Q) $(MAKE) $(build)=soccr $@
 	$(Q) $(RM) $(CONFIG_HEADER)
+	$(Q) $(RM) $(SOCCR_CONFIG)
 	$(Q) $(RM) $(VERSION_HEADER)
 	$(Q) $(RM) $(COMPEL_VERSION_HEADER)
 	$(Q) $(RM) cscope.*
diff --git a/soccr/config.h b/soccr/config.h
deleted file mode 120000
index 106aa8bf2be0..000000000000
--- a/soccr/config.h
+++ /dev/null
@@ -1 +0,0 @@ 
-../criu/include/config.h
\ No newline at end of file

Comments

Dmitry Safonov Oct. 5, 2016, 1:40 p.m.
Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
Dmitry Safonov Oct. 5, 2016, 1:48 p.m.
On 10/05/2016 04:40 PM, Dmitry Safonov wrote:
> Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>

Heh, there is a need also for a small fixup for .gitignore
Cyrill Gorcunov Oct. 5, 2016, 1:53 p.m.
On Wed, Oct 05, 2016 at 04:48:07PM +0300, Dmitry Safonov wrote:
> On 10/05/2016 04:40 PM, Dmitry Safonov wrote:
> > Reviewed-by: Dmitry Safonov <dsafonov@virtuozzo.com>
> 
> Heh, there is a need also for a small fixup for .gitignore

make it on top please, or pick my patch and extend it please