2017-09-08 18:22 UTC Viktor Szakats (vszakats users.noreply.github.com)
* bin/commit.hb
* config/detect.mk
* config/detfun.mk
* config/detplat.mk
* config/dir.mk
* config/dirsh.mk
* config/global.mk
* config/globsh.mk
* config/instsh.mk
* config/lang.hb
* config/lang2po.hb
* config/po2lang.hb
* config/postinst.hb
* contrib/hbexpat/tests/tohash.prg
* contrib/hbformat/utils/hbformat.ini
* contrib/hbmisc/hbedit.prg
* contrib/hbmxml/tests/testmxml.prg
* contrib/hbnetio/utils/hbnetio/_console.prg
* contrib/hbnetio/utils/hbnetio/_winsvc.prg
* contrib/hbnetio/utils/hbnetio/hbnetio.prg
* contrib/hbnetio/utils/hbnetio/netiomgm.hb
* contrib/hbwin/tests/ole.prg
* contrib/hbwin/tests/oletst2.js
* contrib/hbwin/tests/oletst2.vbs
* contrib/hbxpp/doc/en/binnumx.txt
* contrib/hbxpp/doc/en/dbcmdx.txt
* contrib/xhb/htmutil.prg
* contrib/xhb/tfile.prg
* contrib/xhb/tframe.prg
* contrib/xhb/thtm.prg
* ChangeLog.txt
* debian/copyright
* doc/class_tp.txt
* doc/hdr_tpl.txt
* doc/xhb-diff.txt
* LICENSE.txt
* package/harbour-wce.spec.in
* package/harbour-win.spec.in
* package/harbour.spec
* package/mpkg_rpm_wce.sh
* package/mpkg_rpm_win.sh
* package/mpkg_rpm.sh
* package/mpkg_src.sh
* package/mpkg_ver.sh
* src/rtl/achoice.prg
* src/rtl/getsys53.prg
* src/rtl/tgetlist.prg
* src/rtl/tlabel.prg
* src/rtl/tmenusys.prg
* tests/hbdoc.prg
* tests/langmsg.prg
* tests/rto_get.prg
* tests/rto_tb.prg
+ doc/en/ati.txt
+ doc/en/dirdrive.txt
+ doc/en/hashfunc.txt
+ doc/en/hbtoken.txt
+ doc/en/left.txt
+ doc/en/proc.txt
+ doc/en/strtran.txt
+ doc/en/transfrm.txt
+ doc/en/typefile.txt
* doc/en/*
* more partial sync with 3.4 fork
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
# ---------------------------------------------------------------
|
||||
# Copyright 2009 Viktor Szakats (vszakats.net/harbour)
|
||||
# See COPYING.txt for licensing terms.
|
||||
#
|
||||
# This make file will detect optional 3rd party components
|
||||
# used in Harbour core code.
|
||||
# See LICENSE.txt for licensing terms.
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
# This makefile will detect optional 3rd party components
|
||||
# used in Harbour core code.
|
||||
|
||||
# config/conf.mk if present, is able to override HB_HAS_* values.
|
||||
|
||||
ifeq ($(DETECT_MK_),)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# ---------------------------------------------------------------
|
||||
# Copyright 2009 Viktor Szakats (vszakats.net/harbour)
|
||||
# See COPYING.txt for licensing terms.
|
||||
#
|
||||
# This make file will detect optional 3rd party components
|
||||
# used in Harbour core code. Generic function.
|
||||
# See LICENSE.txt for licensing terms.
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
# This makefile will detect optional 3rd party components
|
||||
# used in Harbour core code. Generic function.
|
||||
|
||||
# USAGE:
|
||||
# ON CALL:
|
||||
# _DET_DSP_NAME - human readable name of 3rd party component.
|
||||
@@ -32,7 +32,7 @@
|
||||
# - _DET_RES_TEXT with human readable detection result.
|
||||
# - variable name specified in _DET_VAR_HAS_ (typically "HB_HAS_*") will
|
||||
# have any these values:
|
||||
# (empty) - we can't use this component
|
||||
# (empty) - we cannot use this component
|
||||
# <dirlist> - component headers were found at these locations (typically one)
|
||||
# - variable name specified in _DET_VAR_HAS_ + "_LOCAL" (typically "HB_HAS_*_LOCAL") will
|
||||
# be non-empty if we're using the locally hosted version of the package.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# ---------------------------------------------------------------
|
||||
# Copyright 2009 Viktor Szakats (vszakats.net/harbour)
|
||||
# See COPYING.txt for licensing terms.
|
||||
# See LICENSE.txt for licensing terms.
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
ifneq ($(findstring MINGW,$(_DETPLAT_STR)),)
|
||||
|
||||
@@ -20,7 +20,7 @@ ifeq ($(JOB_SRV),NO)
|
||||
|
||||
else
|
||||
|
||||
# NOTE: The empty line directly before 'endef' HAVE TO exist!
|
||||
# NOTE: The empty line directly before 'endef' HAS TO exist!
|
||||
# It causes that every command will be separated by LF
|
||||
define dir_mk
|
||||
@$(MK) $(MKFLAGS) -C $(dir) $@
|
||||
|
||||
@@ -26,7 +26,7 @@ endif
|
||||
|
||||
ifeq ($(HB_SHELL),dos)
|
||||
|
||||
# NOTE: The empty line directly before 'endef' HAVE TO exist!
|
||||
# NOTE: The empty line directly before 'endef' HAS TO exist!
|
||||
# It causes that every command will be separated by LF
|
||||
define dir_mk
|
||||
@$(MK_OS) $(MKFLAGS) -C $(file) $@
|
||||
|
||||
@@ -3,22 +3,20 @@
|
||||
# See LICENSE.txt for licensing terms.
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# GNU make docs:
|
||||
# https://www.gnu.org/software/make/manual/make.html
|
||||
# http://www.wanderinghorse.net/computing/make/
|
||||
# http://www.jgc.org/feeds/topic-gnumake.xml
|
||||
# http://lists.gnu.org/archive/html/help-make/
|
||||
# http://make.paulandlesley.org/
|
||||
# http://wanderinghorse.net/computing/make/
|
||||
# https://blog.jgc.org/2013/02/updated-list-of-my-gnu-make-articles.html
|
||||
# https://lists.gnu.org/archive/html/help-make/
|
||||
# http://make.mad-scientist.net/
|
||||
# Portable shell programming:
|
||||
# https://www.gnu.org/software/autoconf/manual/html_node/Portable-Shell.html
|
||||
# https://www.gnu.org/software/bash/manual/bashref.html
|
||||
# http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
|
||||
# https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html
|
||||
# GNU coding standards:
|
||||
# https://www.gnu.org/prep/standards/standards.html
|
||||
# GNU Make NEWS:
|
||||
# http://cvs.savannah.gnu.org/viewvc/make/NEWS?root=make&view=markup
|
||||
# ---------------------------------------------------------------
|
||||
# https://git.savannah.gnu.org/cgit/make.git/tree/NEWS
|
||||
|
||||
# NOTE: $(realpath/abspath) need GNU Make 3.81 or upper
|
||||
# NOTE: $(eval) needs GNU Make 3.80 or upper
|
||||
@@ -43,7 +41,7 @@ endif
|
||||
# Arbitrary pattern which we do not expect to occur in real-world path names
|
||||
substpat := !@!@
|
||||
|
||||
# This is not strictly necessary, but it does signficantly reduce
|
||||
# This is not strictly necessary, but it does significantly reduce
|
||||
# the number of rules that make has to evaluate otherwise, which may give
|
||||
# a performance boost on a slow system.
|
||||
.SUFFIXES:
|
||||
@@ -326,7 +324,7 @@ else
|
||||
endif
|
||||
|
||||
# NOTE: This can be need if we want to run some internal command which are
|
||||
# missing from GNU Make's internal autodetection list. Like 'move' on
|
||||
# missing from GNU Make's internal auto-detection list. Like 'move' on
|
||||
# non-*nix shells. [vszakats]
|
||||
CMDPREF :=
|
||||
ifneq ($(HB_SHELL),sh)
|
||||
@@ -517,13 +515,13 @@ ifeq ($(HB_PLATFORM),)
|
||||
endif
|
||||
endif
|
||||
ifneq ($(HB_PLATFORM),)
|
||||
HB_PLAT_AUTO := (autodetected)
|
||||
HB_PLAT_AUTO := (auto-detected)
|
||||
endif
|
||||
endif
|
||||
|
||||
HB_COMPILER_ORI := $(HB_COMPILER)
|
||||
|
||||
# enable CC autodetection in *nix cross builds
|
||||
# enable CC auto-detection in *nix cross builds
|
||||
HB_CC_DET :=
|
||||
ifneq ($(HB_HOST_PLAT),$(HB_PLATFORM))
|
||||
ifeq ($(filter $(HB_HOST_PLAT),win dos os2),)
|
||||
@@ -983,7 +981,7 @@ ifeq ($(HB_COMPILER),)
|
||||
endif
|
||||
endif
|
||||
|
||||
# autodetect watcom platform by looking at the header path config
|
||||
# auto-detect watcom platform by looking at the header path config
|
||||
ifeq ($(HB_COMPILER),watcom)
|
||||
ifneq ($(call find_in_path_prw,os2.h,$(INCLUDE)),)
|
||||
HB_PLATFORM := os2
|
||||
@@ -999,7 +997,7 @@ ifeq ($(HB_COMPILER),)
|
||||
endif
|
||||
endif
|
||||
|
||||
# autodetect CC values for given platform/compiler
|
||||
# auto-detect CC values for given platform/compiler
|
||||
ifneq ($(HB_CC_DET),)
|
||||
ifeq ($(HB_PLATFORM)-$(HB_COMPILER),win-mingw)
|
||||
|
||||
@@ -1265,7 +1263,7 @@ endif
|
||||
ifeq ($(HB_COMPILER_ORI),)
|
||||
ifneq ($(HB_COMPILER),)
|
||||
HB_COMP_PATH := $(subst $(substpat), ,$(dir $(firstword $(subst $(subst x, ,x),$(substpat),$(HB_COMP_PATH)))))
|
||||
HB_COMP_AUTO := (autodetected$(if $(HB_COMP_PATH),: $(HB_COMP_PATH),)$(if $(HB_CCPREFIX), [$(HB_CCPREFIX)*],)$(if $(HB_CCSUFFIX), [*$(HB_CCSUFFIX)],))
|
||||
HB_COMP_AUTO := (auto-detected$(if $(HB_COMP_PATH),: $(HB_COMP_PATH),)$(if $(HB_CCPREFIX), [$(HB_CCPREFIX)*],)$(if $(HB_CCSUFFIX), [*$(HB_CCSUFFIX)],))
|
||||
HB_COMP_VERD := $(if $(HB_COMPILER_VER), (v$(HB_COMPILER_VER)),)
|
||||
endif
|
||||
endif
|
||||
@@ -1274,10 +1272,10 @@ export HB_CCPREFIX
|
||||
export HB_CCSUFFIX
|
||||
|
||||
ifeq ($(HB_PLATFORM),)
|
||||
$(error ! HB_PLATFORM not set, could not autodetect)
|
||||
$(error ! HB_PLATFORM not set, could not auto-detect)
|
||||
endif
|
||||
ifeq ($(HB_COMPILER),)
|
||||
$(error ! HB_COMPILER not set, could not autodetect)
|
||||
$(error ! HB_COMPILER not set, could not auto-detect)
|
||||
endif
|
||||
|
||||
export HB_PLATFORM
|
||||
@@ -1289,7 +1287,7 @@ ifneq ($(HB_COMP_PATH),)
|
||||
export HB_COMP_PATH_PUB := $(HB_COMP_PATH)
|
||||
endif
|
||||
|
||||
# Always autodetect bcc location (hack)
|
||||
# Always auto-detect bcc location (hack)
|
||||
ifeq ($(HB_COMP_PATH_PUB),)
|
||||
ifeq ($(HB_PLATFORM)-$(HB_COMPILER),win-bcc)
|
||||
HB_COMP_PATH := $(call find_in_path_raw,bcc32.exe)
|
||||
@@ -1415,10 +1413,10 @@ ifeq ($(HB_INIT_DONE),)
|
||||
ifeq ($(HB_COMPILER),djgpp)
|
||||
# NOTE: We do need DJGPP build of GNU Make on Windows
|
||||
# systems. The reason is that this uses special
|
||||
# trick to pass command lines to other DJGPP tools
|
||||
# (like gcc) to overcome 126 chars MS-DOS command
|
||||
# trick to pass command-lines to other DJGPP tools
|
||||
# (f.e. to gcc) to overcome 126 chars MS-DOS command
|
||||
# line length limitation. IOW: mingw32-make.exe
|
||||
# wo not work with DJGPP on Windows hosts.
|
||||
# will not work with DJGPP on Windows hosts.
|
||||
# [vszakats]
|
||||
ifeq ($(HB_HOST_PLAT),win)
|
||||
ifneq ($(HB_MAKE_PLAT),dos)
|
||||
@@ -1507,7 +1505,7 @@ ifneq ($(HB_HOST_PLAT)$(HB_HOST_CPU),$(HB_PLATFORM)$(HB_CPU))
|
||||
# 'Windows host, Cygwin target'
|
||||
ifneq ($(HB_HOST_PLAT)-$(HB_PLATFORM),win-cygwin)
|
||||
HB_CROSS_BUILD := yes
|
||||
# Try to autosetup
|
||||
# Try to auto-setup
|
||||
ifneq ($(HB_SRC_ROOTPATH),)
|
||||
_HB_ROOT_BIN := $(HB_SRC_ROOTPATH)
|
||||
else
|
||||
@@ -1698,10 +1696,11 @@ ifeq ($(HB_BUILD_PKG),yes)
|
||||
endif
|
||||
endif
|
||||
|
||||
# HB_TOP - dir where packages will be created (root of Harbour source tree)
|
||||
# HB_TOP - dir where release packages will be
|
||||
# created (root of Harbour source tree)
|
||||
# HB_INSTALL_PKG_ROOT - dir which has to be packed
|
||||
# HB_PKGNAME - name of the install package
|
||||
# HB_INSTALL_PREFIX - dir where Harbour dirs will be created
|
||||
# HB_PKGNAME - name of the release package
|
||||
# HB_INSTALL_PREFIX - dir where Harbour subdirectories will be created
|
||||
#
|
||||
# <HB_TOP><plat/comp ><HB_BUILD_PKG_PREFIX>
|
||||
# <HB_INSTALL_PKG_ROOT>
|
||||
@@ -1763,7 +1762,7 @@ else
|
||||
else
|
||||
HB_INSTALL_PREFIX := /usr/local
|
||||
endif
|
||||
# Add postfix for cross builds
|
||||
# Add suffix for cross builds
|
||||
ifneq ($(HB_HOST_PLAT),$(HB_PLATFORM))
|
||||
HB_INSTALL_PREFIX := $(HB_INSTALL_PREFIX)/harbour-$(HB_PLATFORM)-$(HB_COMPILER)
|
||||
endif
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
# ---------------------------------------------------------------
|
||||
# Copyright 2009 Viktor Szakats (vszakats.net/harbour) (rework)
|
||||
# See COPYING.txt for licensing terms.
|
||||
# See LICENSE.txt for licensing terms.
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
# ---------------------------------------------------------------
|
||||
# See batch docs here:
|
||||
# http://www.computerhope.com/batch.htm
|
||||
# https://www.computerhope.com/batch.htm
|
||||
# http://www.robvanderwoude.com/batchcommands.php
|
||||
# ---------------------------------------------------------------
|
||||
|
||||
ifneq ($(HB_SHELL),sh)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ INSTALL_DIR := $(strip $(INSTALL_DIR))
|
||||
ifneq ($(INSTALL_FILES),) # Empty install list
|
||||
|
||||
ifeq ($(INSTALL_DIR),) # Empty install dir
|
||||
INSTALL_RULE := @$(ECHO) $(ECHOQUOTE)! Can't install, install dir isn't set$(ECHOQUOTE)
|
||||
INSTALL_RULE := @$(ECHO) $(ECHOQUOTE)! Cannot install, install dir is not set$(ECHOQUOTE)
|
||||
else
|
||||
|
||||
_SAME_DIR :=
|
||||
@@ -40,7 +40,7 @@ ifeq ($(HB_SHELL),sh)
|
||||
@$(MDP) $(INSTALL_DIR_OS); \
|
||||
if [ ! -d "$(INSTALL_DIR_OS)" ]; \
|
||||
then \
|
||||
$(ECHO) "! Can't install, path not found: '$(INSTALL_DIR_OS)'" 1>&2; \
|
||||
$(ECHO) "! Cannot install, path not found: '$(INSTALL_DIR_OS)'" 1>&2; \
|
||||
$(FALSE); \
|
||||
else \
|
||||
for i in $(INSTALL_FILES); \
|
||||
@@ -51,7 +51,7 @@ ifeq ($(HB_SHELL),sh)
|
||||
$(CP) $$i $(INSTALL_DIR_OS); \
|
||||
true; \
|
||||
else \
|
||||
$(ECHO) "! Can't install $$i, not found" 1>&2; \
|
||||
$(ECHO) "! Cannot install $$i, not found" 1>&2; \
|
||||
fi \
|
||||
done \
|
||||
fi
|
||||
@@ -76,7 +76,7 @@ ifeq ($(HB_SHELL),os2)
|
||||
$(foreach file,$(INSTALL_FILES_OS),$(inst_file))
|
||||
endef
|
||||
|
||||
# NOTE: The empty line directly before 'endef' HAVE TO exist!
|
||||
# NOTE: The empty line directly before 'endef' HAS TO exist!
|
||||
# It causes that every command will be separated by LF
|
||||
define inst_file
|
||||
-@$(CP) $(file) $(INSTALL_DIR_OS)
|
||||
@@ -94,7 +94,7 @@ ifeq ($(HB_SHELL),dos)
|
||||
$(foreach file,$(INSTALL_FILES_OS),$(inst_file))
|
||||
endef
|
||||
|
||||
# NOTE: The empty line directly before 'endef' HAVE TO exist!
|
||||
# NOTE: The empty line directly before 'endef' HAS TO exist!
|
||||
# It causes that every command will be separated by LF
|
||||
define inst_file
|
||||
-@$(CP) $(file) $(INSTALL_DIR_OS)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env hbmk2
|
||||
/*
|
||||
* Manage translations and automatic doc generation
|
||||
*
|
||||
@@ -14,18 +15,17 @@
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
|
||||
* their web site at https://www.gnu.org/).
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* (or visit their website at https://www.gnu.org/licenses/).
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Requires:
|
||||
/* Requires:
|
||||
* - curl (built with SSL)
|
||||
* - hbmk2 and hbi18n in PATH
|
||||
* - the target .prg be runnable as script (for doc_make only)
|
||||
* Reference: http://help.transifex.com/features/api/api-v2.1.html
|
||||
* Reference: https://docs.transifex.com/api/introduction
|
||||
*/
|
||||
|
||||
#pragma -w3
|
||||
@@ -54,12 +54,12 @@ PROCEDURE Main( cCommand, cMain, ... )
|
||||
iif( Empty( hb_FNameName( cMain := hb_DirSepToOS( cMain ) ) ), cMain + hb_FNameName( hb_DirSepDel( cMain ) ) + ".prg", cMain ), ;
|
||||
... )
|
||||
ELSE
|
||||
? "unknown command or missing target"
|
||||
? "unrecognized command or missing target"
|
||||
ENDIF
|
||||
|
||||
RETURN
|
||||
|
||||
/* --------------------------------------------- */
|
||||
/* --- */
|
||||
|
||||
STATIC PROCEDURE doc_make( cMain )
|
||||
|
||||
@@ -101,7 +101,7 @@ STATIC PROCEDURE doc_make( cMain )
|
||||
STATIC FUNCTION FToNativeEOL( cFile )
|
||||
RETURN hb_MemoWrit( cFile, StrTran( hb_MemoRead( cFile ), e"\n", hb_eol() ) )
|
||||
|
||||
/* --------------------------------------------- */
|
||||
/* --- */
|
||||
|
||||
STATIC PROCEDURE src_push( cMain )
|
||||
|
||||
@@ -133,7 +133,7 @@ STATIC PROCEDURE src_push( cMain )
|
||||
#endif
|
||||
ELSE
|
||||
cContent := hb_StrFormat( ;
|
||||
'#, c-format' + hb_eol() + ;
|
||||
"#, c-format" + hb_eol() + ;
|
||||
'msgid ""' + hb_eol() + ;
|
||||
'msgstr ""' + hb_eol() + ;
|
||||
'"Project-Id-Version: %1$s\n"' + hb_eol() + ;
|
||||
@@ -183,7 +183,7 @@ STATIC FUNCTION POT_Sort( cFileName )
|
||||
|
||||
RETURN .F.
|
||||
|
||||
/* --------------------------------------------- */
|
||||
/* --- */
|
||||
|
||||
STATIC PROCEDURE trs_pull( cMain )
|
||||
|
||||
@@ -344,7 +344,7 @@ STATIC FUNCTION StrUnspace( cString )
|
||||
|
||||
cChar := SubStr( cString, tmp, 1 )
|
||||
|
||||
IF !( cChar == " " ) .OR. !( cCharPrev == " " )
|
||||
IF ! cChar == " " .OR. ! cCharPrev == " "
|
||||
cResult += cChar
|
||||
ENDIF
|
||||
|
||||
@@ -367,7 +367,7 @@ STATIC FUNCTION PO_Clean( cFNSource, cFNTarget, ... )
|
||||
|
||||
RETURN .F.
|
||||
|
||||
/* --------------------------------------------- */
|
||||
/* --- */
|
||||
|
||||
STATIC PROCEDURE trs_push( cMain )
|
||||
|
||||
@@ -420,7 +420,7 @@ STATIC PROCEDURE trs_push( cMain )
|
||||
|
||||
RETURN
|
||||
|
||||
/* --------------------------------------------- */
|
||||
/* --- */
|
||||
|
||||
STATIC FUNCTION GetJSON( cString )
|
||||
|
||||
@@ -519,7 +519,7 @@ STATIC FUNCTION LoadPar( cMain )
|
||||
|
||||
RETURN hPar
|
||||
|
||||
/* --------------------------------------------- */
|
||||
/* --- */
|
||||
|
||||
#include "lang2po.hb"
|
||||
#include "po2lang.hb"
|
||||
|
||||
@@ -1,7 +1,24 @@
|
||||
#!/usr/bin/env hbmk2
|
||||
|
||||
/*
|
||||
* Converts core lang modules to standard .po files
|
||||
*
|
||||
* Copyright 2013 Viktor Szakats (vszakats.net/harbour)
|
||||
* Copyright 2013-2017 Viktor Szakats (vszakats.net/harbour)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* (or visit their website at https://www.gnu.org/licenses/).
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -116,7 +133,7 @@ STATIC FUNCTION ISO_TimeStamp()
|
||||
LOCAL nOffset := hb_UTCOffset()
|
||||
|
||||
RETURN hb_StrFormat( "%1$s%2$s%3$02d%4$02d", ;
|
||||
hb_TToC( hb_DateTime(), "YYYY-MM-DD", "HH:MM" ), ;
|
||||
hb_TToC( hb_DateTime(), "yyyy-mm-dd", "hh:mm" ), ;
|
||||
iif( nOffset < 0, "-", "+" ), ;
|
||||
Int( Abs( nOffset ) / 3600 ), ;
|
||||
Int( Abs( nOffset ) % 3600 / 60 ) )
|
||||
@@ -159,7 +176,7 @@ STATIC FUNCTION ConvToC_2( cStr )
|
||||
STATIC FUNCTION Comment( nPos )
|
||||
|
||||
SWITCH nPos
|
||||
CASE 22 ; RETURN "Colums must be aligned to positions: 1, 19, 32, 48"
|
||||
CASE 22 ; RETURN "Columns must be aligned to character positions: 1, 19, 32, 48"
|
||||
CASE 25
|
||||
CASE 26
|
||||
CASE 27 ; RETURN "Keep the '*' decorations and internal space padding intact."
|
||||
|
||||
@@ -1,8 +1,25 @@
|
||||
#!/usr/bin/env hbmk2
|
||||
|
||||
/*
|
||||
* Converts .po files to core lang modules
|
||||
*
|
||||
* Copyright 2013 Viktor Szakats (vszakats.net/harbour)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* (or visit their website at https://www.gnu.org/licenses/).
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma -w3
|
||||
@@ -35,7 +52,7 @@ STATIC FUNCTION POToLang( cFileIn, cFileOut, cLang )
|
||||
__i18n_potArrayClean( aTrans,,, {| cTrs, cOri | ProcessTrs( @cContent, cTrs, cOri, @cTranslator, @nPos, cLang ) } )
|
||||
|
||||
cContent := "/* Last Translator: " + MaskEMail( cTranslator ) + " */" + hb_eol() + ;
|
||||
Left( cContent, Len( cContent ) - Len( "," ) - Len( hb_eol() ) ) + hb_eol() + ;
|
||||
hb_StrShrink( cContent, Len( "," ) + Len( hb_eol() ) ) + hb_eol() + ;
|
||||
StrTran( StrTran( _end(), e"\n", hb_eol() ), "{LNG}", Upper( cLang ) )
|
||||
|
||||
hb_MemoWrit( cFileOut, cContent )
|
||||
@@ -48,14 +65,12 @@ STATIC FUNCTION POToLang( cFileIn, cFileOut, cLang )
|
||||
RETURN .F.
|
||||
|
||||
STATIC FUNCTION MaskEMail( cEMail )
|
||||
RETURN hb_StrReplace( cEMail, { ;
|
||||
"@" => " " , ;
|
||||
"<" => "(" , ;
|
||||
">" => ")" } )
|
||||
|
||||
cEMail := StrTran( cEMail, "@", " " )
|
||||
cEMail := StrTran( cEMail, "<", "(" )
|
||||
cEMail := StrTran( cEMail, ">", ")" )
|
||||
|
||||
RETURN cEMail
|
||||
|
||||
STATIC FUNCTION ProcessTrs( /* @ */ cContent, cTrs, cOri, /* @ */ cTranslator, /* @ */ nPos, cLang )
|
||||
STATIC PROCEDURE ProcessTrs( /* @ */ cContent, cTrs, cOri, /* @ */ cTranslator, /* @ */ nPos, cLang )
|
||||
|
||||
STATIC sc_hEmpty := { ;
|
||||
3 => { "", "UTF8", "" }, ;
|
||||
@@ -78,32 +93,32 @@ STATIC FUNCTION ProcessTrs( /* @ */ cContent, cTrs, cOri, /* @ */ cTranslator, /
|
||||
ENDSWITCH
|
||||
|
||||
IF tmp != NIL
|
||||
cContent += iif( nPos > 0, hb_eol(), "" ) + Space( 6 ) + tmp + hb_eol() + hb_eol()
|
||||
cContent += iif( nPos > 0, hb_eol(), "" ) + Space( 2 * 3 ) + tmp + hb_eol() + hb_eol()
|
||||
ENDIF
|
||||
|
||||
IF nPos == 0
|
||||
cTranslator := hb_regexAll( "Last-Translator: ([^\n]*)", cTrs,,,,, .T. )[ 1 ][ 2 ]
|
||||
IF cTranslator == "foo bar <foo.bar@foobaz>"
|
||||
IF cTranslator == "foo bar <foo.bar@example.org>"
|
||||
cTranslator := ""
|
||||
ENDIF
|
||||
cContent += Space( 6 ) + ConvToC( cLang ) + "," + hb_eol()
|
||||
cContent += Space( 2 * 3 ) + ConvToC( cLang ) + "," + hb_eol()
|
||||
++nPos
|
||||
ELSE
|
||||
IF Len( cTrs ) == 0
|
||||
IF cTrs == ""
|
||||
cTrs := cOri
|
||||
ENDIF
|
||||
cContent += Space( 6 ) + ConvToC( cTrs ) + "," + hb_eol()
|
||||
cContent += Space( 2 * 3 ) + ConvToC( cTrs ) + "," + hb_eol()
|
||||
++nPos
|
||||
|
||||
IF nPos $ sc_hEmpty
|
||||
FOR tmp := 1 TO Len( sc_hEmpty[ nPos ] )
|
||||
cContent += Space( 6 ) + ConvToC( sc_hEmpty[ nPos ][ tmp ] ) + "," + hb_eol()
|
||||
FOR EACH tmp IN sc_hEmpty[ nPos ]
|
||||
cContent += Space( 2 * 3 ) + ConvToC( tmp ) + "," + hb_eol()
|
||||
NEXT
|
||||
nPos += Len( sc_hEmpty[ nPos ] )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
RETURN NIL
|
||||
RETURN
|
||||
|
||||
STATIC FUNCTION ConvToC( cStr )
|
||||
RETURN '"' + hb_StrReplace( cStr, { '"' => '\"' } ) + '"'
|
||||
|
||||
@@ -1,10 +1,27 @@
|
||||
#!/usr/bin/env hbmk2
|
||||
|
||||
/*
|
||||
* This Harbour script is part of the GNU Make-based build system.
|
||||
* WARNING: Running it separately is not supported.
|
||||
*
|
||||
* Copyright 2009-2010 Viktor Szakats (vszakats.net/harbour)
|
||||
* Copyright 2003 Przemyslaw Czerpak (druzus/at/priv.onet.pl) (embedded autoinstall bash script)
|
||||
* See LICENSE.txt for licensing terms.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
* (or visit their website at https://www.gnu.org/licenses/).
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma -w3
|
||||
@@ -51,7 +68,7 @@ PROCEDURE Main( ... )
|
||||
|
||||
/* Installing some misc files */
|
||||
tmp := GetEnvC( "HB_INSTALL_DOC" )
|
||||
IF !( tmp == "no" )
|
||||
IF ! tmp == "no"
|
||||
IF GetEnvC( "HB_PLATFORM" ) $ "win|wce|os2|dos"
|
||||
tmp := GetEnvC( "HB_INSTALL_PREFIX" )
|
||||
ENDIF
|
||||
@@ -130,7 +147,7 @@ PROCEDURE Main( ... )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
IF !( GetEnvC( "HB_PLATFORM" ) $ "win|wce|os2|dos|cygwin" ) .AND. ;
|
||||
IF ! GetEnvC( "HB_PLATFORM" ) $ "win|wce|os2|dos|cygwin" .AND. ;
|
||||
! Empty( GetEnvC( "HB_INSTALL_DYN" ) ) .AND. ;
|
||||
hb_FileExists( hb_DirSepToOS( GetEnvC( "HB_DYNLIB_DIR" ) ) + hb_ps() + GetEnvC( "HB_DYNLIB_PREF" ) + GetEnvC( "HB_DYNLIB_BASE" ) + GetEnvC( "HB_DYNLIB_POST" ) + GetEnvC( "HB_DYNLIB_EXT" ) + GetEnvC( "HB_DYNLIB_PEXT" ) )
|
||||
|
||||
@@ -193,7 +210,7 @@ PROCEDURE Main( ... )
|
||||
|
||||
/* Creating docs for core */
|
||||
|
||||
IF ! Empty( tmp := GetEnvC( "HB_INSTALL_DOC" ) ) .AND. !( tmp == "no" )
|
||||
IF ! Empty( tmp := GetEnvC( "HB_INSTALL_DOC" ) ) .AND. ! tmp == "no"
|
||||
|
||||
OutStd( "! Compiling core documentation (.hbd)..." + hb_eol() )
|
||||
|
||||
@@ -209,7 +226,7 @@ PROCEDURE Main( ... )
|
||||
mk_hbr( tmp )
|
||||
ENDIF
|
||||
|
||||
/* Creating install packages */
|
||||
/* Creating release packages */
|
||||
|
||||
IF GetEnvC( "HB_BUILD_PKG" ) == "yes" .AND. ;
|
||||
! Empty( GetEnvC( "HB_TOP" ) )
|
||||
@@ -290,7 +307,7 @@ PROCEDURE Main( ... )
|
||||
|
||||
hb_cwd( cOldDir )
|
||||
|
||||
IF !( GetEnvC( "HB_PLATFORM" ) == "dos" )
|
||||
IF ! GetEnvC( "HB_PLATFORM" ) == "dos"
|
||||
|
||||
tmp := GetEnvC( "HB_TOP" ) + hb_ps() + cTar_Name + ".inst.sh"
|
||||
|
||||
@@ -331,10 +348,8 @@ PROCEDURE Main( ... )
|
||||
/* Executing user postinst configuration script */
|
||||
|
||||
IF ! Empty( tmp := GetEnvC( "HB_INSTALL_SCRIPT" ) )
|
||||
|
||||
mk_hb_processRun( tmp )
|
||||
ENDIF
|
||||
|
||||
ELSE
|
||||
/* Regenerating extern headers */
|
||||
|
||||
@@ -504,7 +519,7 @@ STATIC FUNCTION mk_extern_core()
|
||||
IF GetEnvC( "HB_REBUILD_EXTERN" ) == "yes" .AND. ;
|
||||
! Empty( GetEnvC( "HB_DYNLIB_BASE" ) )
|
||||
|
||||
/* TOFIX: Use list of libs instead of dynamic lib */
|
||||
/* FIXME: Use list of libs instead of dynamic lib */
|
||||
IF ( aExtern := __hb_extern_get_list( hb_DirSepToOS( GetEnvC( "HB_DYNLIB_DIR" ) ) + hb_ps() + GetEnvC( "HB_DYNLIB_PREF" ) + GetEnvC( "HB_DYNLIB_BASE" ) + GetEnvC( "HB_DYNLIB_POST" ) + GetEnvC( "HB_DYNLIB_EXT" ) + GetEnvC( "HB_DYNLIB_PEXT" ) ) ) != NIL
|
||||
|
||||
OutStd( "! Generating core extern headers..." + hb_eol() )
|
||||
|
||||
Reference in New Issue
Block a user