From 971a758f7e5f0fdca089f6a2d67f6799a6fa5788 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 26 Mar 2013 01:26:59 +0100 Subject: [PATCH] simplified the way a contrib can be (re)built --- ChangeLog.txt | 5 +++++ README.txt | 4 ++-- contrib/make.hb | 13 +++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 5e27e56f78..a81a3de3ee 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,11 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2013-03-26 01:26 UTC+0100 Viktor Szakats (harbour syenar.net) + * contrib/make.hb + * README.txt + + simplified the way a contrib can be (re)built + 2013-03-25 21:41 UTC+0100 Viktor Szakats (harbour syenar.net) + tests/achoice3.prg + added another AChoice() TOFIX demonstration. diff --git a/README.txt b/README.txt index 15f3827e3e..c4a87e2b2f 100644 --- a/README.txt +++ b/README.txt @@ -260,8 +260,8 @@ TABLE OF CONTENT If you want to rebuild one specific contrib package, use this: - cd contrib/ - ../../bin///hbmk2 ../make.hb [clean] [custom hbmk2 options] + cd contrib + hbmk2 make.hb [clean] [custom hbmk2 options] 4. HOW TO CREATE DISTRIBUTABLE PACKAGES diff --git a/contrib/make.hb b/contrib/make.hb index f063d81664..483d136b00 100755 --- a/contrib/make.hb +++ b/contrib/make.hb @@ -118,6 +118,7 @@ PROCEDURE Standalone( aParams, hProjectList ) LOCAL tmp1 LOCAL lCustom + LOCAL cCustomDir /* Processing cmdline options */ @@ -167,6 +168,14 @@ PROCEDURE Standalone( aParams, hProjectList ) hProjectReqList := { => } hb_HKeepOrder( hProjectReqList, .T. ) + IF hb_DirExists( AllTrim( cOptionsUser ) ) + cCustomDir := hb_cwd( AllTrim( cOptionsUser ) ) + cOptionsUser := "" + lCustom := .F. + s_cHome += "../" + s_cRoot += "../" + ENDIF + IF ! lCustom /* Find out which projects are in current dir, these will be our primary targets */ FOR EACH tmp IN hProjectList @@ -192,6 +201,10 @@ PROCEDURE Standalone( aParams, hProjectList ) build_projects( nAction, hProjectList, hProjectReqList, cOptionsUser, .T. ) + IF ! Empty( cCustomDir ) + hb_cwd( cCustomDir ) + ENDIF + RETURN /* Workflow translation from GNU Make to hbmk2: