diff options
author | David Tardon <dtardon@redhat.com> | 2012-08-03 16:24:13 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2012-08-03 16:30:27 +0200 |
commit | 3ce453d4c93d43c8ad8367a77ad9b7c134d5b374 (patch) | |
tree | e2bfaacf89cf6cbe8b4b148e52941d99ac3baf2a /ucpp | |
parent | d07e8fe18e470a08926cb43d2280f154277de137 (diff) |
gbuildize ucpp
Change-Id: I1e7eda073906f5b289317d307358a63aca2c24dc
Diffstat (limited to 'ucpp')
-rw-r--r-- | ucpp/CustomTarget_source.mk | 35 | ||||
-rw-r--r-- | ucpp/Executable_ucpp.mk | 35 | ||||
-rw-r--r-- | ucpp/Makefile | 7 | ||||
-rw-r--r-- | ucpp/Module_ucpp.mk | 17 | ||||
-rw-r--r-- | ucpp/makefile.mk | 44 | ||||
-rw-r--r-- | ucpp/prj/build.lst | 2 | ||||
-rw-r--r-- | ucpp/prj/d.lst | 4 | ||||
-rw-r--r-- | ucpp/prj/dmake | 0 | ||||
-rw-r--r-- | ucpp/ucpp.patch | 55 |
9 files changed, 97 insertions, 102 deletions
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 --- a/ucpp/prj/dmake +++ /dev/null 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 { |