[Libreoffice-commits] .: 3 commits - rsc/Executable_rsc.mk rsc/Package_yacc.mk solenv/gbuild
David Tardon
dtardon at kemper.freedesktop.org
Sun Aug 21 23:49:53 PDT 2011
rsc/Executable_rsc.mk | 9 ++----
rsc/Package_yacc.mk | 36 -------------------------
solenv/gbuild/Library.mk | 2 +
solenv/gbuild/LinkTarget.mk | 56 ++++++++++++++++++++++-----------------
solenv/gbuild/TargetLocations.mk | 6 ++--
5 files changed, 42 insertions(+), 67 deletions(-)
New commits:
commit 6206f1c7bcb4f5b78a5ad244072a527d1ed41a4b
Author: David Tardon <dtardon at redhat.com>
Date: Mon Aug 22 08:47:32 2011 +0200
remove unused makefile
diff --git a/rsc/Package_yacc.mk b/rsc/Package_yacc.mk
deleted file mode 100644
index 9a2ad82..0000000
--- a/rsc/Package_yacc.mk
+++ /dev/null
@@ -1,36 +0,0 @@
-# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Initial Developer of the Original Code is
-# Matúš Kukan <matus.kukan at gmail.com>
-# Portions created by the Initial Developer are Copyright (C) 2011 the
-# Initial Developer. All Rights Reserved.
-#
-# Major Contributor(s):
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-$(eval $(call gb_Package_Package,rsc_yacc,$(WORKDIR)/rsc/source/parser))
-$(eval $(call gb_Package_add_customtarget,rsc_yacc,rsc/source/parser,SRCDIR))
-
-$(eval $(call gb_CustomTarget_add_dependencies,rsc/source/parser,\
- rsc/source/parser/rscyacc.y \
-))
-
-# vim: set noet sw=4 ts=4:
commit 492c7a3a0187dfd79fcc3e072a4194b10db9ec87
Author: David Tardon <dtardon at redhat.com>
Date: Mon Aug 22 08:45:29 2011 +0200
add precompiled header
diff --git a/rsc/Executable_rsc.mk b/rsc/Executable_rsc.mk
index 4e8cca4..f5cc2de 100644
--- a/rsc/Executable_rsc.mk
+++ b/rsc/Executable_rsc.mk
@@ -28,6 +28,7 @@
$(eval $(call gb_Executable_Executable,rsc))
+$(eval $(call gb_Executable_add_precompiled_header,rsc,$(SRCDIR)/rsc/inc/pch/precompiled_rsc))
$(eval $(call gb_Executable_set_include,rsc,\
$$(INCLUDE) \
commit d1137471298ba3fe1ac581ac1ddc4aa2c614296b
Author: David Tardon <dtardon at redhat.com>
Date: Mon Aug 22 08:42:36 2011 +0200
overhaul impl. of gb_LinkTarget_add_grammar to simplify usage
diff --git a/rsc/Executable_rsc.mk b/rsc/Executable_rsc.mk
index 71b0cc0..4e8cca4 100644
--- a/rsc/Executable_rsc.mk
+++ b/rsc/Executable_rsc.mk
@@ -33,7 +33,7 @@ $(eval $(call gb_Executable_set_include,rsc,\
$$(INCLUDE) \
-I$(SRCDIR)/rsc/inc \
-I$(SRCDIR)/rsc/inc/pch \
- -I$(WORKDIR)/GenCxxObject/rsc/source/parser \
+ -I$(WORKDIR)/rsc/source/parser \
))
$(eval $(call gb_Executable_add_api,rsc,\
@@ -54,11 +54,7 @@ $(eval $(call gb_Executable_add_linked_libs,rsc,\
))
$(eval $(call gb_Executable_add_grammars,rsc,\
- rsc/source/parser/rscyacc, \
- rsc/source/parser/rscibas \
- rsc/source/parser/rscicpx \
- rsc/source/parser/rscinit \
- rsc/source/parser/rsclex \
+ rsc/source/parser/rscyacc \
))
$(eval $(call gb_Executable_add_exception_objects,rsc,\
diff --git a/solenv/gbuild/Library.mk b/solenv/gbuild/Library.mk
index 022e82a..798af8b 100644
--- a/solenv/gbuild/Library.mk
+++ b/solenv/gbuild/Library.mk
@@ -120,6 +120,8 @@ $(eval $(foreach method,\
add_generated_cobjects \
add_generated_cxxobjects \
add_generated_exception_objects \
+ add_grammar \
+ add_grammars \
add_cflags \
set_cflags \
add_cxxflags \
diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 7e626e3..990f4be 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -224,7 +224,22 @@ endif
gb_GenCxxObject_GenCxxObject =
# YaccObject class
-gb_YaccObject_get_grammar = $(1)/$(2).y
+gb_YaccObject_get_source = $(1)/$(2).y
+
+.PHONY : $(call gb_YaccObject_get_clean_target,%)
+$(call gb_YaccObject_get_clean_target,%) :
+ $(call gb_Output_announce,$(2),$(false),YAC,3)
+ $(call gb_Helper_abbreviate_dirs,\
+ rm -f $(call gb_YaccObject_get_header_target,$*) $(call gb_YaccObject__get_generated_source,$*))
+
+gb_YaccObject__get_generated_source = $(WORKDIR)/$(1).cxx
+
+define gb_YaccObject_YaccObject
+$(call gb_YaccObject_get_target,$(1)) : $(call gb_YaccObject__get_generated_source,$(1)) $(call gb_YaccObject_get_header_target,$(1))
+$(call gb_YaccObject_get_header_target,$(1)) :| $(call gb_YaccObject__get_generated_source,$(1))
+$(call gb_YaccObject__get_generated_source,$(1)) : $(call gb_YaccObject_get_source,$(gb_REPOS),$(1))
+ $$(call gb_YaccObject__command,$(call gb_YaccObject_get_source,$(gb_REPOS),$(1)),$(1),$(call gb_YaccObject__get_generated_source,$(1)),$(call gb_YaccObject_get_header_target,$(1)))
+endef
gb_YACC := bison
@@ -871,28 +886,31 @@ endif
endef
define gb_LinkTarget_yacc_add_cpp_dep
-$(call gb_CxxObject_get_target,$(2)) : $(call gb_YaccObject_get_target_source,$(1))
+$(call gb_CxxObject_get_target,$(2)) : $(call gb_YaccObject_get_target,$(1))
endef
-###
-# Add a bison grammars to the build.
-# gb_LinkTarget_add_grammar(<component>,<grammar file>,<YYFLAGS>,<additional CXXFLAGS>,<list of objects that depend on the generated header>
-#
+# Add a bison grammar to the build.
+# gb_LinkTarget_add_grammar(<component>,<grammar file>)
define gb_LinkTarget_add_grammar
-
+$(call gb_YaccObject_YaccObject,$(2))
+$(call gb_LinkTarget_get_target,$(1)) : $(call gb_YaccObject_get_target,$(2))
+$(call gb_LinkTarget_get_clean_target,$(1)) : $(call gb_YaccObject_get_clean_target,$(2))
$(call gb_LinkTarget_get_target,$(1)) : GENCXXOBJECTS += $(2)
$(call gb_LinkTarget_get_clean_target,$(1)) : GENCXXOBJECTS += $(2)
-$(foreach obj,$(3),
-$(call gb_LinkTarget_yacc_add_cpp_dep,$(2),$(obj)))
+ifeq ($(gb_FULLDEPS),$(true))
+$(call gb_LinkTarget_get_dep_target,$(1)) : GENCXXOBJECTS += $(2)
+$(call gb_LinkTarget_get_dep_target,$(1)) : $(call gb_YaccObject_get_dep_target,$(2))
+endif
+
+$(call gb_LinkTarget__add_internal_headers,$(1),$(gb_YaccObject_get_header_target,$(2)))
-$(call gb_GenCxxObject_get_target,$(2)) : $(call gb_YaccObject_get_target_source,$(2))
- $$(call gb_CxxObject__command,$$@,$(2),$$<,$$(call gb_GenCxxObject_get_dep_target,$(2)))
+endef
-$(call gb_LinkTarget_get_target,$(1)) : $(call gb_GenCxxObject_get_target,$(2))
-$(call gb_GenCxxObject_get_target,$(2)) : $(call gb_YaccObject_get_target_source,$(2)) $(call gb_YaccObject_get_target_include,$(2))
-$(call gb_YaccObject_get_target_source,$(2)) $(call gb_YaccObject_get_target_include,$(2)) : $(call gb_YaccObject_get_grammar,$(gb_REPOS),$(2))
- $$(call gb_YaccObject__command,$(call gb_YaccObject_get_grammar,$(gb_REPOS),$(2)),$(2),$(call gb_YaccObject_get_target_source,$(2)),$(call gb_YaccObject_get_target_include,$(2)))
+# Add bison grammars to the build.
+# gb_LinkTarget_add_grammars(<component>,<grammar file> [<grammar file>*])
+define gb_LinkTarget_add_grammars
+$(foreach grammar,$(2),$(call gb_LinkTarget_add_grammar,$(1),$(grammar)))
endef
define gb_LinkTarget_add_noexception_object
@@ -967,14 +985,6 @@ define gb_LinkTarget_add_generated_exception_objects
$(foreach obj,$(2),$(call gb_LinkTarget_add_generated_exception_object,$(1),$(obj)))
endef
-###
-# Add a bison grammars to the build.
-# gb_LinkTarget_add_grammar(<component>,<list of grammar files>,<list of objects that depend on the generated header>
-#
-define gb_LinkTarget_add_grammars
-$(foreach obj,$(2),$(call gb_LinkTarget_add_grammar,$(1),$(obj),$(3)))
-endef
-
define gb_LinkTarget_set_targettype
$(call gb_LinkTarget_get_target,$(1)) \
$(call gb_LinkTarget_get_dep_target,$(1)) : TARGETTYPE := $(2)
diff --git a/solenv/gbuild/TargetLocations.mk b/solenv/gbuild/TargetLocations.mk
index 196405e..a740cb9 100644
--- a/solenv/gbuild/TargetLocations.mk
+++ b/solenv/gbuild/TargetLocations.mk
@@ -76,8 +76,6 @@ gb_CustomTarget_get_target = $(WORKDIR)/CustomTarget/$(1).done
gb_CustomTarget_get_workdir = $(WORKDIR)/CustomTarget/$(1)
gb_CxxObject_get_target = $(WORKDIR)/CxxObject/$(1).o
gb_GenCxxObject_get_target = $(WORKDIR)/GenCxxObject/$(1).o
-gb_YaccObject_get_target_source = $(WORKDIR)/GenCxxObject/$(1).cxx
-gb_YaccObject_get_target_include = $(WORKDIR)/GenCxxObject/$(1).hxx
gb_Executable_get_external_headers_target = $(WORKDIR)/ExternalHeaders/Executable/$(1)
gb_Executable_get_headers_target = $(WORKDIR)/Headers/Executable/$(1)
gb_Jar_get_target = $(WORKDIR)/Jar/$(1).jar
@@ -119,6 +117,9 @@ gb_UnoApiTarget_get_header_target = $(WORKDIR)/UnoApiHeaders/$(1)
gb_WinResTarget_get_target = $(WORKDIR)/WinResTarget/$(1)$(gb_WinResTarget_POSTFIX)
# workdir targets: $(1) is prefix/path
gb_Configuration_get_target = $(WORKDIR)/Configuration/$(1).done
+gb_YaccObject_get_header_target = $(WORKDIR)/$(1).hxx
+gb_YaccObject_get_dep_target = $(call gb_GenCxxObject_get_dep_target,$(1))
+gb_YaccObject_get_target = $(call gb_GenCxxObject_get_target,$(1))
gb_XcsTarget_get_target = $(WORKDIR)/XcsTarget/$(1)
gb_XcuDataTarget_get_target = $(WORKDIR)/XcuDataTarget/$(1)
gb_XcuLangpackTarget_get_target = $(WORKDIR)/XcuLangpackTarget/$(1)
@@ -165,6 +166,7 @@ $(eval $(call gb_Helper_make_clean_targets,\
CustomTarget \
UnoApiTarget \
WinResTarget \
+ YaccObject \
Zip \
XcsTarget \
XcuDataTarget \
More information about the Libreoffice-commits
mailing list