diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2012-05-04 00:29:04 +0200 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2012-05-09 09:39:18 +0100 |
commit | f4f4e3c050b117a8bfaa95a865b3b37bcb637516 (patch) | |
tree | 37a224082d2ae279ac747f01e56c91b386627435 /solenv/gbuild | |
parent | 4f01261a04b702819aba9966177abe601761103b (diff) |
gbuild: use mixed paths on cygwin
make 3.82 understands mixed paths, so use them.
This allows us to get rid of evil in BuildDirs.mk.
Hopefully, life will be simpler now.
Change-Id: I I I641f28c6af1948963f7004f8071af62e21caabb3
Diffstat (limited to 'solenv/gbuild')
-rw-r--r-- | solenv/gbuild/BuildDirs.mk | 47 | ||||
-rw-r--r-- | solenv/gbuild/Extension.mk | 2 | ||||
-rw-r--r-- | solenv/gbuild/Helper.mk | 16 | ||||
-rw-r--r-- | solenv/gbuild/JavaClassSet.mk | 3 | ||||
-rw-r--r-- | solenv/gbuild/UnoApiTarget.mk | 16 | ||||
-rw-r--r-- | solenv/gbuild/gbuild.mk | 3 | ||||
-rw-r--r-- | solenv/gbuild/platform/WNT_INTEL_MSC.mk | 13 | ||||
-rw-r--r-- | solenv/gbuild/platform/com_GCC_defs.mk | 1 |
8 files changed, 18 insertions, 83 deletions
diff --git a/solenv/gbuild/BuildDirs.mk b/solenv/gbuild/BuildDirs.mk deleted file mode 100644 index 4aa7176d3fdc..000000000000 --- a/solenv/gbuild/BuildDirs.mk +++ /dev/null @@ -1,47 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* - -# The entire gbuild operates in unix paths, and then when calling the -# native tools, converts them back to the Windows native paths. -# -# The path overwriting below is EVIL, because after the recent changes when -# every module (even build.pl-based) is routed through gbuild, the modules -# using build.pl-based build will get OUTDIR in the cygwin format. -# -# To undo this, we explicitly set these vars to native Windows paths in -# build.pl again, otherwise we would have potentially different behavior in -# build.pl-based modules when you build them from the toplevel (using make -# all), and from the module itself (using cd module ; build ) -ifeq ($(OS_FOR_BUILD),WNT) -override WORKDIR := $(shell cygpath -u $(WORKDIR)) -override OUTDIR := $(shell cygpath -u $(OUTDIR)) -override OUTDIR_FOR_BUILD := $(shell cygpath -u $(OUTDIR_FOR_BUILD)) -override SRCDIR := $(shell cygpath -u $(SRCDIR)) -endif - -# vim: set noet sw=4: diff --git a/solenv/gbuild/Extension.mk b/solenv/gbuild/Extension.mk index 94ef7b3801b8..faa0de34c434 100644 --- a/solenv/gbuild/Extension.mk +++ b/solenv/gbuild/Extension.mk @@ -191,7 +191,7 @@ $(call gb_Extension_get_rootdir,$(1))/$(2) : $(gb_Extension_HELPEXTARGET) $(call gb_Extension_get_rootdir,$(1))/$(2) : $(3) $$(call gb_Output_announce,$(2),$(true),XHP,3) mkdir -p $$(dir $$@) && \ - $(gb_Extension_HELPEXCOMMAND) -i $$(call gb_Helper_native_path,$$<) -o $$(call gb_Helper_native_path,$$@) -l $(4) -m $$(call gb_Helper_native_path,$$(SDF)) + $(gb_Extension_HELPEXCOMMAND) -i $$< -o $$@ -l $(4) -m $$(SDF) endef diff --git a/solenv/gbuild/Helper.mk b/solenv/gbuild/Helper.mk index 495a3e001edc..8e8d0242a460 100644 --- a/solenv/gbuild/Helper.mk +++ b/solenv/gbuild/Helper.mk @@ -44,25 +44,15 @@ define gb_Helper_abbreviate_dirs S=$(SRCDIR) && \ $(subst $(SRCDIR)/,$$S/,O=$(OUTDIR)) && \ $(subst $(SRCDIR)/,$$S/,W=$(WORKDIR)) && \ -$(subst $(SRCDIR)/,$$S/,$(subst $(OUTDIR)/,$$O/,$(subst $(WORKDIR)/,$$W/,\ -$(call gb_Helper_unix_path,$(1))))) +$(subst $(SRCDIR)/,$$S/,$(subst $(OUTDIR)/,$$O/,$(subst $(WORKDIR)/,$$W/,$(1)))) endef define gb_Helper_abbreviate_dirs_native -$(call gb_Helper_native_path,$(call gb_Helper_abbreviate_dirs,$(1))) +$(call gb_Helper_abbreviate_dirs,$(1)) endef -# Convert path to native notation -# First convert to unix style to avoid problems when -# $(SRCDIR) is substring of $(gb_Helper_SRCDIR_NATIVE) -# and $(1) already contains $(gb_Helper_SRCDIR_NATIVE) define gb_Helper_native_path -$(subst $(SRCDIR),$(gb_Helper_SRCDIR_NATIVE),$(call gb_Helper_unix_path,$(1))) -endef - -# $(gb_Helper_SRCDIR_NATIVE) can't be substring of $(SRCDIR) -define gb_Helper_unix_path -$(subst $(gb_Helper_SRCDIR_NATIVE),$(SRCDIR),$(1)) +$$(call gb_Output_error,gb_Helper_native_path: Do not use. Should not be necessary.) endef define gb_Helper_make_clean_target diff --git a/solenv/gbuild/JavaClassSet.mk b/solenv/gbuild/JavaClassSet.mk index 1830d0130736..e5b617f9580c 100644 --- a/solenv/gbuild/JavaClassSet.mk +++ b/solenv/gbuild/JavaClassSet.mk @@ -43,8 +43,7 @@ $(call gb_Helper_abbreviate_dirs_native,\ $(if $(filter-out $(JARDEPS),$(4)), \ rm -rf $(call gb_JavaClassSet_get_classdir,$(2))/* && \ RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),500,\ - $(call gb_Helper_native_path,\ - $(filter-out $(JARDEPS),$(4)))) && \ + $(filter-out $(JARDEPS),$(4))) && \ $(if $(3),$(gb_JavaClassSet_JAVACCOMMAND) \ $(gb_JavaClassSet_JAVACDEBUG) \ -cp "$(T_CP)$(gb_CLASSPATHSEP)$(call gb_JavaClassSet_get_classdir,$(2))" \ diff --git a/solenv/gbuild/UnoApiTarget.mk b/solenv/gbuild/UnoApiTarget.mk index 8bc5b1f785fd..733e6214b5d6 100644 --- a/solenv/gbuild/UnoApiTarget.mk +++ b/solenv/gbuild/UnoApiTarget.mk @@ -56,10 +56,10 @@ define gb_UnoApiPartTarget__command $(call gb_Output_announce,$(2),$(true),IDL,2) mkdir -p $(call gb_UnoApiPartTarget_get_target,$(dir $(2))) && \ RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),500,\ - $(call gb_Helper_native_path,$(INCLUDE) \ + $(INCLUDE) \ -M $(basename $(call gb_UnoApiPartTarget_get_dep_target,$(dir $(2)))) \ -O $(call gb_UnoApiPartTarget_get_target,$(dir $(2))) -verbose -C \ - $(sort $(patsubst $(call gb_UnoApiPartTarget_get_target,%.urd),$(SRCDIR)/%.idl,$(3))))) && \ + $(sort $(patsubst $(call gb_UnoApiPartTarget_get_target,%.urd),$(SRCDIR)/%.idl,$(3)))) && \ $(gb_UnoApiPartTarget_IDLCCOMMAND) @$${RESPONSEFILE} > /dev/null && \ rm -f $${RESPONSEFILE} && \ touch $(1) @@ -91,11 +91,11 @@ gb_UnoApiTarget_XML2CMPCOMMAND := $(gb_Helper_set_ld_path) $(gb_UnoApiTarget_XML gb_UnoApiTarget_XMLRDB := $(call gb_UnoApiTarget_get_target,types) define gb_UnoApiTarget__get_types -$(if $(1),$(foreach type,$(shell $(gb_UnoApiTarget_XML2CMPCOMMAND) -types stdout $(call gb_Helper_native_path,$(1))),$(addprefix -T,$(type)))) +$(if $(1),$(foreach type,$(shell $(gb_UnoApiTarget_XML2CMPCOMMAND) -types stdout $(1)),$(addprefix -T,$(type)))) endef define gb_UnoApiTarget__command_impl -RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),500,$(call gb_Helper_native_path,$(2))) && \ +RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),500,$(2)) && \ $(1) @$${RESPONSEFILE} && \ rm -f $${RESPONSEFILE} endef @@ -121,8 +121,8 @@ $(if $(UNOAPI_REFERENCE), \ $(call gb_Output_announce,$*,$(true),DBc,3) \ && $(gb_UnoApiTarget_REGCOMPARECOMMAND) \ -f -t \ - -r1 $(call gb_Helper_native_path,$(UNOAPI_REFERENCE)) \ - -r2 $(call gb_Helper_native_path,$(1))) + -r1 $(UNOAPI_REFERENCE) \ + -r2 $(1)) endef define gb_UnoApiTarget__check_mode @@ -275,8 +275,8 @@ gb_UnoApiHeadersTarget_CPPUMAKERCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR= define gb_UnoApiHeadersTarget__command RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),100,\ - $(call gb_Helper_native_path,-Gc $(4) -BUCR \ - -O$(3) $(call gb_UnoApiTarget_get_target,$(2)) $(UNOAPI_DEPS))) && \ + -Gc $(4) -BUCR \ + -O$(3) $(call gb_UnoApiTarget_get_target,$(2)) $(UNOAPI_DEPS)) && \ $(gb_UnoApiHeadersTarget_CPPUMAKERCOMMAND) @$${RESPONSEFILE} && \ rm -f $${RESPONSEFILE} && \ touch $(1) diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk index 1457f3d1df84..f21dfed379dc 100644 --- a/solenv/gbuild/gbuild.mk +++ b/solenv/gbuild/gbuild.mk @@ -69,9 +69,6 @@ endif include $(GBUILDDIR)/Output.mk -# BuildDirs overrides *DIR variables for Windows -include $(GBUILDDIR)/BuildDirs.mk - ifneq ($(strip $(PRODUCT)$(product)),) gb_PRODUCT := $(true) diff --git a/solenv/gbuild/platform/WNT_INTEL_MSC.mk b/solenv/gbuild/platform/WNT_INTEL_MSC.mk index ed3425fe3e68..3c7fde579296 100644 --- a/solenv/gbuild/platform/WNT_INTEL_MSC.mk +++ b/solenv/gbuild/platform/WNT_INTEL_MSC.mk @@ -239,9 +239,8 @@ endif gb_Helper_OUTDIRLIBDIR := $(OUTDIR)/bin gb_Helper_OUTDIR_FOR_BUILDLIBDIR := $(OUTDIR_FOR_BUILD)/bin -gb_Helper_SRCDIR_NATIVE := $(shell cygpath -m $(SRCDIR)) -gb_Helper_set_ld_path := PATH="$${PATH}:$(OUTDIR)/bin" +gb_Helper_set_ld_path := PATH="$${PATH}:$(shell cygpath -u $(OUTDIR)/bin)" # Convert path to file URL. define gb_Helper_make_url @@ -331,13 +330,13 @@ $(call gb_Helper_abbreviate_dirs_native,\ mkdir -p $(dir $(1)) && \ rm -f $(1) && \ RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),100, \ - $(call gb_Helper_native_path,$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ + $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ $(foreach object,$(GENCOBJECTS),$(call gb_GenCObject_get_target,$(object))) \ $(foreach object,$(ASMOBJECTS),$(call gb_AsmObject_get_target,$(object))) \ $(foreach extraobjectlist,$(EXTRAOBJECTLISTS),$(shell cat $(extraobjectlist))) \ - $(NATIVERES))) && \ + $(NATIVERES)) && \ $(if $(filter YES,$(LIBRARY_X64)), $(LINK_X64_BINARY), $(gb_LINK)) \ $(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \ $(if $(filter StaticLibrary,$(TARGETTYPE)),$(gb_StaticLibrary_TARGETTYPEFLAGS)) \ @@ -567,9 +566,7 @@ endef gb_CppunitTest_DEFS := -D_DLL # cppunittester.exe is in the cppunit subdirectory of ${OUTDIR}/bin, # thus it won't find its DLLs unless ${OUTDIR}/bin is added to PATH. -# PATH is the Cygwin one while ${OUTDIR} is a Win32 pathname, thus -# cygpath -u. -gb_CppunitTest_CPPTESTPRECOMMAND := PATH="`cygpath -u $(OUTDIR)`/bin:$${PATH}" +gb_CppunitTest_CPPTESTPRECOMMAND := $(gb_Helper_set_ld_path) gb_CppunitTest_SYSPRE := itest_ gb_CppunitTest_EXT := .lib @@ -697,6 +694,6 @@ gb_WinResTarget__command_dep = endif # Python -gb_PYTHON_PRECOMMAND := PATH="$${PATH}:$(shell cygpath -m $(OUTDIR_FOR_BUILD)/bin)" PYTHONHOME="$(shell cygpath -m $(OUTDIR_FOR_BUILD))/lib/python" PYTHONPATH="$(shell cygpath -m $(OUTDIR_FOR_BUILD))/lib/python;$(shell cygpath -m $(OUTDIR_FOR_BUILD))/lib/python/lib-dynload" +gb_PYTHON_PRECOMMAND := $(gb_Helper_set_ld_path) PYTHONHOME="$(OUTDIR_FOR_BUILD)/lib/python" PYTHONPATH="$(OUTDIR_FOR_BUILD)/lib/python;$(OUTDIR_FOR_BUILD)/lib/python/lib-dynload" # vim: set noet sw=4: diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 6c2a4951e994..60ae0c355f31 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -160,6 +160,5 @@ endef gb_Helper_OUTDIRLIBDIR := $(OUTDIR)/lib gb_Helper_OUTDIR_FOR_BUILDLIBDIR := $(OUTDIR_FOR_BUILD)/lib -gb_Helper_SRCDIR_NATIVE := $(SRCDIR) gb_Helper_get_rcfile = $(1)rc |