summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2012-02-24 14:55:20 +0100
committerMatúš Kukan <matus.kukan@gmail.com>2012-02-24 17:06:51 +0100
commitea37d89410d8b1c3d23e7ed76ff2cecd9f44ee56 (patch)
treea3c003ab028868c6ec4cb5d2f98a0711f3b1ff49
parent4ee6123d0547b86eb42f193686eb50e0fd4da872 (diff)
gbuild: get rid of REPODIR
-rw-r--r--solenv/gbuild/BuildDirs.mk2
-rw-r--r--solenv/gbuild/CustomTarget.mk2
-rw-r--r--solenv/gbuild/Deliver.mk8
-rw-r--r--solenv/gbuild/Helper.mk5
-rw-r--r--solenv/gbuild/platform/WNT_INTEL_GCC.mk9
-rw-r--r--solenv/gbuild/platform/WNT_INTEL_MSC.mk6
-rw-r--r--solenv/gbuild/platform/solaris.mk1
-rw-r--r--solenv/gbuild/processdeps.awk5
8 files changed, 8 insertions, 30 deletions
diff --git a/solenv/gbuild/BuildDirs.mk b/solenv/gbuild/BuildDirs.mk
index 5955082d54d7..40057308571d 100644
--- a/solenv/gbuild/BuildDirs.mk
+++ b/solenv/gbuild/BuildDirs.mk
@@ -53,6 +53,4 @@ override OUTDIR_FOR_BUILD := $(shell cygpath -u $(OUTDIR_FOR_BUILD))
override SRCDIR := $(shell cygpath -u $(SRCDIR))
endif
-REPODIR := $(patsubst %/,%,$(dir $(SRCDIR)))
-
# vim: set noet sw=4:
diff --git a/solenv/gbuild/CustomTarget.mk b/solenv/gbuild/CustomTarget.mk
index 2e60e7bc0e25..bcb4874ee197 100644
--- a/solenv/gbuild/CustomTarget.mk
+++ b/solenv/gbuild/CustomTarget.mk
@@ -30,7 +30,7 @@
define gb_CustomTarget__command
+$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(call gb_CustomTarget_get_workdir,$(2)) && \
- O='$(OUTDIR)' R='$(REPODIR)' S='$(SRCDIR)' W='$(WORKDIR)' gb_AWK='$(gb_AWK)' \
+ O='$(OUTDIR)' S='$(SRCDIR)' W='$(WORKDIR)' gb_AWK='$(gb_AWK)' \
gb_XSLTPROC='$(gb_XSLTPROC)' GBUILDDIR='$(GBUILDDIR)' SRCDIR='$(SRCDIR)' \
$(MAKE) -C $(call gb_CustomTarget_get_workdir,$(2)) -f $< && \
touch $(1))
diff --git a/solenv/gbuild/Deliver.mk b/solenv/gbuild/Deliver.mk
index 1387892312c2..33ef1825a288 100644
--- a/solenv/gbuild/Deliver.mk
+++ b/solenv/gbuild/Deliver.mk
@@ -40,7 +40,7 @@ gb_Deliver_DELIVERABLES_INDEX :=
endef
define gb_Deliver_register_deliverable
-gb_Deliver_DELIVERABLES_$(notdir $(3)) += $$(patsubst $(REPODIR)/%,%,$(2)):$$(patsubst $(REPODIR)/%,%,$(1))
+gb_Deliver_DELIVERABLES_$(notdir $(3)) += $(2):$(1)
gb_Deliver_DELIVERABLES_INDEX := $(sort $(gb_Deliver_DELIVERABLES_INDEX) $(notdir $(3)))
$(if $(gb_LOWRESTIME),.LOW_RESOLUTION_TIME : $(1),)
@@ -49,7 +49,7 @@ endef
define gb_Deliver_add_deliverable
$$(if $(3),,$$(error - missing third parameter for deliverable $(1)))
ifeq ($(MAKECMDGOALS),showdeliverables)
-$(call gb_Deliver_register_deliverable,$(OUTDIR)/$(1),$(2),$(3))
+$(call gb_Deliver_register_deliverable,$(1),$(2),$(3))
endif
endef
@@ -71,13 +71,13 @@ $(if $(1),$(call gb_Deliver__deliver,$(1),$(2)),\
endef
define gb_Deliver_print_deliverable
-$(info $(1) $(patsubst $(OUTDIR)/%,%,$(2)))
+$(info $(1) $(2))
endef
showdeliverables :
$(eval MAKEFLAGS := s)
$(foreach deliverable,$(sort $(foreach list,$(gb_Deliver_DELIVERABLES_INDEX),$(gb_Deliver_DELIVERABLES_$(list)))),\
- $(call gb_Deliver_print_deliverable,$(REPODIR)/$(firstword $(subst :, ,$(deliverable))),$(REPODIR)/$(lastword $(subst :, ,$(deliverable)))))
+ $(call gb_Deliver_print_deliverable,$(firstword $(subst :, ,$(deliverable))),$(lastword $(subst :, ,$(deliverable)))))
true
# vim: set noet sw=4:
diff --git a/solenv/gbuild/Helper.mk b/solenv/gbuild/Helper.mk
index 965542418f44..6700ef807077 100644
--- a/solenv/gbuild/Helper.mk
+++ b/solenv/gbuild/Helper.mk
@@ -41,10 +41,9 @@ $(gb_Helper_MISCDUMMY) :
@mkdir -p $(dir $@) && touch $@
define gb_Helper_abbreviate_dirs
-R=$(REPODIR) && \
-$(subst $(REPODIR)/,$$R/,S=$(SRCDIR) && \
+S=$(SRCDIR) && \
$(subst $(SRCDIR)/,$$S/,O=$(OUTDIR)) && \
-$(subst $(SRCDIR)/,$$S/,$(subst $(OUTDIR)/,$$O/,W=$(WORKDIR) && $(subst $(WORKDIR)/,$$W/,$(1)))))
+$(subst $(SRCDIR)/,$$S/,$(subst $(OUTDIR)/,$$O/,W=$(WORKDIR) && $(subst $(WORKDIR)/,$$W/,$(1))))
endef
define gb_Helper_abbreviate_dirs_native
diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
index bf6155bb6698..4f19181f3c1f 100644
--- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
@@ -102,14 +102,6 @@ gb_STDLIBS := \
# Helper class
-# For LibreOffice, MinGW is always cross-compilation, so the "native"
-# platform for the BUILD *is* Unix. No Cygwin/Win32 stuff needed.
-
-gb_Helper_SRCDIR_NATIVE := $(SRCDIR)
-gb_Helper_WORKDIR_NATIVE := $(WORKDIR)
-gb_Helper_OUTDIR_NATIVE := $(OUTDIR)
-gb_Helper_REPODIR_NATIVE := $(REPODIR)
-
# Convert parameters filesystem root to native notation
# does some real work only on Windows, and this file is for
# cross-compilation.
@@ -440,7 +432,6 @@ $(call gb_Helper_abbreviate_dirs,\
-v OUTDIR=$(OUTDIR)/ \
-v WORKDIR=$(WORKDIR)/ \
-v SRCDIR=$(SRCDIR)/ \
- -v REPODIR=$(REPODIR)/ \
> $(call gb_WinResTarget_get_dep_target,$(1)))
endef
else
diff --git a/solenv/gbuild/platform/WNT_INTEL_MSC.mk b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
index 9780361c066b..6402b4234ff1 100644
--- a/solenv/gbuild/platform/WNT_INTEL_MSC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_MSC.mk
@@ -244,7 +244,6 @@ endif
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_REPODIR_NATIVE := $(shell cygpath -m $(REPODIR) | $(gb_AWK) -- '{ print tolower(substr($$0,1,1)) substr($$0,2) }' | sed -e 's,\:/$$,:,')
gb_Helper_set_ld_path := PATH="$${PATH}:$(OUTDIR)/bin"
@@ -253,11 +252,10 @@ gb_Helper_set_ld_path := PATH="$${PATH}:$(OUTDIR)/bin"
# break the dummy implementations on unx*
define gb_Helper_convert_native
$(strip \
-$(subst $(REPODIR),$(gb_Helper_REPODIR_NATIVE), \
$(subst $(SRCDIR),$(gb_Helper_SRCDIR_NATIVE), \
$(subst $(WORKDIR),$(gb_Helper_WORKDIR_NATIVE), \
$(subst $(OUTDIR),$(gb_Helper_OUTDIR_NATIVE), \
-$(1))))))
+$(1)))))
endef
# YaccTarget class
@@ -657,7 +655,6 @@ $(call gb_Helper_abbreviate_dirs_native,\
-v OUTDIR=$(OUTDIR)/ \
-v WORKDIR=$(WORKDIR)/ \
-v SRCDIR=$(SRCDIR)/ \
- -v REPODIR=$(REPODIR)/ \
> $(call gb_SrsPartTarget_get_dep_target,$(1)))
endef
else
@@ -696,7 +693,6 @@ $(call gb_Helper_abbreviate_dirs_native,\
-v OUTDIR=$(OUTDIR)/ \
-v WORKDIR=$(WORKDIR)/ \
-v SRCDIR=$(SRCDIR)/ \
- -v REPODIR=$(REPODIR)/ \
> $(call gb_WinResTarget_get_dep_target,$(1)))
endef
else
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 00021021172f..d56ac2d9634d 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -393,7 +393,6 @@ $(call gb_Helper_abbreviate_dirs,\
-v OUTDIR=$(OUTDIR)/ \
-v WORKDIR=$(WORKDIR)/ \
-v SRCDIR=$(SRCDIR)/ \
- -v REPODIR=$(REPODIR)/ \
> $(call gb_SrsPartTarget_get_dep_target,$(1)))
endef
diff --git a/solenv/gbuild/processdeps.awk b/solenv/gbuild/processdeps.awk
index 9014427fa461..e564b0babd76 100644
--- a/solenv/gbuild/processdeps.awk
+++ b/solenv/gbuild/processdeps.awk
@@ -31,7 +31,6 @@
# -v OUTDIR=outdir \
# -v SRCDIR=srcdir \
# -v WORKDIR=workdir \
-# -v REPODIR=repodir \
# -v OBJECTFILE=objectfile
# called like this the script will read from stdin
# and write to stdout. It will:
@@ -40,7 +39,6 @@
# - replace the string given as WORKDIR with $(WORKDIR)/
# - replace the string given as OUTDIR with $(OUTDIR)/
# - replace the string given as SRCDIR with $(SRCDIR)/
-# - replace the string given as REPODIR with $(REPODIR)/
# - translates absolute mixed windows paths to cygwin paths by
# substituting a path starting with X:... to /cygdrive/X/...
@@ -51,7 +49,6 @@ function mangle_path(path) {
gsub(WORKDIR, "$(WORKDIR)/", path);
gsub(OUTDIR, "$(OUTDIR)/", path);
gsub(SRCDIR, "$(SRCDIR)/", path);
- gsub(REPODIR, "$(REPODIR)/", path);
if( path ~ /^[a-zA-Z]:/ )
path = "/cygdrive/" tolower(substr(path,0,1)) substr(path,3);
return path;
@@ -61,11 +58,9 @@ BEGIN {
WORKDIR = tolower(substr(WORKDIR,0,1)) substr(WORKDIR,2);
OUTDIR = tolower(substr(OUTDIR,0,1)) substr(OUTDIR,2);
SRCDIR = tolower(substr(SRCDIR,0,1)) substr(SRCDIR,2);
- REPODIR = tolower(substr(REPODIR,0,1)) substr(REPODIR,2);
# print "# WORKDIR=" WORKDIR;
# print "# OUTDIR=" OUTDIR;
# print "# SRCDIR=" SRCDIR;
-# print "# REPODIR=" REPODIR;
print mangle_path(OBJECTFILE) ": \\";
}