summaryrefslogtreecommitdiff
path: root/external/ucpp
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2013-11-03 20:41:25 +0200
committerDavid Tardon <dtardon@redhat.com>2013-11-04 02:48:25 -0600
commita06d8eb9a92a438de6677d5e4196da0919aa790d (patch)
treeac9cc01003d0ff75a48b9ff021528999f0bc08dd /external/ucpp
parent79b81a34ccedc0abb6c97f14b28add238c1b3621 (diff)
fdo#70393: move ucpp to a subdir of external
Change-Id: I05419939ca0d6c55d24088d4b4adf3e262e50083 Reviewed-on: https://gerrit.libreoffice.org/6553 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'external/ucpp')
-rw-r--r--external/ucpp/Executable_ucpp.mk39
-rw-r--r--external/ucpp/Makefile14
-rw-r--r--external/ucpp/Module_ucpp.mk20
-rw-r--r--external/ucpp/UnpackedTarball_ucpp.mk20
-rw-r--r--external/ucpp/ucpp.patch11
5 files changed, 104 insertions, 0 deletions
diff --git a/external/ucpp/Executable_ucpp.mk b/external/ucpp/Executable_ucpp.mk
new file mode 100644
index 000000000000..a2e64e644eed
--- /dev/null
+++ b/external/ucpp/Executable_ucpp.mk
@@ -0,0 +1,39 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Executable_Executable,ucpp))
+
+$(eval $(call gb_Executable_set_warnings_not_errors,ucpp))
+
+$(eval $(call gb_Executable_use_unpacked,ucpp,ucpp))
+
+$(eval $(call gb_Executable_add_defs,ucpp,\
+ -DNO_UCPP_BUF \
+ -DUCPP_CONFIG \
+ -DSTAND_ALONE \
+))
+
+# suppress warning spam
+$(eval $(call gb_Executable_add_cflags,ucpp,\
+ -w \
+))
+
+
+$(eval $(call gb_Executable_add_generated_cobjects,ucpp,\
+ UnpackedTarball/ucpp/assert \
+ UnpackedTarball/ucpp/cpp \
+ UnpackedTarball/ucpp/eval \
+ UnpackedTarball/ucpp/hash \
+ UnpackedTarball/ucpp/lexer \
+ UnpackedTarball/ucpp/macro \
+ UnpackedTarball/ucpp/mem \
+ UnpackedTarball/ucpp/nhash \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/ucpp/Makefile b/external/ucpp/Makefile
new file mode 100644
index 000000000000..569ad8a0ba7a
--- /dev/null
+++ b/external/ucpp/Makefile
@@ -0,0 +1,14 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/ucpp/Module_ucpp.mk b/external/ucpp/Module_ucpp.mk
new file mode 100644
index 000000000000..dc4c02f5307b
--- /dev/null
+++ b/external/ucpp/Module_ucpp.mk
@@ -0,0 +1,20 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Module_Module,ucpp))
+
+# if not cross-compiling or we need ucpp for ODK
+ifneq (,$(if $(CROSS_COMPILING),,T)$(filter ODK,$(BUILD_TYPE)))
+$(eval $(call gb_Module_add_targets,ucpp,\
+ Executable_ucpp \
+ UnpackedTarball_ucpp \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/ucpp/UnpackedTarball_ucpp.mk b/external/ucpp/UnpackedTarball_ucpp.mk
new file mode 100644
index 000000000000..04d7113b8513
--- /dev/null
+++ b/external/ucpp/UnpackedTarball_ucpp.mk
@@ -0,0 +1,20 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UnpackedTarball_UnpackedTarball,ucpp))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,ucpp,$(UCPP_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_set_patchlevel,ucpp,0))
+
+$(eval $(call gb_UnpackedTarball_add_patches,ucpp,\
+ external/ucpp/ucpp.patch \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/ucpp/ucpp.patch b/external/ucpp/ucpp.patch
new file mode 100644
index 000000000000..c9c4b92b7f79
--- /dev/null
+++ b/external/ucpp/ucpp.patch
@@ -0,0 +1,11 @@
+--- cpp.c
++++ cpp.c
+@@ -2464,7 +2464,7 @@
+ warning(-1, "unknown option '%s'", argv[i]);
+ } else {
+ if (filename != 0) {
+- error(-1, "spurious filename '%s'", argv[i]);
++ error(-1, "spurious duplicate filename '%s' - vs. '%s' ", argv[i], filename);
+ return 2;
+ }
+ filename = argv[i];