summaryrefslogtreecommitdiff
path: root/crashrep
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@verizon.net>2013-01-22 16:07:24 -0500
committerPeter Foley <pefoley2@verizon.net>2013-01-22 21:34:33 -0500
commitdbaa34c5dbc9ff615c6a57056cd2663ede8caede (patch)
treed25b31a3c62e12f5e65c19bd150471e35b061537 /crashrep
parent62bf434229f9f86469dea3123bc6180bd9979c2c (diff)
convert crashrep to gbuild and add to tail_build
Change-Id: I90cf6c2c5fb806855b7e4fec18c890f7bd2ff6b5
Diffstat (limited to 'crashrep')
-rw-r--r--crashrep/CustomTarget_crashrep_res.mk35
-rw-r--r--crashrep/Executable_crashrep.mk65
-rw-r--r--crashrep/Makefile14
-rw-r--r--crashrep/Module_crashrep.mk27
-rw-r--r--crashrep/WinResTarget_crashrep.mk22
-rw-r--r--crashrep/prj/build.lst5
-rw-r--r--crashrep/prj/d.lst3
-rw-r--r--crashrep/prj/dmake0
-rw-r--r--crashrep/source/all/makefile.mk40
-rw-r--r--crashrep/source/unx/main.cxx1
-rw-r--r--crashrep/source/unx/makefile.mk66
-rw-r--r--crashrep/source/win32/base64.cxx (renamed from crashrep/source/win32/base64.cpp)0
-rwxr-xr-xcrashrep/source/win32/crashrep.rc12
-rw-r--r--crashrep/source/win32/crashrep.ulf (renamed from crashrep/source/all/crashrep.ulf)17
-rw-r--r--crashrep/source/win32/makefile.mk79
-rw-r--r--crashrep/source/win32/soreport.cxx (renamed from crashrep/source/win32/soreport.cpp)2
16 files changed, 176 insertions, 212 deletions
diff --git a/crashrep/CustomTarget_crashrep_res.mk b/crashrep/CustomTarget_crashrep_res.mk
new file mode 100644
index 000000000000..e29ecc557620
--- /dev/null
+++ b/crashrep/CustomTarget_crashrep_res.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,crashrep/source/win32))
+
+$(eval $(call gb_CustomTarget_register_targets,crashrep/source/win32, \
+ crashrep_impl.rc \
+))
+
+$(call gb_CustomTarget_get_workdir,crashrep/source/win32)/crashrep_impl.rc : \
+ $(SRCDIR)/crashrep/source/win32/rcfooter.txt \
+ $(SRCDIR)/crashrep/source/win32/rcheader.txt \
+ $(SRCDIR)/crashrep/source/win32/rctemplate.txt \
+ $(SRCDIR)/crashrep/source/win32/crashrep.ulf \
+ $(call gb_Executable_get_runtime_dependencies,lngconvex)
+
+#BRAND_BASE_DIR=$(call gb_Helper_make_url,$(OUTDIR)/unittest/install)
+$(call gb_CustomTarget_get_workdir,crashrep/source/win32)/crashrep_impl.rc :
+ $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),LCX,1)
+ $(call gb_Helper_abbreviate_dirs,\
+ cd $(SRCDIR)/crashrep/source/win32 && \
+ $(call gb_Executable_get_command,lngconvex) \
+ -ulf crashrep.ulf \
+ -rc $@ \
+ -rct rctemplate.txt \
+ -rch rcheader.txt \
+ -rcf rcfooter.txt)
+
+# vim: set shiftwidth=4 tabstop=4 noexpandtab:
diff --git a/crashrep/Executable_crashrep.mk b/crashrep/Executable_crashrep.mk
new file mode 100644
index 000000000000..eea1b051d054
--- /dev/null
+++ b/crashrep/Executable_crashrep.mk
@@ -0,0 +1,65 @@
+# -*- 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,crashrep))
+
+$(eval $(call gb_Executable_add_defs,crashrep,\
+ -D_INPATH=\"$(INPATH)\" \
+))
+
+ifeq ($(OS),WNT)
+
+$(eval $(call gb_Executable_add_exception_objects,crashrep,\
+ crashrep/source/win32/soreport \
+ crashrep/source/win32/base64 \
+))
+
+$(eval $(call gb_Executable_use_libraries,crashrep,\
+ sal \
+))
+
+$(eval $(call gb_Executable_use_system_win32_libs,crashrep,\
+ gdi32 \
+ comctl32 \
+ comdlg32 \
+ advapi32 \
+ ws2_32 \
+ shell32 \
+ dbghelp \
+ psapi \
+))
+
+$(eval $(call gb_Executable_set_targettype_gui,crashrep,YES))
+
+$(eval $(call gb_Executable_add_nativeres,crashrep,crashrep))
+
+else
+
+$(eval $(call gb_Executable_add_exception_objects,crashrep,\
+ crashrep/source/unx/main \
+))
+
+ifeq ($(filter FREEBSD NETBSD DRAGONFLY MACOSX,$(OS)),)
+$(eval $(call gb_Executable_add_libs,crashrep,\
+ -ldl \
+ -lnsl \
+))
+endif
+
+ifeq ($(OS),SOLARIS)
+$(eval $(call gb_Executable_add_libs,crashrep,\
+ -lsocket \
+))
+endif
+
+endif
+
+
+
+# vim: set noet sw=4 ts=4:
diff --git a/crashrep/Makefile b/crashrep/Makefile
new file mode 100644
index 000000000000..0997e628485b
--- /dev/null
+++ b/crashrep/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/crashrep/Module_crashrep.mk b/crashrep/Module_crashrep.mk
new file mode 100644
index 000000000000..6b44ea0cc53c
--- /dev/null
+++ b/crashrep/Module_crashrep.mk
@@ -0,0 +1,27 @@
+# -*- 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,crashrep))
+
+ifeq ($(ENABLE_CRASHDUMP),TRUE)
+
+ifeq ($(OS),WNT)
+$(eval $(call gb_Module_add_targets,crashrep,\
+ CustomTarget_crashrep_res \
+ Executable_crashrep \
+ WinResTarget_crashrep \
+))
+else ifneq ($(PRODUCT),)
+$(eval $(call gb_Module_add_targets,crashrep,\
+ Executable_crashrep \
+))
+endif
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/crashrep/WinResTarget_crashrep.mk b/crashrep/WinResTarget_crashrep.mk
new file mode 100644
index 000000000000..6206dc752927
--- /dev/null
+++ b/crashrep/WinResTarget_crashrep.mk
@@ -0,0 +1,22 @@
+# -*- 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_WinResTarget_WinResTarget,crashrep))
+
+$(eval $(call gb_WinResTarget_use_custom_headers,crashrep,\
+ crashrep/source/win32 \
+))
+
+$(eval $(call gb_WinResTarget_add_defs,crashrep,\
+ -DVERVARIANT=$(BUILD) \
+))
+
+$(eval $(call gb_WinResTarget_set_rcfile,crashrep,crashrep/source/win32/crashrep))
+
+# vim: set noet sw=4 ts=4:
diff --git a/crashrep/prj/build.lst b/crashrep/prj/build.lst
index 5d22c2d35083..5707de5df811 100644
--- a/crashrep/prj/build.lst
+++ b/crashrep/prj/build.lst
@@ -1,5 +1,2 @@
cr crashrep : sal sysui shell NULL
-cr crashrep usr1 - all cr_mkout NULL
-cr crashrep\source\all nmake - all cr_sresource NULL
-cr crashrep\source\unx nmake - u cr_sunx NULL
-cr crashrep\source\win32 nmake - n cr_swin32 cr_sresource NULL
+cr crashrep\prj nmake - all cr_crashrep NULL
diff --git a/crashrep/prj/d.lst b/crashrep/prj/d.lst
index 3ca113bb2284..e69de29bb2d1 100644
--- a/crashrep/prj/d.lst
+++ b/crashrep/prj/d.lst
@@ -1,3 +0,0 @@
-..\%__SRC%\bin\soreport.exe %_DEST%\bin\crashrep.exe
-..\%__SRC%\bin\soreport.exe.manifest %_DEST%\bin\crashrep.exe.manifest
-..\%__SRC%\bin\crashrep %_DEST%\bin\crashrep
diff --git a/crashrep/prj/dmake b/crashrep/prj/dmake
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/crashrep/prj/dmake
+++ /dev/null
diff --git a/crashrep/source/all/makefile.mk b/crashrep/source/all/makefile.mk
deleted file mode 100644
index 5b4f08a0063c..000000000000
--- a/crashrep/source/all/makefile.mk
+++ /dev/null
@@ -1,40 +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=crashrep
-TARGET=crash_res
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# ------------------------------------------------------------------
-
-ULFFILES = \
- crashrep.ulf
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-.IF "$(WITH_LANG)"!=""
-ALLTAR : $(foreach,i,$(ULFFILES) $(COMMONMISC)$/$(TARGET)$/$i)
-.ENDIF # "$(WITH_LANG)"!=""
-
diff --git a/crashrep/source/unx/main.cxx b/crashrep/source/unx/main.cxx
index 652593dd42f4..7041f8c35ff3 100644
--- a/crashrep/source/unx/main.cxx
+++ b/crashrep/source/unx/main.cxx
@@ -19,7 +19,6 @@
#include <cstdio>
#include <stdlib.h>
#include <sys/utsname.h>
-#include <_version.h>
#include <errno.h>
#include <string.h>
#include <assert.h>
diff --git a/crashrep/source/unx/makefile.mk b/crashrep/source/unx/makefile.mk
deleted file mode 100644
index 376e45c915b5..000000000000
--- a/crashrep/source/unx/makefile.mk
+++ /dev/null
@@ -1,66 +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=crashrep
-TARGET=crashrep
-TARGETTYPE=CUI
-
-ENABLE_EXCEPTIONS=TRUE
-LIBTARGET=NO
-LIBSALCPPRT=$(0)
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# ------------------------------------------------------------------
-
-# Only build crash reporter if either a product build with debug info
-# or a non-pro build is done.
-
-.IF "$(ENABLE_CRASHDUMP)" != "" || "$(PRODUCT)" == ""
-
-SOLARLIB!:=$(SOLARLIB:s/jre/jnore/)
-
-OBJFILES=\
- $(OBJ)$/main.obj
-
-APP1NOSAL=TRUE
-APP1TARGET=$(TARGET)
-APP1OBJS=$(OBJFILES)
-APP1RPATH=OOO
-
-.IF "$(OS)" != "FREEBSD" && "$(OS)" != "MACOSX" && "$(OS)"!="NETBSD" && \
- "$(OS)" != "DRAGONFLY"
-APP1STDLIBS+=-ldl -lnsl
-.ENDIF
-.IF "$(OS)" == "SOLARIS"
-APP1STDLIBS+=-lsocket
-.ENDIF
-
-.ENDIF # "$(ENABLE_CRASHDUMP)" != "" || "$(PRODUCT)" == ""
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-$(OBJ)$/main.obj: $(INCCOM)$/_version.h
-
-# Building crash_report
diff --git a/crashrep/source/win32/base64.cpp b/crashrep/source/win32/base64.cxx
index a0b8769f6bc5..a0b8769f6bc5 100644
--- a/crashrep/source/win32/base64.cpp
+++ b/crashrep/source/win32/base64.cxx
diff --git a/crashrep/source/win32/crashrep.rc b/crashrep/source/win32/crashrep.rc
new file mode 100755
index 000000000000..250ed92d7e85
--- /dev/null
+++ b/crashrep/source/win32/crashrep.rc
@@ -0,0 +1,12 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * 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/.
+ */
+
+#include "crashrep_impl.rc"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/crashrep/source/all/crashrep.ulf b/crashrep/source/win32/crashrep.ulf
index ae5e93bb651f..12ef7e75c246 100644
--- a/crashrep/source/all/crashrep.ulf
+++ b/crashrep/source/win32/crashrep.ulf
@@ -1,20 +1,3 @@
-/*
- * 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 .
- */
[%WELCOME_CAPTION%]
en-US = "%PRODUCTNAME% %PRODUCTVERSION% Error Report"
diff --git a/crashrep/source/win32/makefile.mk b/crashrep/source/win32/makefile.mk
deleted file mode 100644
index 79e02b970c3a..000000000000
--- a/crashrep/source/win32/makefile.mk
+++ /dev/null
@@ -1,79 +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=crashrep
-TARGET=soreport
-LIBTARGET=NO
-ENABLE_EXCEPTIONS=TRUE
-TARGETTYPE=GUI
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Resources ----------------------------------------------------
-
-RCFILES=$(RES)$/$(TARGET).rc
-
-# --- Files --------------------------------------------------------
-
-OBJFILES=\
- $(OBJ)$/soreport.obj\
- $(OBJ)$/base64.obj
-
-.IF "$(WITH_LANG)"!=""
-ULFDIR:=$(COMMONMISC)$/crash_res
-.ELSE # "$(WITH_LANG)"!=""
-ULFDIR:=..$/all
-.ENDIF # "$(WITH_LANG)"!=""
-LNGFILES=$(ULFDIR)$/crashrep.ulf
-
-APP1OBJS=$(OBJFILES)
-
-APP1NOSAL=TRUE
-
-APP1TARGET=$(TARGET)
-APP1RPATH=OOO
-
-STDLIB1=\
- $(SALLIB)\
- $(GDI32LIB)\
- $(COMCTL32LIB)\
- $(COMDLG32LIB)\
- $(ADVAPI32LIB)\
- $(WS2_32LIB)\
- $(SHELL32LIB)\
- $(DBGHELPLIB)\
- psapi.lib
-
-APP1NOSVRES=$(RES)$/$(TARGET).res
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : target.mk
-
-$(OBJ)$/soreport.obj: $(INCCOM)$/_version.h
-
-# Generate the native Windows resource file
-# using lngconvex.exe
-
-$(RCFILES) : $(LNGFILES) makefile.mk rcfooter.txt rcheader.txt rctemplate.txt ctrylnglist.txt
- $(LNGCONVEX) -ulf $(ULFDIR)$/crashrep.ulf -rc $(RES)$/$(TARGET).rc -rct rctemplate.txt -rch rcheader.txt -rcf rcfooter.txt
-
diff --git a/crashrep/source/win32/soreport.cpp b/crashrep/source/win32/soreport.cxx
index 0721950393c4..fc8886c542eb 100644
--- a/crashrep/source/win32/soreport.cpp
+++ b/crashrep/source/win32/soreport.cxx
@@ -66,8 +66,6 @@
#include <malloc.h>
#include <process.h>
-#include <_version.h>
-
#include "resource.h"
#include "base64.h"