From 3ce453d4c93d43c8ad8367a77ad9b7c134d5b374 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Fri, 3 Aug 2012 16:24:13 +0200 Subject: gbuildize ucpp Change-Id: I1e7eda073906f5b289317d307358a63aca2c24dc --- Makefile.top | 2 +- Repository.mk | 1 + ucpp/CustomTarget_source.mk | 35 +++++++++++++++++++++++++++++ ucpp/Executable_ucpp.mk | 35 +++++++++++++++++++++++++++++ ucpp/Makefile | 7 ++++++ ucpp/Module_ucpp.mk | 17 ++++++++++++++ ucpp/makefile.mk | 44 ------------------------------------ ucpp/prj/build.lst | 2 +- ucpp/prj/d.lst | 4 ---- ucpp/prj/dmake | 0 ucpp/ucpp.patch | 55 ++------------------------------------------- 11 files changed, 99 insertions(+), 103 deletions(-) create mode 100644 ucpp/CustomTarget_source.mk create mode 100644 ucpp/Executable_ucpp.mk create mode 100644 ucpp/Makefile create mode 100644 ucpp/Module_ucpp.mk delete mode 100644 ucpp/makefile.mk delete mode 100644 ucpp/prj/dmake diff --git a/Makefile.top b/Makefile.top index 78806f235ed2..b14f2c47344c 100644 --- a/Makefile.top +++ b/Makefile.top @@ -137,6 +137,7 @@ tubes\ twain\ ucb\ ucbhelper\ +ucpp\ udkapi\ unixODBC\ unodevtools\ @@ -240,7 +241,6 @@ stax\ stlport\ sysui\ tomcat\ -ucpp\ udm\ vigra\ xpdf\ diff --git a/Repository.mk b/Repository.mk index 9b1c8e03ae3c..e012879dc8b3 100644 --- a/Repository.mk +++ b/Repository.mk @@ -59,6 +59,7 @@ $(eval $(call gb_Helper_register_executables,NONE, \ svidl \ transex3 \ typesconfig \ + ucpp \ ulfconv \ ulfex \ xml2cmp \ diff --git a/ucpp/CustomTarget_source.mk b/ucpp/CustomTarget_source.mk new file mode 100644 index 000000000000..3bdc8c4cd987 --- /dev/null +++ b/ucpp/CustomTarget_source.mk @@ -0,0 +1,35 @@ +# -*- 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_CustomTarget_CustomTarget,ucpp/source)) + +$(call gb_CustomTarget_get_target,ucpp/source) : $(call gb_CustomTarget_get_workdir,ucpp/source)/done + +# FIXME: do not hardcode the path here +ifeq ($(OS_FOR_BUILD),WNT) +ucpp_FIXED_TARFILE_LOCATION := $(shell cygpath -u $(TARFILE_LOCATION))/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz +else +ucpp_FIXED_TARFILE_LOCATION := $(TARFILE_LOCATION)/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz +endif + +$(call gb_CustomTarget_get_workdir,ucpp/source)/done : \ + $(ucpp_FIXED_TARFILE_LOCATION) \ + $(SRCDIR)/ucpp/ucpp.patch \ + | $(call gb_CustomTarget_get_workdir,ucpp/source)/.dir + +$(call gb_CustomTarget_get_workdir,ucpp/source)/done : + $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),TAR,1) + $(call gb_Helper_abbreviate_dirs,\ + cd $(dir $@) && \ + $(GNUTAR) -x -z $(STRIP_COMPONENTS)=1 -f $< && \ + $(GNUPATCH) -p0 < $(SRCDIR)/ucpp/ucpp.patch && \ + touch $@ \ + ) + +# vim: set noet sw=4 ts=4: diff --git a/ucpp/Executable_ucpp.mk b/ucpp/Executable_ucpp.mk new file mode 100644 index 000000000000..386020aa7291 --- /dev/null +++ b/ucpp/Executable_ucpp.mk @@ -0,0 +1,35 @@ +# -*- 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_custom_headers,ucpp,\ + ucpp/source \ +)) + +$(eval $(call gb_Executable_add_defs,ucpp,\ + -DNO_UCPP_BUF \ + -DUCPP_CONFIG \ + -DSTAND_ALONE \ +)) + +$(eval $(call gb_Executable_add_generated_cobjects,ucpp,\ + CustomTarget/ucpp/source/assert \ + CustomTarget/ucpp/source/cpp \ + CustomTarget/ucpp/source/eval \ + CustomTarget/ucpp/source/hash \ + CustomTarget/ucpp/source/lexer \ + CustomTarget/ucpp/source/macro \ + CustomTarget/ucpp/source/mem \ + CustomTarget/ucpp/source/nhash \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/ucpp/Makefile b/ucpp/Makefile new file mode 100644 index 000000000000..ccb1c85a04da --- /dev/null +++ b/ucpp/Makefile @@ -0,0 +1,7 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- + +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/ucpp/Module_ucpp.mk b/ucpp/Module_ucpp.mk new file mode 100644 index 000000000000..9829bb2519f7 --- /dev/null +++ b/ucpp/Module_ucpp.mk @@ -0,0 +1,17 @@ +# -*- 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)) + +$(eval $(call gb_Module_add_targets,ucpp,\ + CustomTarget_source \ + Executable_ucpp \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/ucpp/makefile.mk b/ucpp/makefile.mk deleted file mode 100644 index 9de72632bd64..000000000000 --- a/ucpp/makefile.mk +++ /dev/null @@ -1,44 +0,0 @@ -# -# 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/. -# -# This file incorporates work covered by the following license notice: -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed -# with this work for additional information regarding copyright -# ownership. The ASF licenses this file to you under the Apache -# License, Version 2.0 (the "License"); you may not use this file -# except in compliance with the License. You may obtain a copy of -# the License at http://www.apache.org/licenses/LICENSE-2.0 . -# - -PRJ=. - -PRJNAME=ucpp -TARGET=ucpp - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- - -TARFILE_NAME=ucpp-1.3.2 -TARFILE_ROOTDIR=ucpp -TARFILE_MD5=0168229624cfac409e766913506961a8 -PATCH_FILES=ucpp.patch - -ADDITIONAL_FILES=makefile.mk - -BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS) - -# --- Targets ------------------------------------------------------ - -.INCLUDE : set_ext.mk -.INCLUDE : target.mk -.INCLUDE : tg_ext.mk - diff --git a/ucpp/prj/build.lst b/ucpp/prj/build.lst index 4eb6c24addf6..eb7512f963b8 100644 --- a/ucpp/prj/build.lst +++ b/ucpp/prj/build.lst @@ -1,3 +1,3 @@ ucpp ucpp : soltools NULL ucpp ucpp usr1 - all ucpp_mkout NULL -ucpp ucpp nmake - all ucpp_ucpp NULL +ucpp ucpp\prj nmake - all ucpp_ucpp NULL diff --git a/ucpp/prj/d.lst b/ucpp/prj/d.lst index 6b3d28056ab3..e69de29bb2d1 100644 --- a/ucpp/prj/d.lst +++ b/ucpp/prj/d.lst @@ -1,4 +0,0 @@ -..\%__SRC%\bin\ucpp.exe %_DEST%\bin\ucpp.exe -..\%__SRC%\bin\ucpp.pdb %_DEST%\bin\ucpp.pdb - -..\%__SRC%\bin\ucpp %_DEST%\bin\ucpp diff --git a/ucpp/prj/dmake b/ucpp/prj/dmake deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/ucpp/ucpp.patch b/ucpp/ucpp.patch index 169a7e6c4adc..c9c4b92b7f79 100644 --- a/ucpp/ucpp.patch +++ b/ucpp/ucpp.patch @@ -1,56 +1,5 @@ ---- misc/ucpp/makefile.mk -+++ misc/build/ucpp/makefile.mk -@@ -1 +1,47 @@ --dummy -+# -+# 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/. -+# -+# This file incorporates work covered by the following license notice: -+# -+# Licensed to the Apache Software Foundation (ASF) under one or more -+# contributor license agreements. See the NOTICE file distributed -+# with this work for additional information regarding copyright -+# ownership. The ASF licenses this file to you under the Apache -+# License, Version 2.0 (the "License"); you may not use this file -+# except in compliance with the License. You may obtain a copy of -+# the License at http://www.apache.org/licenses/LICENSE-2.0 . -+# -+PRJ=..$/..$/..$/.. -+ -+PRJNAME=ucpp -+TARGET=ucpp -+TARGETTYPE=CUI -+LIBTARGET=NO -+NO_DEFAULT_STL=TRUE -+ -+EXTERNAL_WARNINGS_NOT_ERRORS := TRUE -+ -+# --- Settings ----------------------------------------------------- -+.INCLUDE : settings.mk -+ -+UWINAPILIB= -+LIBSALCPPRT= -+ -+# --- Files -------------------------------------------------------- -+ -+CFLAGS+= -DNO_UCPP_BUF -DUCPP_CONFIG -DSTAND_ALONE -+ -+APP1TARGET= $(TARGET) -+APP1OBJS= $(OBJ)$/assert.obj $(OBJ)$/cpp.obj $(OBJ)$/eval.obj $(OBJ)$/hash.obj $(OBJ)$/lexer.obj $(OBJ)$/macro.obj $(OBJ)$/mem.obj $(OBJ)$/nhash.obj -+ -+APP1STDLIBS= -+ -+ -+OBJFILES = $(APP1OBJS) -+ -+.INCLUDE : target.mk -+ ---- misc/ucpp/cpp.c -+++ misc/build/ucpp/cpp.c +--- cpp.c ++++ cpp.c @@ -2464,7 +2464,7 @@ warning(-1, "unknown option '%s'", argv[i]); } else { -- cgit