Commit d0762eff authored by Tycho Andersen's avatar Tycho Andersen Committed by Pavel Emelyanov

build: only generate soccr config.h if necessary

Without this, any rebuild fails with:

make[1]: Entering directory '/home/ubuntu/criu'
make[1]: Entering directory '/home/ubuntu/criu'
  GEN      .gitid
  GEN      criu/include/config.h
  GEN      /home/ubuntu/criu/criu/include/version.h
make[1]: 'compel/plugins/std.built-in.o' is up to date.
make[1]: Leaving directory '/home/ubuntu/criu'
ln: failed to create symbolic link '/home/ubuntu/criu/soccr/config.h': File exists
Makefile:217: recipe for target '/home/ubuntu/criu/soccr/config.h' failed
make: *** [/home/ubuntu/criu/soccr/config.h] Error 1
make: *** Waiting for unfinished jobs....
make[1]: Entering directory '/home/ubuntu/criu'
make[1]: 'compel/compel-host' is up to date.
make[1]: Leaving directory '/home/ubuntu/criu'
make[1]: Leaving directory '/home/ubuntu/criu'
Signed-off-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
Reviewed-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 207bbd89
...@@ -207,7 +207,7 @@ $(eval $(call gen-built-in,images)) ...@@ -207,7 +207,7 @@ $(eval $(call gen-built-in,images))
SOCCR_A := soccr/libsoccr.a SOCCR_A := soccr/libsoccr.a
SOCCR_CONFIG := $(SRC_DIR)/soccr/config.h SOCCR_CONFIG := $(SRC_DIR)/soccr/config.h
$(SOCCR_CONFIG): $(CONFIG_HEADER) $(SOCCR_CONFIG): $(CONFIG_HEADER)
$(Q) ln -s ../$(CONFIG_HEADER_REL) $@ $(Q) test -f $@ || ln -s ../$(CONFIG_HEADER_REL) $@
soccr/%: $(SOCCR_CONFIG) .FORCE soccr/%: $(SOCCR_CONFIG) .FORCE
$(Q) $(MAKE) $(build)=soccr $@ $(Q) $(MAKE) $(build)=soccr $@
soccr/built-in.o: $(SOCCR_CONFIG) .FORCE soccr/built-in.o: $(SOCCR_CONFIG) .FORCE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment