2010-03-29 09:52 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)

* Makefile
  - bin/postinst.prg
  + config/postinst.prg
    * Moved postinst.prg from bin to config dir.

  * config/postinst.prg
    + Changed to automatically build all tools found in /utils,
      thus dropping hard-wired tool names from postinst.
    * Minor cleanup.
This commit is contained in:
Viktor Szakats
2010-03-29 07:54:12 +00:00
parent bc73992c1a
commit 35ab8e3f83
3 changed files with 53 additions and 42 deletions

View File

@@ -17,6 +17,17 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-03-29 09:52 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* Makefile
- bin/postinst.prg
+ config/postinst.prg
* Moved postinst.prg from bin to config dir.
* config/postinst.prg
+ Changed to automatically build all tools found in /utils,
thus dropping hard-wired tool names from postinst.
* Minor cleanup.
2010-03-28 19:22 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* bin/postinst.prg
* Corrected double pathseps in one place.

View File

@@ -43,5 +43,5 @@ else
endif
install::
+$(HB_HOST_BIN_DIR)/hbrun$(HB_HOST_BIN_EXT) --hb:gtcgi $(TOP)$(ROOT)bin/postinst.prg
+$(HB_HOST_BIN_DIR)/hbrun$(HB_HOST_BIN_EXT) --hb:gtcgi $(TOP)$(ROOT)config/postinst.prg
$(if $(wildcard $(HB_POSTINST)),+$(HB_POSTINST),)

View File

