From 17614b7b2e41bc4aa3927af6dbbd9649281aa336 Mon Sep 17 00:00:00 2001 From: Maurilio Longo Date: Mon, 31 Jul 2000 07:15:18 +0000 Subject: [PATCH] 20000731-09:00 GMT+2 Maurilio Longo --- harbour/ChangeLog | 6 ++++ harbour/source/macro/Makefile | 62 +++++++++++++++++++++++++++++++++ harbour/source/macro/macroslx.c | 6 ++-- 3 files changed, 72 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 35ecc42d62..21cf6d6018 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,9 @@ +20000731-09:00 GMT+2 Maurilio Longo + * source/macro/Makefile + + added macroslx.c compilation instead of flex lexer if HB_LEX is set to SIMPLEX + * source/macro/macroslx.c + + added relative path in include commands to let gcc find correct files + 2000-07-30 22:50 UTC+0800 Ron Pinkas * source/macro/macro.slx ! Corrected unreleased memory block. diff --git a/harbour/source/macro/Makefile b/harbour/source/macro/Makefile index 350ed696b6..ebbd467251 100644 --- a/harbour/source/macro/Makefile +++ b/harbour/source/macro/Makefile @@ -1,43 +1,105 @@ # + # $Id$ + # + + ROOT = ../../ + + YACC_FLAGS = -p hb_comp + + YACC_SOURCE=macro.y + + YACC_HEADERS=\ + hbmacro.h \ + hbsetup.h \ + hbpcode.h \ + hbdefs.h \ + + +ifeq ($(HB_LEX),SIMPLEX) + + + +C_EXTRA=macroslx.c + + + +else + + + #NOTE: You can pass additional parameters that control the speed/size + # ratio of generated flex scanner. These parameters are: + # -Cf - fastest/biggest + # -CF + # -C - in between + # -Cm + # -Ce + # -Cem - slowest/smallest + # see Flex documentation for full set of switches + LEX_FLAGS = -Phb_comp -C + + LEX_SOURCE=macro.l + + LEX_HEADERS=\ + hbsetup.h \ + hberrors.h \ + hbdefs.h \ + hbmacro.h \ + + +endif + + + C_SOURCES=\ + macroa.c \ + macrob.c \ + macroc.c \ + $(C_EXTRA) + + + LIBNAME=macro + + include $(TOP)$(ROOT)config/lib.cf + + \ No newline at end of file diff --git a/harbour/source/macro/macroslx.c b/harbour/source/macro/macroslx.c index 1bab8f7fe6..31a9bfa9a6 100644 --- a/harbour/source/macro/macroslx.c +++ b/harbour/source/macro/macroslx.c @@ -13,6 +13,8 @@ #include "hberrors.h" #include "hbdefs.h" -#define SLX_RULES "macro.slx" +/* this is relative to position of simplex.c in harbour source tree */ +#define SLX_RULES "../macro/macro.slx" -#include "simplex.c" +/* this is relative to position of macroslx.c in harbour source tree */ +#include "../compiler/simplex.c"