summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-04-24 16:08:46 +0200
committerMichael Stahl <mstahl@redhat.com>2013-04-24 17:37:46 +0200
commit7019a1c67473623cb81ca0c9e155b90a5ce6947a (patch)
tree8a1db39a43b28aa9673133a2e6bb2a7cd8a91e40 /solenv
parentced9e2abecbbdf70acb3ca46c5e6a6d4247015c0 (diff)
gbuild: get rid of processdeps.awk
The only thing that processdeps.awk does that is actually useful is to be able to set the target name freely, but that is only important for the default resource file which was just renamed. Instead hack makedepend to provide the required functionality directly: - write dummy rules for included files so builds don't break on rename/removal - format deps one per line like concat-deps expects - concat-deps expects standard POSIX line ends, so open in binary mode (also disable that awful backup copying nonsense) Though in retrospect it would perhaps be a better investment of time to try to replace makedepend... Change-Id: I54fafdcdcf1a52692e62b8f1f4b96fb9a93d4421
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/platform/WNT_INTEL_GCC.mk10
-rw-r--r--solenv/gbuild/platform/com_MSC_class.mk20
-rw-r--r--solenv/gbuild/processdeps.awk73
3 files changed, 9 insertions, 94 deletions
diff --git a/solenv/gbuild/platform/WNT_INTEL_GCC.mk b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
index 2acbc6ca0318..8df958f12c2f 100644
--- a/solenv/gbuild/platform/WNT_INTEL_GCC.mk
+++ b/solenv/gbuild/platform/WNT_INTEL_GCC.mk
@@ -362,13 +362,9 @@ $(call gb_Helper_abbreviate_dirs,\
$(INCLUDE) \
$(DEFS) \
$(RCFILE) \
- -f - \
- | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
- -v OBJECTFILE=$(3) \
- -v OUTDIR=$(OUTDIR)/ \
- -v WORKDIR=$(WORKDIR)/ \
- -v SRCDIR=$(SRCDIR)/ \
- > $(1))
+ -o .res \
+ -p $(dir $(3)) \
+ -f $(1))
endef
else
gb_WinResTarget__command_target =
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index 92b8e03a384a..94db603d6c13 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -484,13 +484,9 @@ $(call gb_Helper_abbreviate_dirs,\
$(INCLUDE) \
$(DEFS) \
$(2) \
- -f - \
- | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
- -v OBJECTFILE=$(call gb_SrsPartTarget_get_target,$(1)) \
- -v OUTDIR=$(OUTDIR)/ \
- -v WORKDIR=$(WORKDIR)/ \
- -v SRCDIR=$(SRCDIR)/ \
- > $(call gb_SrsPartTarget_get_dep_target,$(1)))
+ -o .src \
+ -p $(dir $(call gb_SrsPartTarget_get_target,$(1))) \
+ -f $(call gb_SrsPartTarget_get_dep_target,$(1)))
endef
else
gb_SrsPartTarget__command_target =
@@ -532,13 +528,9 @@ $(call gb_Helper_abbreviate_dirs,\
$(INCLUDE) \
$(DEFS) \
$(RCFILE) \
- -f - \
- | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \
- -v OBJECTFILE=$(3) \
- -v OUTDIR=$(OUTDIR)/ \
- -v WORKDIR=$(WORKDIR)/ \
- -v SRCDIR=$(SRCDIR)/ \
- > $(1))
+ -o .res \
+ -p $(dir $(3)) \
+ -f $(1))
endef
else
gb_WinResTarget__command_target =
diff --git a/solenv/gbuild/processdeps.awk b/solenv/gbuild/processdeps.awk
deleted file mode 100644
index e564b0babd76..000000000000
--- a/solenv/gbuild/processdeps.awk
+++ /dev/null
@@ -1,73 +0,0 @@
-#*************************************************************************
-#
-# 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.
-#
-#*************************************************************************
-
-# this awk script mangles makedepend output for a single object file
-# usage:
-# awk -f .../processdeps.awk \
-# -v OUTDIR=outdir \
-# -v SRCDIR=srcdir \
-# -v WORKDIR=workdir \
-# -v OBJECTFILE=objectfile
-# called like this the script will read from stdin
-# and write to stdout. It will:
-# - replace the objectfile with the one given on the commandline
-# - normalize paths to mixed paths (replacing all \ with /)
-# - replace the string given as WORKDIR with $(WORKDIR)/
-# - replace the string given as OUTDIR with $(OUTDIR)/
-# - replace the string given as SRCDIR with $(SRCDIR)/
-# - translates absolute mixed windows paths to cygwin paths by
-# substituting a path starting with X:... to /cygdrive/X/...
-
-function mangle_path(path) {
- gsub("\\\\", "/", path);
- if( path ~ /^[a-zA-Z]:/ )
- path = tolower(substr(path,0,1)) substr(path,2);
- gsub(WORKDIR, "$(WORKDIR)/", path);
- gsub(OUTDIR, "$(OUTDIR)/", path);
- gsub(SRCDIR, "$(SRCDIR)/", path);
- if( path ~ /^[a-zA-Z]:/ )
- path = "/cygdrive/" tolower(substr(path,0,1)) substr(path,3);
- return path;
-}
-
-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);
-# print "# WORKDIR=" WORKDIR;
-# print "# OUTDIR=" OUTDIR;
-# print "# SRCDIR=" SRCDIR;
- print mangle_path(OBJECTFILE) ": \\";
-}
-
-/^[^#]/ {
- print "\t" mangle_path($2) " \\";
-}
-
-END {
- print "\n";
-}