[Libreoffice-commits] .: 3 commits - config_host.mk.in configure.in idlc/Executable_idlc.mk idlc/prj idlc/source Module_cross_tail_build.mk Module_tail_build.mk odk/pack odk/util Repository.mk solenv/gbuild

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Sep 27 13:46:32 PDT 2012


 Module_cross_tail_build.mk    |    4 +++-
 Module_tail_build.mk          |    4 +++-
 Repository.mk                 |    4 +++-
 config_host.mk.in             |    1 +
 configure.in                  |   32 ++++++++++++++++++++++++++++++++
 idlc/Executable_idlc.mk       |    7 +++++++
 idlc/prj/build.lst            |    2 +-
 idlc/source/idlccompile.cxx   |    5 ++++-
 odk/pack/copying/makefile.mk  |    6 +++++-
 odk/util/check.pl             |    5 ++++-
 solenv/gbuild/UnoApiTarget.mk |    1 -
 solenv/gbuild/gbuild.mk       |    8 ++++++++
 12 files changed, 71 insertions(+), 8 deletions(-)

New commits:
commit 97e7f62481d8d3b6653f292c5069df133c684f3e
Author: Rene Engelhard <rene at debian.org>
Date:   Thu Sep 27 21:23:03 2012 +0200

    move ucpp definitions into gbuild.mk (as e.g.xsltproc)
    
    Change-Id: Ib59ca9ac4d88db6e009c656e31ee866f4d9818e9

diff --git a/solenv/gbuild/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk
index 7e2ea13..a4c6e19 100644
--- a/solenv/gbuild/UnoApiTarget.mk
+++ b/solenv/gbuild/UnoApiTarget.mk
@@ -30,9 +30,6 @@
 
 gb_UnoApiPartTarget_IDLCTARGET := $(call gb_Executable_get_target_for_build,idlc)
 gb_UnoApiPartTarget_IDLCCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiPartTarget_IDLCTARGET)
-ifeq (,$(SYSTEM_UCPP))
-gb_UnoApiPartTarget_UCPPTARGET := $(call gb_Executable_get_target_for_build,ucpp)
-endif
 
 # The .urd files are actually created by the gb_UnoApiPartTarget__command,
 # invoked for the per-directory .done files.
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index ee2f985..2a51440 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -404,6 +404,14 @@ gb_PYTHONTARGET := $(call gb_Executable_get_target_for_build,python)
 gb_PYTHON := $(gb_PYTHON_PRECOMMAND) $(gb_PYTHONTARGET)
 endif
 
+ifneq (,$(SYSTEM_UCPP))
+gb_UCPP := $(SYSTEM_UCPP)
+gb_UCPPTARGET :=
+else
+gb_UCPP := ucpp
+gb_UCPPTARGET := $(call gb_Executable_get_target_for_build,ucpp)
+endif
+
 .PHONY: help
 help:
 	@cat $(SRCDIR)/solenv/gbuild/gbuild.help.txt
commit 7b9fb8f6736248f1c218ef1667eae6523487368d
Author: Rene Engelhard <rene at debian.org>
Date:   Thu Sep 27 20:49:25 2012 +0200

    add --with-idlc-cpp to allow  use of "normal" cpp
    
    Change-Id: Ib32bb0b3e9cf4ce6aeb60a417a2f07d72facf41d

diff --git a/configure.in b/configure.in
index 09fb9cb..17b13c6 100644
--- a/configure.in
+++ b/configure.in
@@ -2078,6 +2078,16 @@ AC_ARG_WITH(mingw-cross-compiler,
     ],
 ,)
 