@@ -9,6 +9,7 @@
/* TOFIX: Ugly hack to avoid #include "directry.ch" */
#define F_NAME 1 /* File name */
#define F_ATTR 5 /* File attribute */
#define _PS_ hb_osPathSeparator()
@@ -76,38 +77,38 @@ PROCEDURE Main()
! Empty( GetEnv( "HB_HOST_BIN_DIR" ) )
aArray := {;
{ "ace32" , "HB_WITH_ADS" , "\Redistribute\ace32.dll" , .F. },;
{ "ace32" , "HB_WITH_ADS" , "\ace32.dll" , .F. },;
{ "ace32" , "HB_WITH_ADS" , "\32bit\ace32.dll" , .F. },;
{ "alleg" , "HB_WITH_ALLEGRO" , "\..\bin\alleg42.dll" , .T. },;
{ "sde61" , "HB_WITH_APOLLO" , "\..\sde61.dll" , .F. },;
{ "sde7" , "HB_WITH_APOLLO" , "\..\sde7.dll" , .F. },;
{ "blat" , "HB_WITH_BLAT" , "\..\blat.dll" , .T. },;
{ "cairo" , "HB_WITH_CAIRO" , "\..\..\bin\libcairo-2.dll" , .T. },;
{ "libcurl" , "HB_WITH_CURL" , "\..\libcurl.dll" , .T. },;
{ "libcurl" , "HB_WITH_CURL" , "\..\bin\libcurl.dll" , .T. },;
{ "fbclient" , "HB_WITH_FIREBIRD" , "\..\bin\fbclient.dll" , .F. },;
{ "FreeImage", "HB_WITH_FREEIMAGE" , "\..\Dist\FreeImage.dll" , .F. },;
{ "bgd" , "HB_WITH_GD" , "\..\bin\bgd.dll" , .F. },;
{ "libhpdf" , "HB_WITH_LIBHARU" , "\..\libhpdf.dll" , .F. },;
{ "libhpdf" , "HB_WITH_LIBHARU" , "\..\lib_dll\libhpdf.dll" , .F. },;
{ "libmysql" , "HB_WITH_MYSQL" , "\..\bin\libmySQL.dll" , .F. },;
{ "ociliba" , "HB_WITH_OCILIB" , "\..\lib32\ociliba.dll" , .F. },;
{ "ocilibm" , "HB_WITH_OCILIB" , "\..\lib32\ocilibm.dll" , .F. },;
{ "ocilibw" , "HB_WITH_OCILIB" , "\..\lib32\ocilibw.dll" , .F. },;
{ "libeay32" , "HB_WITH_OPENSSL" , "\..\out32dll\libeay32.dll" , .T. },;
{ "ssleay32" , "HB_WITH_OPENSSL" , "\..\out32dll\ssleay32.dll" , .T. },;
{ "libeay32" , "HB_WITH_OPENSSL" , "\..\dll\libeay32.dll" , .T. },;
{ "ssleay32" , "HB_WITH_OPENSSL" , "\..\dll\ssleay32.dll" , .T. },;
{ "libeay32" , "HB_WITH_OPENSSL" , "\..\libeay32.dll" , .T. },;
{ "ssleay32" , "HB_WITH_OPENSSL" , "\..\ssleay32.dll" , .T. },;
{ "libpq" , "HB_WITH_PGSQL" , "\..\lib\libpq.dll" , .T. }}
{ "ace32" , "HB_WITH_ADS" , "Redistribute\ace32.dll" , .F. },;
{ "ace32" , "HB_WITH_ADS" , "ace32.dll" , .F. },;
{ "ace32" , "HB_WITH_ADS" , "32bit\ace32.dll" , .F. },;
{ "alleg" , "HB_WITH_ALLEGRO" , "..\bin\alleg42.dll" , .T. },;
{ "sde61" , "HB_WITH_APOLLO" , "..\sde61.dll" , .F. },;
{ "sde7" , "HB_WITH_APOLLO" , "..\sde7.dll" , .F. },;
{ "blat" , "HB_WITH_BLAT" , "..\blat.dll" , .T. },;
{ "cairo" , "HB_WITH_CAIRO" , "..\..\bin\libcairo-2.dll" , .T. },;
{ "libcurl" , "HB_WITH_CURL" , "..\libcurl.dll" , .T. },;
{ "libcurl" , "HB_WITH_CURL" , "..\bin\libcurl.dll" , .T. },;
{ "fbclient" , "HB_WITH_FIREBIRD" , "..\bin\fbclient.dll" , .F. },;
{ "FreeImage", "HB_WITH_FREEIMAGE" , "..\Dist\FreeImage.dll" , .F. },;
{ "bgd" , "HB_WITH_GD" , "..\bin\bgd.dll" , .F. },;
{ "libhpdf" , "HB_WITH_LIBHARU" , "..\libhpdf.dll" , .F. },;
{ "libhpdf" , "HB_WITH_LIBHARU" , "..\lib_dll\libhpdf.dll" , .F. },;
{ "libmysql" , "HB_WITH_MYSQL" , "..\bin\libmySQL.dll" , .F. },;
{ "ociliba" , "HB_WITH_OCILIB" , "..\lib32\ociliba.dll" , .F. },;
{ "ocilibm" , "HB_WITH_OCILIB" , "..\lib32\ocilibm.dll" , .F. },;
{ "ocilibw" , "HB_WITH_OCILIB" , "..\lib32\ocilibw.dll" , .F. },;
{ "libeay32" , "HB_WITH_OPENSSL" , "..\out32dll\libeay32.dll" , .T. },;
{ "ssleay32" , "HB_WITH_OPENSSL" , "..\out32dll\ssleay32.dll" , .T. },;
{ "libeay32" , "HB_WITH_OPENSSL" , "..\dll\libeay32.dll" , .T. },;
{ "ssleay32" , "HB_WITH_OPENSSL" , "..\dll\ssleay32.dll" , .T. },;
{ "libeay32" , "HB_WITH_OPENSSL" , "..\libeay32.dll" , .T. },;
{ "ssleay32" , "HB_WITH_OPENSSL" , "..\ssleay32.dll" , .T. },;
{ "libpq" , "HB_WITH_PGSQL" , "..\lib\libpq.dll" , .T. }}
FOR EACH tmp IN aArray
IF ! Empty( GetEnv( tmp[ 2 ] ) )
hb_processRun( GetEnv( "HB_HOST_BIN_DIR" ) + _PS_ + "hbmk2" +;
" " + Chr( 34 ) + "-mkimplib=" + GetEnv( "HB_LIB_INSTALL" ) + _PS_ + tmp[ 1 ] + Chr( 34 ) +;
" " + Chr( 34 ) + GetEnv( tmp[ 2 ] ) + StrTran( tmp[ 3 ], "\", _PS_ ) + Chr( 34 ) +;
" " + Chr( 34 ) + GetEnv( tmp[ 2 ] ) + _PS_ + StrTran( tmp[ 3 ], "\", _PS_ ) + Chr( 34 ) +;
iif( tmp[ 4 ], " -mkimplibms", "" ) )
ENDIF
NEXT
@@ -116,9 +117,9 @@ PROCEDURE Main()
IF GetEnv( "HB_COMPILER" ) == "mingw" .AND. ;
! Empty( GetEnv( "HB_WITH_OCILIB" ) )
hb_FCopy( GetEnv( "HB_WITH_OCILIB" ) + StrTran( "\..\lib32\libociliba.a", "\", _PS_ ), GetEnv( "HB_LIB_INSTALL" ) + _PS_ + "libociliba.a" )
hb_FCopy( GetEnv( "HB_WITH_OCILIB" ) + StrTran( "\..\lib32\libocilibm.a", "\", _PS_ ), GetEnv( "HB_LIB_INSTALL" ) + _PS_ + "libocilibm.a" )
hb_FCopy( GetEnv( "HB_WITH_OCILIB" ) + StrTran( "\..\lib32\libocilibw.a", "\", _PS_ ), GetEnv( "HB_LIB_INSTALL" ) + _PS_ + "libocilibw.a" )
hb_FCopy( GetEnv( "HB_WITH_OCILIB" ) + _PS_ + StrTran( "..\lib32\libociliba.a", "\", _PS_ ), GetEnv( "HB_LIB_INSTALL" ) + _PS_ + "libociliba.a" )
hb_FCopy( GetEnv( "HB_WITH_OCILIB" ) + _PS_ + StrTran( "..\lib32\libocilibm.a", "\", _PS_ ), GetEnv( "HB_LIB_INSTALL" ) + _PS_ + "libocilibm.a" )
hb_FCopy( GetEnv( "HB_WITH_OCILIB" ) + _PS_ + StrTran( "..\lib32\libocilibw.a", "\", _PS_ ), GetEnv( "HB_LIB_INSTALL" ) + _PS_ + "libocilibw.a" )
ENDIF
ENDIF
@@ -140,18 +141,17 @@ PROCEDURE Main()
OutStd( "! Making shared version of Harbour binaries..." + hb_osNewLine() )
aArray := {;
{ "hbrun-dll" , "utils\hbrun\hbrun.hbp" },;
{ "hbmk2-dll" , "utils\hbmk2\hbmk2.hbp" },;
{ "hbtest-dll" , "utils\hbtest\hbtest.hbp" },;
{ "hbi18n-dll" , "utils\hbi18n\hbi18n.hbp" },;
{ "hbformat-dll" , "utils\hbformat\hbformat.hbp" }}
FOR EACH tmp IN Directory( "utils\*", "D" )
IF "D" $ tmp[ F_ATTR ] .AND. ;
!( tmp[ F_NAME ] == "." ) .AND. ;
!( tmp[ F_NAME ] == ".." ) .AND. ;
hb_FileExists( "utils\" + tmp[ F_NAME ] + "\" + tmp[ F_NAME ] + ".hbp" )
FOR EACH tmp IN aArray
hb_processRun( GetEnv( "HB_HOST_BIN_DIR" ) + _PS_ + "hbmk2" +;
" -quiet -q0 -lang=en -shared" + cOptions +;
" " + Chr( 34 ) + "-o" + GetEnv( "HB_BIN_INSTALL" ) + _PS_ + tmp[ 1 ] + Chr( 34 ) +;
" " + Chr( 34 ) + StrTran( tmp[ 2 ], "\", _PS_ ) + Chr( 34 ) )
hb_processRun( GetEnv( "HB_HOST_BIN_DIR" ) + _PS_ + "hbmk2" +;
" -quiet -q0 -lang=en -shared" + cOptions +;
" " + Chr( 34 ) + "-o" + GetEnv( "HB_BIN_INSTALL" ) + _PS_ + tmp[ F_NAME ] + "-dll" + Chr( 34 ) +;
" " + Chr( 34 ) + StrTran( "utils\" + tmp[ F_NAME ] + "\" + tmp[ F_NAME ] + ".hbp", "\", _PS_ ) + Chr( 34 ) )
ENDIF
NEXT
ENDIF