From dc9e6e160451f6850cdba91a26222bca2e0f2846 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sun, 16 May 2010 21:41:13 +0000 Subject: [PATCH] 2010-05-16 23:36 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * debian/rules - doc/man/hbmk.1 + doc/man/hbmk2.1 ! Renamed to hbmk2 to be in sync with name of the tool. * Makefile ! Fixed to always descend into utils directory, because (in 'install' mode) hbrun and hbmk2 needs to be built regardless of HB_BUILD_PARTS setting. * contrib/hbfbird/hbfbird.hbi ! Fixed to set output libname. This is needed because we can't rely on input filename due to mingw trick. * config/global.mk + Show HB_BUILD_IMPLIB setting. Now there is nothing hackish in it, so it can be fully supported setting. * config/postinst.prg % Minor optimizations in hbmk2 invocation lines. (removed unnecessary spaces, using envvar macros, deleted unnecessary double quotes) ! Fixed (in two places) to only invoke hbmk2 if HB_HOST_BIN_DIR envvar is set. ! NSIS invocation command made more friendly to cross platform environment by using native pathsep. + Will now echo the external commands issued to stdout. --- harbour/ChangeLog | 29 ++++++++++++++++ harbour/Makefile | 8 +---- harbour/config/global.mk | 3 ++ harbour/config/postinst.prg | 52 +++++++++++++++++------------ harbour/contrib/hbfbird/hbfbird.hbi | 2 ++ harbour/debian/rules | 2 +- harbour/doc/man/{hbmk.1 => hbmk2.1} | 14 ++++---- 7 files changed, 73 insertions(+), 37 deletions(-) rename harbour/doc/man/{hbmk.1 => hbmk2.1} (91%) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9a33b0bc17..4dde5e2b7e 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,35 @@ past entries belonging to author(s): Viktor Szakats. */ +2010-05-16 23:36 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * debian/rules + - doc/man/hbmk.1 + + doc/man/hbmk2.1 + ! Renamed to hbmk2 to be in sync with name of the tool. + + * Makefile + ! Fixed to always descend into utils directory, + because (in 'install' mode) hbrun and hbmk2 needs + to be built regardless of HB_BUILD_PARTS setting. + + * contrib/hbfbird/hbfbird.hbi + ! Fixed to set output libname. This is needed because + we can't rely on input filename due to mingw trick. + + * config/global.mk + + Show HB_BUILD_IMPLIB setting. Now there is nothing + hackish in it, so it can be fully supported setting. + + * config/postinst.prg + % Minor optimizations in hbmk2 invocation lines. + (removed unnecessary spaces, using envvar macros, + deleted unnecessary double quotes) + ! Fixed (in two places) to only invoke hbmk2 if + HB_HOST_BIN_DIR envvar is set. + ! NSIS invocation command made more friendly to cross + platform environment by using native pathsep. + + Will now echo the external commands issued to stdout. + 2010-05-16 19:01 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/postinst.prg + Added new experimental envvar: diff --git a/harbour/Makefile b/harbour/Makefile index 95bf74aee6..d661eb8e15 100644 --- a/harbour/Makefile +++ b/harbour/Makefile @@ -14,18 +14,12 @@ ifeq ($(HB_BUILD_PARTS),compiler) else - ifeq ($(HB_BUILD_PARTS),lib) - HB_UTIL_DIR := - else - HB_UTIL_DIR := utils{src} - endif - DIRS := \ doc \ include \ external \ src{external} \ - $(HB_UTIL_DIR) \ + utils{src} \ contrib{src} \ endif diff --git a/harbour/config/global.mk b/harbour/config/global.mk index 419a8cf82a..a3b23bb9ea 100644 --- a/harbour/config/global.mk +++ b/harbour/config/global.mk @@ -296,6 +296,9 @@ ifeq ($(HB_INIT_DONE),) ifneq ($(HB_BUILD_DLL),) $(info ! HB_BUILD_DLL: $(HB_BUILD_DLL)) endif + ifneq ($(HB_BUILD_IMPLIB),) + $(info ! HB_BUILD_IMPLIB: $(HB_BUILD_IMPLIB)) + endif ifneq ($(HB_BUILD_SHARED),) $(info ! HB_BUILD_SHARED: $(HB_BUILD_SHARED)) endif diff --git a/harbour/config/postinst.prg b/harbour/config/postinst.prg index 1be575d44b..c74df5c7d4 100644 --- a/harbour/config/postinst.prg +++ b/harbour/config/postinst.prg @@ -78,10 +78,10 @@ PROCEDURE Main() FOR EACH tmp IN PackageList( "contrib\*", GetEnv( "HB_CONTRIBLIBS" ), GetEnv( "HB_CONTRIB_ADDONS" ) ) IF hb_FileExists( "contrib\" + tmp + "\" + tmp + ".hbi" ) - hb_processRun( GetEnv( "HB_HOST_BIN_DIR" ) + _PS_ + "hbmk2" +; - " -quiet -lang=en " +; - " @contrib/" + tmp + "/" + tmp + ".hbi" +; - " -o${HB_LIB_INSTALL}/" ) + mk_hb_processRun( GetEnv( "HB_HOST_BIN_DIR" ) + _PS_ + "hbmk2" +; + " -quiet -lang=en" +; + " @contrib/" + tmp + "/" + tmp + ".hbi" +; + " -o${HB_LIB_INSTALL}/" ) ENDIF NEXT ENDIF @@ -100,16 +100,17 @@ PROCEDURE Main() /* Creating extra binaries */ - IF ! Empty( GetEnv( "HB_BUILD_ADDONS" ) ) + IF ! Empty( GetEnv( "HB_BUILD_ADDONS" ) ) .AND. ; + ! Empty( GetEnv( "HB_HOST_BIN_DIR" ) ) OutStd( "! Making binaries for .hbp project addons..." + hb_osNewLine() ) FOR EACH tmp IN hb_ATokens( GetEnv( "HB_BUILD_ADDONS" ),, .T. ) IF ! Empty( tmp ) - hb_processRun( GetEnv( "HB_HOST_BIN_DIR" ) + _PS_ + "hbmk2" +; - " -quiet -lang=en -q0 " + cOptions +; - " " + Chr( 34 ) + StrTran( tmp, "\", "/" ) + Chr( 34 ) +; - " -o${HB_BIN_INSTALL}/" ) + mk_hb_processRun( GetEnv( "HB_HOST_BIN_DIR" ) + _PS_ + "hbmk2" +; + " -quiet -lang=en -q0" + cOptions +; + " " + Chr( 34 ) + StrTran( tmp, "\", "/" ) + Chr( 34 ) +; + " -o${HB_BIN_INSTALL}/" ) ENDIF NEXT ENDIF @@ -118,7 +119,8 @@ PROCEDURE Main() IF !( GetEnv( "HB_PLATFORM" ) $ "dos|linux" ) .AND. ; !( GetEnv( "HB_BUILD_DLL" ) == "no" ) .AND. ; - !( GetEnv( "HB_BUILD_SHARED" ) == "yes" ) + !( GetEnv( "HB_BUILD_SHARED" ) == "yes" ) .AND. ; + ! Empty( GetEnv( "HB_HOST_BIN_DIR" ) ) OutStd( "! Making shared version of Harbour binaries..." + hb_osNewLine() ) @@ -128,10 +130,10 @@ PROCEDURE Main() !( tmp[ F_NAME ] == ".." ) .AND. ; hb_FileExists( "utils\" + tmp[ F_NAME ] + "\" + tmp[ F_NAME ] + ".hbp" ) - hb_processRun( GetEnv( "HB_HOST_BIN_DIR" ) + _PS_ + "hbmk2" +; - " -quiet -lang=en -q0 -shared" + cOptions +; - " utils/" + tmp[ F_NAME ] + "/" + tmp[ F_NAME ] + ".hbp" +; - " -o${HB_BIN_INSTALL}/" + tmp[ F_NAME ] + "-dll" ) + mk_hb_processRun( GetEnv( "HB_HOST_BIN_DIR" ) + _PS_ + "hbmk2" +; + " -quiet -lang=en -q0 -shared" + cOptions +; + " utils/" + tmp[ F_NAME ] + "/" + tmp[ F_NAME ] + ".hbp" +; + " -o${HB_BIN_INSTALL}/" + tmp[ F_NAME ] + "-dll" ) ENDIF NEXT ENDIF @@ -157,11 +159,11 @@ PROCEDURE Main() cOldDir := _PS_ + CurDir() DirChange( GetEnv( "HB_INSTALL_PREFIX" ) + _PS_ + ".." ) - hb_processRun( GetEnv( "HB_DIR_ZIP" ) + "zip" +; - " -q -9 -X -r -o" +; - " " + FN_Escape( tmp ) +; - " . -i " + FN_Escape( GetEnv( "HB_PKGNAME" ) + _PS_ + "*" ) +; - " -x *.tds -x *.exp" ) + mk_hb_processRun( GetEnv( "HB_DIR_ZIP" ) + "zip" +; + " -q -9 -X -r -o" +; + " " + FN_Escape( tmp ) +; + " . -i " + FN_Escape( GetEnv( "HB_PKGNAME" ) + _PS_ + "*" ) +; + " -x *.tds -x *.exp" ) DirChange( cOldDir ) @@ -171,9 +173,9 @@ PROCEDURE Main() OutStd( "! Making Harbour .exe install package: '" + tmp + "'" + hb_osNewLine() ) - hb_processRun( GetEnv( "HB_DIR_NSIS" ) + "makensis.exe" +; - " -V2" +; - " " + FN_Escape( "package\mpkg_win.nsi" ) ) + mk_hb_processRun( GetEnv( "HB_DIR_NSIS" ) + "makensis.exe" +; + " -V2" +; + " " + FN_Escape( StrTran( "package/mpkg_win.nsi", "/", _PS_ ) ) ) ENDIF ENDIF @@ -181,6 +183,12 @@ PROCEDURE Main() RETURN +STATIC FUNCTION mk_hb_processRun( ... ) + + OutStd( hb_PValue( 1 ) + hb_osNewLine() ) + + RETURN hb_processRun( ... ) + STATIC FUNCTION FN_Escape( cFN ) RETURN Chr( 34 ) + cFN + Chr( 34 ) diff --git a/harbour/contrib/hbfbird/hbfbird.hbi b/harbour/contrib/hbfbird/hbfbird.hbi index e31fa6b5af..d9bd1c84a1 100644 --- a/harbour/contrib/hbfbird/hbfbird.hbi +++ b/harbour/contrib/hbfbird/hbfbird.hbi @@ -4,5 +4,7 @@ -hbimplib +-ofbclient + {!allgcc}${HB_WITH_FIREBIRD}/../bin/fbclient.dll {allgcc}${HB_WITH_FIREBIRD}/../lib/fbclient_ms.lib diff --git a/harbour/debian/rules b/harbour/debian/rules index 152e26af19..13471e8eb8 100755 --- a/harbour/debian/rules +++ b/harbour/debian/rules @@ -67,7 +67,7 @@ binary-arch: build install dh_installdocs dh_installexamples # dh_install - dh_installman doc/man/harbour.1 doc/man/hbmk.1 doc/man/hbpp.1 doc/man/hbrun.1 doc/man/hbtest.1 + dh_installman doc/man/harbour.1 doc/man/hbmk2.1 doc/man/hbpp.1 doc/man/hbrun.1 doc/man/hbtest.1 dh_link dh_strip dh_compress diff --git a/harbour/doc/man/hbmk.1 b/harbour/doc/man/hbmk2.1 similarity index 91% rename from harbour/doc/man/hbmk.1 rename to harbour/doc/man/hbmk2.1 index 79b34acfcb..28313a10c1 100644 --- a/harbour/doc/man/hbmk.1 +++ b/harbour/doc/man/hbmk2.1 @@ -1,13 +1,13 @@ -.TH HBMK 1 +.TH HBMK2 1 .SH NAME -hbmk \- Harbour Project Make +hbmk2 \- Harbour Project Make .SH SYNOPSIS -\fBhbmk\fP \fB[options] [] \fP +\fBhbmk2\fP \fB[options] [] \fP .SH DESCRIPTION -\fBhbmk\fP is the Harbour Project make utility. +\fBhbmk2\fP is the Harbour Project make utility. It's a wrapper to the Harbour compiler, a C compiler and linker. @@ -75,7 +75,7 @@ do not process .hbc files in current directory .IP "\fB-hbcc, -hbcmp\fP" 10 stop after creating the object files -create link/copy hbmk to hbcc/hbcmp for the same effect +create link/copy hbmk2 to hbcc/hbcmp for the same effect .IP "\fB-hblnk\fP" 10 act as linker. Currently this is the same as -q @@ -100,9 +100,9 @@ Regular Harbour compiler options are also accepted. Multiple -l, -L and