+AC_ARG_WITH(idlc-cpp,
+    AS_HELP_STRING([--with-idlc-cpp],
+        [Specify the C Preprocessor to use for idlc.])
+    [
+                          Usage:     --with-idlc-cpp=cpp
+
+                          Default is ucpp.
+    ]
+,)
+
 AC_ARG_WITH(build-version,
     AS_HELP_STRING([--with-build-version],
         [Allows the builder to add a custom version tag that will appear in the
@@ -6318,13 +6328,20 @@ else
 fi
 AC_SUBST(BUILD_DMAKE)
 
-AC_MSG_CHECKING([which ucpp tp use])
-if test -n "$with_system_ucpp" -a "$with_system_ucpp" != "no"; then
-    AC_MSG_RESULT([external])
-    AC_PATH_PROG(SYSTEM_UCPP, ucpp)
+AC_MSG_CHECKING([which C preprocessor to use in idlc])
+if test -n "$with_idlc_cpp"; then
+    AC_MSG_RESULT([$with_idlc_cpp])
+    AC_PATH_PROG(SYSTEM_UCPP, $with_idlc_cpp)
 else
-    AC_MSG_RESULT([internal])
-    BUILD_TYPE="$BUILD_TYPE UCPP"
+    AC_MSG_RESULT([ucpp])
+    AC_MSG_CHECKING([which ucpp tp use])
+    if test -n "$with_system_ucpp" -a "$with_system_ucpp" != "no"; then
+        AC_MSG_RESULT([external])
+        AC_PATH_PROG(SYSTEM_UCPP, ucpp)
+    else
+        AC_MSG_RESULT([internal])
+        BUILD_TYPE="$BUILD_TYPE UCPP"
+    fi
 fi
 AC_SUBST(SYSTEM_UCPP)
 
commit c0fb5ed758c9ed8c1bb6b8344592c4781f475443
Author: Rene Engelhard <rene at debian.org>
Date:   Thu Sep 27 19:51:33 2012 +0200

    add --with-system-ucpp
    
    Change-Id: Ic322d1be23033049fa3b5cd60c00479bb6cae3ca

diff --git a/Module_cross_tail_build.mk b/Module_cross_tail_build.mk
index 61b5145..e15848b 100644
--- a/Module_cross_tail_build.mk
+++ b/Module_cross_tail_build.mk
@@ -84,7 +84,9 @@ $(eval $(call gb_Module_add_moduledirs,cross_tail_build,\
 		translations \
 	) \
 	ucbhelper \
-	ucpp \
+	$(if $(filter UCPP,$(BUILD_TYPE)),\
+		ucpp \
+	) \
 	udkapi \
 	udm \
 	unoil \
diff --git a/Module_tail_build.mk b/Module_tail_build.mk
index 8e5c1c1..3155b7b 100644
--- a/Module_tail_build.mk
+++ b/Module_tail_build.mk
@@ -187,7 +187,9 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\
     twain \
     ucb \
 	ucbhelper \
-	ucpp \
+	$(if $(filter UCPP,$(BUILD_TYPE)),\
+		ucpp \
+	) \
 	udkapi \
 	udm \
     unixODBC \
diff --git a/Repository.mk b/Repository.mk
index 79f2004..68ddbfc 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -62,7 +62,9 @@ $(eval $(call gb_Helper_register_executables,NONE, \
     svidl \
     transex3 \
     typesconfig \
-    ucpp \
+    $(if $(filter UCPP,$(BUILD_TYPE)),\
+            ucpp \
+    ) \
     ulfconv \
     ulfex \
     xml2cmp \
diff --git a/config_host.mk.in b/config_host.mk.in
index 6b0a4e8..81890c6 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -594,6 +594,7 @@ export THES_SYSTEM_DIR=@THES_SYSTEM_DIR@
 @x_Cygwin@ export TMP=@TMP_DIRECTORY@
 export TMPDIR=@TEMP_DIRECTORY@
 export TYPO_EXTENSION_PACK=@TYPO_EXTENSION_PACK@
+export SYSTEM_UCPP=@SYSTEM_UCPP@
 export UNIXWRAPPERNAME=@UNIXWRAPPERNAME@
 export UPD=@UPD@
 export USE_FT_EMBOLDEN=@USE_FT_EMBOLDEN@
diff --git a/configure.in b/configure.in
index 37c5f09..09fb9cb 100644
--- a/configure.in
+++ b/configure.in
@@ -1383,6 +1383,11 @@ AC_ARG_WITH(system-icu,
         [Use icu already on system.]),,
     [with_system_icu="$with_system_libs"])
 
+AC_ARG_WITH(system-ucpp,
+    AS_HELP_STRING([--with-system-ucpp],
+        [Use ucpp already on system.]),,
+    [])
+
 AC_ARG_WITH(system-openldap,
     AS_HELP_STRING([--with-system-openldap],
         [Use the OpenLDAP LDAP SDK already on system.]),,
@@ -6313,6 +6318,16 @@ else
 fi
 AC_SUBST(BUILD_DMAKE)
 
+AC_MSG_CHECKING([which ucpp tp use])
+if test -n "$with_system_ucpp" -a "$with_system_ucpp" != "no"; then
+    AC_MSG_RESULT([external])
+    AC_PATH_PROG(SYSTEM_UCPP, ucpp)
+else
+    AC_MSG_RESULT([internal])
+    BUILD_TYPE="$BUILD_TYPE UCPP"
+fi
+AC_SUBST(SYSTEM_UCPP)
+
 dnl ===================================================================
 dnl Check for epm (not needed for Windows)
 dnl ===================================================================
diff --git a/idlc/Executable_idlc.mk b/idlc/Executable_idlc.mk
index 32ecda6..ef2df89 100644
--- a/idlc/Executable_idlc.mk
+++ b/idlc/Executable_idlc.mk
@@ -46,6 +46,13 @@ $(eval $(call gb_Executable_add_scanners,idlc,\
     idlc/source/scanner \
 ))
 
+ifneq (,$(SYSTEM_UCPP))
+$(eval $(call gb_Executable_add_defs,idlc,\
+    -DSYSTEM_UCPP \
+    -DUCPP=\"file:$(SYSTEM_UCPP)\" \
+))
+endif
+
 $(eval $(call gb_Executable_add_exception_objects,idlc,\
     idlc/source/idlcmain \
     idlc/source/idlc \
diff --git a/idlc/prj/build.lst b/idlc/prj/build.lst
index 5113694..e2c515a 100644
--- a/idlc/prj/build.lst
+++ b/idlc/prj/build.lst
@@ -1,3 +1,3 @@
-ic	idlc	:	ucpp registry NULL
+ic	idlc	:	UCPP:ucpp registry NULL
 ic	idlc					usr1	-	all	ic_mkout NULL
 ic	idlc\prj				nmake	-	all	ic_prj NULL
diff --git a/idlc/source/idlccompile.cxx b/idlc/source/idlccompile.cxx
index 0491046..1acbf84 100644
--- a/idlc/source/idlccompile.cxx
+++ b/idlc/source/idlccompile.cxx
@@ -299,6 +299,7 @@ sal_Int32 compileFile(const OString * pathname)
 
     OUString cpp;
     OUString startDir;
+#ifndef SYSTEM_UCPP
     if (osl_getExecutableFile(&cpp.pData) != osl_Process_E_None) {
         OSL_ASSERT(false);
     }
@@ -311,7 +312,9 @@ sal_Int32 compileFile(const OString * pathname)
 #else
     cpp += OUString( RTL_CONSTASCII_USTRINGPARAM("ucpp"));
 #endif
-
+#else // SYSTEM_UCPP
+    cpp = OUString( RTL_CONSTASCII_USTRINGPARAM(UCPP));
+#endif
     oslProcess      hProcess = NULL;
     oslProcessError procError = osl_Process_E_None;
 
diff --git a/odk/pack/copying/makefile.mk b/odk/pack/copying/makefile.mk
index f9f4d85..8e6cbb4 100644
--- a/odk/pack/copying/makefile.mk
+++ b/odk/pack/copying/makefile.mk
@@ -50,13 +50,17 @@ IDL_CHAPTER_REFS=idl_chapter_refs.txt
 EXELIST = \
     $(DESTDIRBIN)/cppumaker$(EXEPOSTFIX) 	\
     $(DESTDIRBIN)/regcompare$(EXEPOSTFIX) 	\
-	$(DESTDIRBIN)/ucpp$(EXEPOSTFIX) 	\
     $(DESTDIRBIN)/idlc$(EXEPOSTFIX) 	\
     $(DESTDIRBIN)/javamaker$(EXEPOSTFIX) 	\
     $(DESTDIRBIN)/autodoc$(EXEPOSTFIX) \
     $(DESTDIRBIN)/unoapploader$(EXEPOSTFIX) \
     $(DESTDIRBIN)/uno-skeletonmaker$(EXEPOSTFIX)
 
+.IF "$(SYSTEM_UCPP)" == ""
+EXELIST += \
+	$(DESTDIRBIN)/ucpp$(EXEPOSTFIX)
+.ENDIF
+
 .IF "$(GUI)"=="WNT"
 EXELIST += \
     $(DESTDIRBIN)/climaker$(EXEPOSTFIX)
diff --git a/odk/util/check.pl b/odk/util/check.pl
index a685b7f..0840713 100644
--- a/odk/util/check.pl
+++ b/odk/util/check.pl
@@ -43,9 +43,12 @@ if (-d "$StartDir") {
     # check binaries
     print "check binaries: ";
     if (-d "$StartDir/bin") {
-	my @binarylist = ( "idlc","ucpp","cppumaker","javamaker",
+	my @binarylist = ( "idlc","cppumaker","javamaker",
                "regcompare","autodoc",
                "unoapploader", "uno-skeletonmaker" );
+    if ($ENV{SYSTEM_UCPP} eq "") {
+	push @binarylist,"ucpp";
+    }
 
     foreach $i (@binarylist)
     {
diff --git a/solenv/gbuild/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk
index c085c4c..7e2ea13 100644
--- a/solenv/gbuild/UnoApiTarget.mk
+++ b/solenv/gbuild/UnoApiTarget.mk
@@ -30,7 +30,9 @@
 
 gb_UnoApiPartTarget_IDLCTARGET := $(call gb_Executable_get_target_for_build,idlc)
 gb_UnoApiPartTarget_IDLCCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=$(OUTDIR_FOR_BUILD)/bin $(gb_UnoApiPartTarget_IDLCTARGET)
+ifeq (,$(SYSTEM_UCPP))
 gb_UnoApiPartTarget_UCPPTARGET := $(call gb_Executable_get_target_for_build,ucpp)
+endif
 
 # The .urd files are actually created by the gb_UnoApiPartTarget__command,
 # invoked for the per-directory .done files.


More information about the Libreoffice-commits mailing list