Kaydet (Commit) 6c8c0732 authored tarafından Matúš Kukan's avatar Matúš Kukan

gbuild: simplify and unify gb_Helper_*native*

üst d455d725
......@@ -36,6 +36,6 @@ $(ACBI)/WindowsAccessBridgeAdapter.h :| $(ACBI)/.dir \
$(call gb_Jar_get_target,java_uno_accessbridge)
$(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),JVH,1)
cd $(call gb_JavaClassSet_get_classdir,$(call gb_Jar_get_classsetname,java_uno_accessbridge)) && \
javah -classpath . -o $(call gb_Helper_convert_native,$@) org.openoffice.accessibility.WindowsAccessBridgeAdapter
javah -classpath . -o $(call gb_Helper_native_path,$@) org.openoffice.accessibility.WindowsAccessBridgeAdapter
# vim: set ts=4 sw=4 et:
......@@ -54,7 +54,7 @@ $(eval $(call gb_Library_add_exception_objects,so_activex,\
))
$(eval $(call gb_Library_add_ldflags,so_activex,\
/DEF:$(call gb_Helper_convert_native,$(SRCDIR)/extensions/source/activex/so_activex.def) \
/DEF:$(call gb_Helper_native_path,$(SRCDIR)/extensions/source/activex/so_activex.def) \
))
$(eval $(call gb_Library_use_libraries,so_activex,\
......
......@@ -57,7 +57,7 @@ $(eval $(call gb_Library_add_x64_generated_exception_objects,so_activex_x64,\
))
$(eval $(call gb_Library_add_ldflags,so_activex_x64,\
/DEF:$(call gb_Helper_convert_native,$(SRCDIR)/extensions/source/activex/so_activex.def) \
/DEF:$(call gb_Helper_native_path,$(SRCDIR)/extensions/source/activex/so_activex.def) \
))
$(eval $(call gb_Library_use_libraries,so_activex_x64,\
......
......@@ -41,7 +41,7 @@ $(eval $(call gb_WinResTarget_add_file,activex_res,extensions/source/activex/so_
$(eval $(call gb_WinResTarget_set_defs,activex_res,\
$$(DEFS) \
-DSO_ACTIVEX_TLB_DIR=$(subst /,\\,$(subst $(call gb_Helper_convert_native,$(SRCDIR)),../../..,$(call gb_Helper_convert_native,$(WORKDIR)/CustomTarget/extensions/source/activex/idl))) \
-DSO_ACTIVEX_TLB_DIR=$(subst /,\\,$(subst $(call gb_Helper_native_path,$(SRCDIR)),../../..,$(call gb_Helper_native_path,$(WORKDIR)/CustomTarget/extensions/source/activex/idl))) \
))
$(call gb_WinResTarget_get_target,activex_res) : $(WORKDIR)/CustomTarget/extensions/source/activex/idl/so_activex.tlb
......
......@@ -77,8 +77,8 @@ $(call gb_Extension_get_workdir,%)/description.xml : $(gb_Extension_XRMEXTARGET)
mkdir -p $(call gb_Extension_get_workdir,$*) && \
$(gb_Extension_XRMEXCOMMAND) \
-p $(PRJNAME) \
-i $(call gb_Helper_native_path,$(filter %.xml,$^)) \
-o $(call gb_Helper_native_path,$@) \
-i $(filter %.xml,$^) \
-o $@ \
-m $(SDF) \
-l all)
endif
......
......@@ -47,7 +47,7 @@ $(subst $(SRCDIR)/,$$S/,$(subst $(OUTDIR)/,$$O/,W=$(WORKDIR) && $(subst $(WORKDI
endef
define gb_Helper_abbreviate_dirs_native
$(call gb_Helper_convert_native,$(call gb_Helper_abbreviate_dirs,$(1)))
$(call gb_Helper_native_path,$(call gb_Helper_abbreviate_dirs,$(1)))
endef
define gb_Helper_make_clean_target
......
......@@ -42,7 +42,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
mkdir -p $(dir $(1)) && \
$(if $(filter-out $(JARDEPS),$(4)), \
RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),500,\
$(call gb_Helper_convert_native,\
$(call gb_Helper_native_path,\
$(filter-out $(JARDEPS),$(4)))) && \
$(if $(3),$(gb_JavaClassSet_JAVACCOMMAND) \
$(gb_JavaClassSet_JAVACDEBUG) \
......
......@@ -56,7 +56,7 @@ 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_convert_native,$(INCLUDE) \
$(call gb_Helper_native_path,$(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))))) && \
......@@ -95,7 +95,7 @@ $(if $(1),$(foreach type,$(shell $(gb_UnoApiTarget_XML2CMPCOMMAND) -types stdout
endef
define gb_UnoApiTarget__command_impl
RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),500,$(call gb_Helper_convert_native,$(2))) && \
RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),500,$(call gb_Helper_native_path,$(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_convert_native,$(UNOAPI_REFERENCE)) \
-r2 $(call gb_Helper_convert_native,$(1)))
-r1 $(call gb_Helper_native_path,$(UNOAPI_REFERENCE)) \
-r2 $(call gb_Helper_native_path,$(1)))
endef
define gb_UnoApiTarget__check_mode
......@@ -275,7 +275,7 @@ gb_UnoApiHeadersTarget_CPPUMAKERCOMMAND := $(gb_Helper_set_ld_path) SOLARBINDIR=
define gb_UnoApiHeadersTarget__command
RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),100,\
$(call gb_Helper_convert_native,-Gc $(4) -BUCR \
$(call gb_Helper_native_path,-Gc $(4) -BUCR \
-O$(3) $(call gb_UnoApiTarget_get_target,$(2)) $(UNOAPI_DEPS))) && \
$(gb_UnoApiHeadersTarget_CPPUMAKERCOMMAND) @$${RESPONSEFILE} && \
rm -f $${RESPONSEFILE} && \
......
......@@ -59,7 +59,7 @@ $(call gb_WinResTarget_get_target,$(1)) : INCLUDE := $(2)
endef
define gb_WinResTarget_add_file
$(call gb_WinResTarget_get_clean_target,$(1)) : RCFILE=$(gb_Helper_SRCDIR_NATIVE)/$(2).rc
$(call gb_WinResTarget_get_clean_target,$(1)) : RCFILE=$(SRCDIR)/$(strip $(2)).rc
$(call gb_WinResTarget_get_target,$(1)) : RCFILE=$(SRCDIR)/$(strip $(2)).rc
$(call gb_WinResTarget_get_target,$(1)) : $(SRCDIR)/$(strip $(2)).rc
......
......@@ -130,18 +130,6 @@ gb_STDLIBS := \
# Helper class
# Convert parameters filesystem root to native notation
# does some real work only on Windows, and this file is for
# cross-compilation.
define gb_Helper_convert_native
$(1)
endef
# Convert path to native notation
define gb_Helper_native_path
$(1)
endef
# Convert path to file URL.
define gb_Helper_make_url
file://$(strip $(1))
......
......@@ -245,26 +245,12 @@ endif
gb_Helper_OUTDIRLIBDIR := $(OUTDIR)/bin
gb_Helper_OUTDIR_FOR_BUILDLIBDIR := $(OUTDIR_FOR_BUILD)/bin
gb_Helper_SRCDIR_NATIVE := $(shell cygpath -m $(SRCDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
gb_Helper_WORKDIR_NATIVE := $(shell cygpath -m $(WORKDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
gb_Helper_OUTDIR_NATIVE := $(shell cygpath -m $(OUTDIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }')
gb_Helper_set_ld_path := PATH="$${PATH}:$(OUTDIR)/bin"
# convert parameters filesystem root to native notation
# does some real work only on windows, make sure not to
# break the dummy implementations on unx*
define gb_Helper_convert_native
$(strip \
$(subst $(SRCDIR),$(gb_Helper_SRCDIR_NATIVE), \
$(subst $(WORKDIR),$(gb_Helper_WORKDIR_NATIVE), \
$(subst $(OUTDIR),$(gb_Helper_OUTDIR_NATIVE), \
$(1)))))
endef
gb_Helper_SRCDIR_NATIVE := $(shell cygpath -m $(SRCDIR))
# Convert path to native notation
define gb_Helper_native_path
$(shell cygpath -m $(1))
$(subst $(SRCDIR),$(gb_Helper_SRCDIR_NATIVE),$(1))
endef
# Convert path to file URL.
......@@ -355,7 +341,7 @@ $(call gb_Helper_abbreviate_dirs_native,\
mkdir -p $(dir $(1)) && \
rm -f $(1) && \
RESPONSEFILE=$(call var2file,$(shell $(gb_MKTEMP)),100, \
$(call gb_Helper_convert_native,$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
$(call gb_Helper_native_path,$(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))) \
......
......@@ -134,14 +134,6 @@ define gb_Helper_extend_ld_path
$(gb_Helper_set_ld_path)$(foreach dir,$(1),:$(dir))
endef
# convert parameters filesystem root to native notation
# does some real work only on windows, make sure not to
# break the dummy implementations on unx*
define gb_Helper_convert_native
$(1)
endef
# Convert path to native notation
define gb_Helper_native_path
$(1)
......@@ -155,6 +147,4 @@ endef
gb_Helper_OUTDIRLIBDIR := $(OUTDIR)/lib
gb_Helper_OUTDIR_FOR_BUILDLIBDIR := $(OUTDIR_FOR_BUILD)/lib
gb_Helper_abbreviate_dirs_native = $(gb_Helper_abbreviate_dirs)
gb_Helper_get_rcfile = $(1)rc
......@@ -159,11 +159,6 @@ gb_LinkTarget_LDFLAGS += \
endif
# Convert path to native notation
define gb_Helper_native_path
$(1)
endef
# Convert path to file URL.
define gb_Helper_make_url
file://$(strip $(1))
......
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