2009-03-04 17:59 UTC+0100 Viktor Szakats (harbour.01 syenar hu)

* doc/man/hbmk.1
    * Updates. Work in progress.

  * utils/hbmk2/hbmk2.prg
    + Added man page, troff/groff links.
    ! Reversed the logic shared lib paths were included by.
    * Changed the meaning -hbcc again. Now it will switch hbmk2
      to a mode where it accept -c option. If -c is sensed, it
      will stop after calling the C compiler.
    ! gtwxc removed from default GT list for *nix systems.
      It should be added there by hbmk.cfg.
This commit is contained in:
Viktor Szakats
2009-03-04 16:59:55 +00:00
parent 290bb4d2b7
commit 32c306782c
3 changed files with 73 additions and 35 deletions

View File

@@ -8,6 +8,19 @@
2009-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2009-03-04 17:59 UTC+0100 Viktor Szakats (harbour.01 syenar hu)
* doc/man/hbmk.1
* Updates. Work in progress.
* utils/hbmk2/hbmk2.prg
+ Added man page, troff/groff links.
! Reversed the logic shared lib paths were included by.
* Changed the meaning -hbcc again. Now it will switch hbmk2
to a mode where it accept -c option. If -c is sensed, it
will stop after calling the C compiler.
! gtwxc removed from default GT list for *nix systems.
It should be added there by hbmk.cfg.
2009-03-04 15:02 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/make_gnu.sh
* small cleanup

View File

@@ -9,6 +9,8 @@ hbmk \- Harbour Project Make
.SH DESCRIPTION
\fBhbmk\fP is the Harbour Project make utility.
It's a wrapper to the Harbour compiler, a C compiler and linker.
.SH OPTIONS
.IP "\fB-help\fP" 10
Display full help
@@ -92,33 +94,41 @@ turn on informational messages
.IP "\fB-quiet\fP" 10
suppress all screen messages
Notes:
- <script> can be <@script> (.hbm file), <script.hbm> or <script.hbp>.
- Regular Harbour compiler options are also accepted.
- Multiple -l, -L and <script> parameters are accepted.
- hbmk.cfg option file in hbmk directory is always processed if it
exists. On *nix platforms ~/.harbour, /etc/harbour, <base>/etc/harbour,
<base>/etc are checked (in that order) before the hbmk directory.
The file format is the same as .hbp.
- .hbp option files in current dir are automatically processed.
- .hbp options (they should come in separate lines):
libs=[<libname[s]>], gt=[gtname], prgflags=[Harbour flags]
cflags=[C compiler flags], ldflags=[Linker flags], libpaths=[lib paths]
gui|mt|shared|nulrdd|debug|map|strip|run=[yes|no]
Lines starting with '#' char are ignored
- Platform filters are accepted in each .hbp line and with -l options.
Filter format: {[!][<arch|comp>]}. Filters can be combined
using '&', '|' operators and grouped by parantheses.
Ex.: {win}, {gcc}, {linux|darwin}, {win&!dmc}, {(win|linux)&!owatcom}
- Defaults and feature support vary by architecture/compiler.
- Supported <comp> values for each supported <arch> value:
linux : gcc, gpp, owatcom, icc, mingw, mingwce
darwin : gcc
win : mingw, msvc, bcc, owatcom, pocc, dmc, rsxnt, icc, cygwin
mingwce, msvc64, msvcia64, msvcce, pocc64, poccce, xcc
os2 : gcc, owatcom, icc
dos : gcc, djgpp, owatcom, rsx32
bsd, hpux, sunos: gcc
<script> can be <@script> (.hbm file), <script.hbm> or <script.hbp>.
Regular Harbour compiler options are also accepted.
Multiple -l, -L and <script> parameters are accepted.
hbmk.cfg option file in hbmk directory is always processed if it exists.
On *nix platforms ~/.harbour, /etc/harbour, <base>/etc/harbour,
<base>/etc are checked (in that order) before the hbmk directory.
The file format is the same as .hbp.
.hbp option files in current dir are automatically processed.
.hbp options (they should come in separate lines):
libs=[<libname[s]>], gt=[gtname], prgflags=[Harbour flags]
cflags=[C compiler flags], ldflags=[Linker flags], libpaths=[lib paths]
gui|mt|shared|nulrdd|debug|map|strip|run=[yes|no]
Lines starting with '#' char are ignored
Platform filters are accepted in each .hbp line and with -l options.
Filter format: {[!][<arch|comp>]}. Filters can be combined
using '&', '|' operators and grouped by parantheses.
Ex.: {win}, {gcc}, {linux|darwin}, {win&!dmc}, {(win|linux)&!owatcom}
Defaults and feature support vary by architecture/compiler.
Supported <comp> values for each supported <arch> value:
linux: gcc, gpp, owatcom, icc, mingw, mingwce
darwin: gcc
win: mingw, msvc, bcc, owatcom, pocc, dmc, rsxnt, icc, cygwin mingwce, msvc64, msvcia64, msvcce, pocc64, poccce, xcc
os2: gcc, owatcom, icc
dos: gcc, djgpp, owatcom, rsx32
bsd, hpux, sunos: gcc
.SH FILES
.SH ENVIRONMENT
@@ -126,10 +136,10 @@ Notes:
.IP "\fBCCPREFIX\fP" 10
.IP "\fBHB_ARCHITECTURE\fP" 10
.IP "\fBHB_COMPILER\fP" 10
.IP "\fBHB_INSTALL_PREFIX\fP" 10
.IP "\fBHB_BIN_INSTALL\fP" 10
.IP "\fBHB_INC_INSTALL\fP" 10
.IP "\fBHB_LIB_INSTALL\fP" 10
.IP "\fBHB_INSTALL_PREFIX\fP" 10
.IP "\fBHB_MT\fP" 10
.IP "\fBHB_GUI\fP" 10
.IP "\fBHB_SHARED\fP" 10

