summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2012-10-31 23:48:49 +0100
committerMatúš Kukan <matus.kukan@gmail.com>2012-11-03 17:36:44 +0100
commit75a087c80730bdce257756d863397da8268469b5 (patch)
tree70ecdac097b636a6548a79d9431e6ef679483e3b
parentd32878608ecfdeceaddb266ac69198ef69b62c12 (diff)
compile concat-deps in solenv; also put them into $(OUTDIR)
Change-Id: I4ef21f14a77442b60059c649b83435c775670060
-rw-r--r--.gitignore4
-rw-r--r--Makefile.top5
-rwxr-xr-xbootstrap8
-rw-r--r--solenv/CustomTarget_concat-deps.mk26
-rw-r--r--solenv/Module_solenv.mk7
-rw-r--r--solenv/Package_concat-deps.mk14
-rw-r--r--solenv/gbuild/LinkTarget.mk2
-rw-r--r--solenv/gbuild/UnoApiTarget.mk2
8 files changed, 51 insertions, 17 deletions
diff --git a/.gitignore b/.gitignore
index ebb1e0643ae3..02d1c87ba6d6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -104,10 +104,6 @@ TAGS
/solenv/gdb/libreoffice/*.py[co]
/solenv/gdb/libreoffice/util/*.py[co]
-# botstrap generated tool
-/solenv/bin/concat-deps
-/solenv/bin/concat-deps.exe
-
# test output files
test/user-template/user/psprint/pspfontcache
diff --git a/Makefile.top b/Makefile.top
index 2838a7bd1285..867d2df8545d 100644
--- a/Makefile.top
+++ b/Makefile.top
@@ -361,8 +361,7 @@ endif
rm -fr config_host.mk config_build.mk aclocal.m4 autom4te.cache \
config.log config.status configure \
ooo.lst post_download post_download.log \
- config_host.mk.last set_soenv.stamp src.downloaded warn \
- solenv/bin/concat-deps.exe solenv/bin/concat-deps
+ config_host.mk.last set_soenv.stamp src.downloaded warn
find $(SOLARENV)/gdb -name "*.pyc" -exec rm {} \;
#
@@ -392,7 +391,7 @@ endif
#
bootstrap: $(WORKDIR)/bootstrap compilerplugins
-$(WORKDIR)/bootstrap: solenv/bin/concat-deps.c
+$(WORKDIR)/bootstrap:
@cd $(SRCDIR) && ./bootstrap
@mkdir -p $(dir $@) && touch $@
diff --git a/bootstrap b/bootstrap
index 073f69a70e90..b7a73622e1d1 100755
--- a/bootstrap
+++ b/bootstrap
@@ -72,14 +72,6 @@ if test "$BUILD_DMAKE" != "NO"; then
echo "dmake copied to $SOLARENV/$OUTPATH_FOR_BUILD/bin/dmake$EXEEXT"
fi
-# build concat-deps
-echo "building concat-deps"
-if [ "$COM_FOR_BUILD" = "MSC" ] ; then
- # on cygwin force the use of gcc
- gcc -O2 "$SOLARENV/bin/concat-deps.c" -o "$SOLARENV/bin/concat-deps" || exit
-else
- $CC_FOR_BUILD -O2 "$SOLARENV/bin/concat-deps.c" -o "$SOLARENV/bin/concat-deps" || exit
-fi
#make sure build.pl is executable
chmod +x "$SRC_ROOT/solenv/bin/build.pl"
diff --git a/solenv/CustomTarget_concat-deps.mk b/solenv/CustomTarget_concat-deps.mk
new file mode 100644
index 000000000000..1f138c59b8ab
--- /dev/null
+++ b/solenv/CustomTarget_concat-deps.mk
@@ -0,0 +1,26 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_CustomTarget_CustomTarget,solenv/concat-deps))
+
+$(call gb_CustomTarget_get_target,solenv/concat-deps) : \
+ $(call gb_CustomTarget_get_workdir,solenv/concat-deps)/concat-deps
+
+$(call gb_CustomTarget_get_workdir,solenv/concat-deps)/concat-deps : \
+ $(SRCDIR)/solenv/bin/concat-deps.c \
+ | $(call gb_CustomTarget_get_workdir,solenv/concat-deps)/.dir
+ $(call gb_Output_announce,solenv/concat-deps,$(true),GCC,1)
+ifeq ($(COM_FOR_BUILD),MSC)
+ # on cygwin force the use of gcc
+ gcc -O2 $< -o $@
+else
+ $(CC_FOR_BUILD) -O2 $< -o $@
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/solenv/Module_solenv.mk b/solenv/Module_solenv.mk
index d107f9a6d1a9..54db397a088f 100644
--- a/solenv/Module_solenv.mk
+++ b/solenv/Module_solenv.mk
@@ -33,6 +33,13 @@ $(eval $(call gb_Module_add_targets,solenv,\
Package_minor \
))
+ifeq ($(CROSS_COMPILING),$(false))
+$(eval $(call gb_Module_add_targets,solenv,\
+ CustomTarget_concat-deps \
+ Package_concat-deps \
+))
+endif
+
ifeq ($(GUI),UNX)
ifneq ($(OS),IOS)
ifneq ($(OS),ANDROID)
diff --git a/solenv/Package_concat-deps.mk b/solenv/Package_concat-deps.mk
new file mode 100644
index 000000000000..9d6319d18c48
--- /dev/null
+++ b/solenv/Package_concat-deps.mk
@@ -0,0 +1,14 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Package_Package,solenv_concat-deps,$(call gb_CustomTarget_get_workdir,solenv/concat-deps)))
+
+$(eval $(call gb_Package_add_file,solenv_concat-deps,bin/concat-deps,concat-deps))
+
+# vim: set noet sw=4 ts=4:
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 4b47c83ec398..e63892bcb274 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -386,7 +386,7 @@ $(call gb_Helper_abbreviate_dirs,\
$(foreach object,$(8),$(call gb_GenCObject_get_dep_target,$(object))) \
$(foreach object,$(9),$(call gb_GenCxxObject_get_dep_target,$(object))) \
) && \
- $(SOLARENV)/bin/concat-deps $${RESPONSEFILE} > $(1)) && \
+ $(call gb_Executable_get_target_for_build,concat-deps) $${RESPONSEFILE} > $(1)) && \
rm -f $${RESPONSEFILE}
endef
diff --git a/solenv/gbuild/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk
index 98734ab34b75..d5da154f318d 100644
--- a/solenv/gbuild/UnoApiTarget.mk
+++ b/solenv/gbuild/UnoApiTarget.mk
@@ -143,7 +143,7 @@ $(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1)) && \
RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),200,\
$(foreach idl,$(patsubst %.idl,%,$(3)),$(call gb_UnoApiPartTarget_get_dep_target,$(idl)))) && \
- $(SOLARENV)/bin/concat-deps $${RESPONSEFILE} > $(1)) && \
+ $(call gb_Executable_get_target_for_build,concat-deps) $${RESPONSEFILE} > $(1)) && \
rm -f $${RESPONSEFILE}
endef