From 8ddf0874f8dd6405e56f987d65c35c3f64b5aac7 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 15 Jul 2009 15:36:01 +0000 Subject: [PATCH] 2009-07-15 17:34 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/global.cf + Enabled base directory for all intermediate build files (objects, Harbour generated .c files, etc). Now they will be put under 'obj' dir inside each source directory. After this huge task, it's now possible to filter out all these intermediate files from grep, hbextern commands. For me this means I can do without a parallel virgin repository kept for grep usage. * examples/hbextern/hbextern.prg * Filtering obj dirs instead of all platforms specifically. * config/c.cf ! Fixed to use $(GRANDP) instead of hard-wired ../../ dir. Please verify me. ; Przemek, you can now go on, the only remaining larger thing is moving install dir creation to GNU Make level. --- harbour/ChangeLog | 21 +++++++++++++++++++++ harbour/config/c.cf | 6 +++--- harbour/config/global.cf | 11 ++++------- harbour/examples/hbextern/hbextern.prg | 2 +- 4 files changed, 29 insertions(+), 11 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 9f8467fe26..d65c2d1918 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,27 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-07-15 17:34 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * config/global.cf + + Enabled base directory for all intermediate build files + (objects, Harbour generated .c files, etc). + Now they will be put under 'obj' dir inside each source + directory. + After this huge task, it's now possible to filter out + all these intermediate files from grep, hbextern commands. + For me this means I can do without a parallel virgin + repository kept for grep usage. + + * examples/hbextern/hbextern.prg + * Filtering obj dirs instead of all platforms specifically. + + * config/c.cf + ! Fixed to use $(GRANDP) instead of hard-wired ../../ dir. + Please verify me. + + ; Przemek, you can now go on, the only remaining larger thing + is moving install dir creation to GNU Make level. + 2009-07-15 17:24 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * config/dos/global.cf * config/global.cf diff --git a/harbour/config/c.cf b/harbour/config/c.cf index abe25fc33b..483c84309f 100644 --- a/harbour/config/c.cf +++ b/harbour/config/c.cf @@ -31,15 +31,15 @@ ALL_C_OBJS = $(YACC_OBJ) $(LEX_OBJ) $(C_OBJS) $(C_MAIN_OBJ) $(YACC_OBJ) : $(YACC_C) ifeq ($(HB_REBUILD_PARSER),yes) -$(YACC_C) : ../../$(YACC_SOURCE) $(YACC_HB_H) +$(YACC_C) : $(GRANDP)$(YACC_SOURCE) $(YACC_HB_H) $(YACC) $(YACC_FLAGS) -o$@ $< else -%y.c : ../../%.yyc +%y.c : $(GRANDP)%.yyc $(CP) $(subst /,$(DIRSEP),$<) $@ $(CP) $(subst /,$(DIRSEP),$(<:.yyc=.yyh)) $(@:.c=.h) endif $(LEX_OBJ) : $(LEX_C) -$(LEX_C) : ../../$(LEX_SOURCE) $(LEX_HB_H) +$(LEX_C) : $(GRANDP)$(LEX_SOURCE) $(LEX_HB_H) $(LEX) $(LEX_FLAGS) -o$@ $< diff --git a/harbour/config/global.cf b/harbour/config/global.cf index 397325b911..9a66a4a7fe 100644 --- a/harbour/config/global.cf +++ b/harbour/config/global.cf @@ -22,14 +22,11 @@ all: ; @echo Error: GNU Make version $(MAKE_VERSION) found, $(need) or upper nee else -GRANDP = ../../ -# GRANDP = ../../../ -# OBJ_BASE := .gnu +GRANDP = ../../../ +OBJ_BASE := obj ARCH_COMP := $(HB_ARCHITECTURE)/$(HB_COMPILER) -# OBJ_DIR := $(OBJ_BASE)/$(ARCH_COMP) -OBJ_DIR := $(ARCH_COMP) -# OBJ_ARCH_DIR := $(OBJ_BASE)/$(HB_ARCHITECTURE) -OBJ_ARCH_DIR := $(HB_ARCHITECTURE) +OBJ_DIR := $(OBJ_BASE)/$(ARCH_COMP) +OBJ_ARCH_DIR := $(OBJ_BASE)/$(HB_ARCHITECTURE) # Directory separator default ifeq ($(DIRSEP),) diff --git a/harbour/examples/hbextern/hbextern.prg b/harbour/examples/hbextern/hbextern.prg index cca3b1d4fb..9dae3a01a5 100644 --- a/harbour/examples/hbextern/hbextern.prg +++ b/harbour/examples/hbextern/hbextern.prg @@ -79,7 +79,7 @@ REQUEST HB_GT_CGI_DEFAULT // List of known files which does not contain any real public function. STATIC s_aSkipFiles := { "profiler.prg", "msg_tpl.c" } -STATIC s_aSkipDirs := { "tests", "examples", "sample", "samples", ".svn", "bsd", "darwin", "dos", "hpux", "linux", "os2", "sunos", "wce", "win" } +STATIC s_aSkipDirs := { "tests", "examples", "sample", "samples", ".svn", "obj" } STATIC s_aSkipNames := { "MAIN" } // Init with method names you want to skip STATIC s_aDirsProcessed := {}