View File

@@ -63,6 +63,16 @@
*
*/
/*
Man page HOWTO:
http://www.schweikhardt.net/man_page_howto.html
Groff manual:
http://www.gnu.org/software/groff/manual/html_node/index.html
http://www.gnu.org/software/groff/manual/groff.pdf
Troff manual:
http://cm.bell-labs.com/sys/doc/troff.pdf
*/
#include "common.ch"
#include "directry.ch"
#include "fileio.ch"
@@ -264,6 +274,7 @@ FUNCTION Main( ... )
LOCAL lStopAfterHarbour := .F.
LOCAL lStopAfterCComp := .F.
LOCAL lAcceptCFlag := .F.
LOCAL aParams
LOCAL aParam
@@ -302,8 +313,8 @@ FUNCTION Main( ... )
CASE cParamL == "-quiet" ; t_lQuiet := .T. ; t_lInfo := .F.
CASE Left( cParamL, 6 ) == "-comp=" ; t_cCOMP := SubStr( cParam, 7 )
CASE Left( cParamL, 6 ) == "-arch=" ; t_cARCH := SubStr( cParam, 7 )
CASE cParamL == "-hbcmp" ; t_lInfo := .F. ; lStopAfterHarbour := .F. ; lStopAfterCComp := .T.
CASE cParamL == "-hbcc" ; t_lInfo := .F. ; lStopAfterHarbour := .F. ; lStopAfterCComp := .T.
CASE cParamL == "-hbcmp" ; t_lInfo := .F. ; lStopAfterHarbour := .F. ; lStopAfterCComp := .T. ; lAcceptCFlag := .F.
CASE cParamL == "-hbcc" ; t_lInfo := .F. ; lStopAfterHarbour := .F. ; lStopAfterCComp := .F. ; lAcceptCFlag := .T.
CASE cParamL == "-hblnk" ; t_lInfo := .F.
CASE cParamL == "-info" ; t_lInfo := .T.
CASE cParamL == "-help" .OR. ;
@@ -327,13 +338,13 @@ FUNCTION Main( ... )
DO CASE
CASE Right( tmp, 5 ) == "hbcmp" .OR. ;
Left( tmp, 5 ) == "hbcmp"
t_lInfo := .F. ; lStopAfterHarbour := .F. ; lStopAfterCComp := .T.
t_lInfo := .F. ; lStopAfterHarbour := .F. ; lStopAfterCComp := .T. ; lAcceptCFlag := .F.
IF t_lInfo
OutStd( "hbmk: Enabled -hbcmp option." + hb_osNewLine() )
ENDIF
CASE Right( tmp, 4 ) == "hbcc" .OR. ;
Left( tmp, 4 ) == "hbcc"
t_lInfo := .F. ; lStopAfterHarbour := .F. ; lStopAfterCComp := .T.
t_lInfo := .F. ; lStopAfterHarbour := .F. ; lStopAfterCComp := .F. ; lAcceptCFlag := .T.
IF t_lInfo
OutStd( "hbmk: Enabled -hbcc option." + hb_osNewLine() )
ENDIF
@@ -394,7 +405,7 @@ FUNCTION Main( ... )
aCOMPSUP := { "gcc" }
ENDIF
cBin_CompPRG := "harbour"
s_aLIBHBGT := { "gttrm", "gtxwc" }
s_aLIBHBGT := { "gttrm" }
t_cGTDEFAULT := "gttrm"
cDynLibNamePrefix := "lib"
cBinExt := NIL
@@ -703,6 +714,10 @@ FUNCTION Main( ... )
/* Swallow this switch. We don't pass it to Harbour, as it may badly
interact with hbmk. */
CASE lAcceptCFlag .AND. Left( cParamL, 2 ) == "-c"
lStopAfterCComp := .T
CASE cParamL == "-gui" .OR. ;
cParamL == "-mwindows" ; s_lGUI := .T. /* Compatibility */
CASE cParamL == "-std" .OR. ;
@@ -949,9 +964,9 @@ FUNCTION Main( ... )
ENDIF
IF lSysLoc
cPrefix := PathNormalize( s_cHB_LIB_INSTALL, .T. )
ELSE
cPrefix := ""
ELSE
cPrefix := PathNormalize( s_cHB_LIB_INSTALL, .T. )
ENDIF
#if 1
cPostfix := ""