summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <tchvatal@suse.cz>2012-12-10 10:41:35 +0100
committerPetr Mladek <pmladek@suse.cz>2013-01-10 10:58:19 +0100
commit6af200ec0cbc78fee7b835de06a1588c7645fdc7 (patch)
tree2a4f5428e4514081c6686c3225e7ea81fd043881
parentb3d5e78dd78390513021b46bc44036cdde2f1b45 (diff)
Add configure switch that allows hardlink deliver
This switch just makes possible to configure in ln delivery instead of cp based one. The feature was already in the place, we just make it visible as configure option now. Change-Id: I778ef3b03e6b9a57057e66ff6307e7da46bcd935
-rw-r--r--config_host.mk.in1
-rw-r--r--configure.ac19
-rw-r--r--solenv/gbuild/gbuild.mk4
3 files changed, 24 insertions, 0 deletions
diff --git a/config_host.mk.in b/config_host.mk.in
index 1c9874494b37..55d0fa0d3f14 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -218,6 +218,7 @@ export GTK_PRINT_LIBS=$(gb_SPACE)@GTK_PRINT_LIBS@
export GUI=@GUI@
export GUIBASE=@GUIBASE@
export GUI_FOR_BUILD=@GUI_FOR_BUILD@
+export HARDLINKDELIVER=@HARDLINKDELIVER@
export HAVE_CXX0X=@HAVE_CXX0X@
export HAVE_GCC_AVX=@HAVE_GCC_AVX@
export HAVE_GCC_BUILTIN_ATOMIC=@HAVE_GCC_BUILTIN_ATOMIC@
diff --git a/configure.ac b/configure.ac
index 2fa044ffd097..688f2e4d89b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -678,6 +678,12 @@ AC_ARG_ENABLE(ext-wiki-publisher,
dnl ---------- *** ----------
+AC_ARG_ENABLE([hardlink-deliver],
+ AS_HELP_STRING([--enable-hardlink-deliver],
+ [Put files into deliver folder as hardlinks instead of copying them
+ over. Saves space and speeds up build.])
+)
+
AC_ARG_ENABLE(mergelibs,
AS_HELP_STRING([--enable-mergelibs],
[Enables linking of big, merged, library. Experimental feature tested
@@ -12240,6 +12246,19 @@ else
fi
AC_SUBST(MERGELIBS)
+# ===================================================================
+# Create hardlinks on deliver instead of copying for smaller size and speed up
+# ===================================================================
+AC_MSG_CHECKING([whether to create hardlinks for delivering files])
+HARDLINKDELIVER=
+if test "$enable_hardlink_deliver" = "yes"; then
+ HARDLINKDELIVER="TRUE"
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
+AC_SUBST(HARDLINKDELIVER)
+
dnl ===================================================================
dnl icerun is a wrapper that stops us spawning tens of processes
dnl locally - for tools that can't be executed on the compile cluster
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index d7b804deab39..eebcfe9b0578 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -133,6 +133,10 @@ ENABLE_DEBUGINFO_FOR := all
endif
endif
+ifeq ($(HARDLINKDELIVER),TRUE)
+gb_Deliver_HARDLINK := $(true)
+endif
+
ifeq ($(or $(ENABLE_SYMBOLS),$(enable_symbols)),FALSE)
gb_SYMBOL := $(false)
else