>
> -c is C compiler option. Not hb* script.
> hbcc doen not have assume any result of final build.
> If this is a problem for you to separate internal hbmk2
> compile time and link time logic then look of -c C compiler
> switch. If it's not a problem then forget about -c and simply


No, it's already separated. This (-c) functionality was originally
covered by -hbcc switch, and the one with linking is the default
(still is).


> make it working.
> I only want to have working hbcc which can be used to compile
> or link .c/.o/.a files just like C compiler.


See my more recent reply on this. I have a patch pending (attached)
which accepts -c in -hbcc mode to create the "stopafterccompiler"
effect. I'm thinking of adding some cleaner (non-compatibility)
switches to achieve these effects, but this isn't urgent.

Brgds,
Viktor

--------------------------------------------------
Index: hbmk2.prg
===================================================================
--- hbmk2.prg (revision 10532)
+++ hbmk2.prg (working copy)
@@ -264,6 +264,7 @@

    LOCAL lStopAfterHarbour := .F.
    LOCAL lStopAfterCComp := .F.
+   LOCAL lAcceptCFlag := .F.

    LOCAL aParams
    LOCAL aParam
@@ -302,8 +303,8 @@
       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 +328,13 @@
    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 +395,7 @@
          aCOMPSUP := { "gcc" }
       ENDIF
       cBin_CompPRG := "harbour"
-      s_aLIBHBGT := { "gttrm", "gtxwc" }
+      s_aLIBHBGT := { "gttrm" }
       t_cGTDEFAULT := "gttrm"
       cDynLibNamePrefix := "lib"
       cBinExt := NIL
@@ -703,6 +704,10 @@
          /* 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 +954,9 @@
       ENDIF

       IF lSysLoc
+         cPrefix := ""
+      ELSE
          cPrefix := PathNormalize( s_cHB_LIB_INSTALL, .T. )
-      ELSE
-         cPrefix := ""
       ENDIF
 #if 1
       cPostfix := ""
--------------------------------------------------
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to