2006-11-28 21:10 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/makefile.bc
  * harbour/config/c.cf
    * changed default settings to not use bison for generation new
      grammar files. Now developers who will want to update our
      grammar definition files for compiler and macro compiler
      should set environment variable HB_REBUILD_PARSER=yes
      to force preprocessing new rules by bison and should
      remember to update before committing modifications in *.y
      file(s) corresponding *.yy[ch] files by copping the new
      ones generated by parser.
    ! fixed typo in makefile.bc - instead of $(HARBOUR_DIR)\macro.yyc
      should be $(MACRO_DIR)\macro.yyc
This commit is contained in:
Przemyslaw Czerpak
2006-11-28 20:22:58 +00:00
parent 9967551273
commit 0ae7932565
3 changed files with 40 additions and 26 deletions

View File

@@ -8,6 +8,20 @@
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
*/
2006-11-28 21:10 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/makefile.bc
* harbour/config/c.cf
* changed default settings to not use bison for generation new
grammar files. Now developers who will want to update our
grammar definition files for compiler and macro compiler
should set environment variable HB_REBUILD_PARSER=yes
to force preprocessing new rules by bison and should
remember to update before committing modifications in *.y
file(s) corresponding *.yy[ch] files by copping the new
ones generated by parser.
! fixed typo in makefile.bc - instead of $(HARBOUR_DIR)\macro.yyc
should be $(MACRO_DIR)\macro.yyc
2006-11-28 19:30 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/compiler/harbour.y
* use HB_COMP_PARAM macro in expression destructor instead of

View File

@@ -27,16 +27,16 @@ ALL_C_OBJS = $(YACC_OBJ) $(LEX_OBJ) $(C_OBJS) $(C_MAIN_OBJ)
$(YACC_OBJ) : $(YACC_C)
ifeq ($(HB_REBUILD_PARSER),no)
ifneq ($(HB_REBUILD_PARSER),no)
$(YACC_C) : ../../$(YACC_SOURCE) $(YACC_HB_H)
$(YACC) $(YACC_FLAGS) -o$@ $<
else
ifeq ($(DIRSEP),)
DIRSEP = /
endif
%y.c : ../../%.yyc
$(CP) $(subst /,$(DIRSEP),$<) $@
$(CP) $(subst /,$(DIRSEP),$(<:.yyc=.yyh)) $(@:.c=.h)
else
$(YACC_C) : ../../$(YACC_SOURCE) $(YACC_HB_H)
$(YACC) $(YACC_FLAGS) -o$@ $<
endif
$(LEX_OBJ) : $(LEX_C)

View File

@@ -628,17 +628,7 @@ $(PP_DIR)\pptable.c : $(BIN_DIR)\ppgen.exe include\hbstdgen.ch
#**********************************************************
!if "$(HB_REBUILD_PARSER)" == "no"
$(OBJ_DIR)\macroy.c : $(HARBOUR_DIR)\macro.yyc
copy /A /Y $** $@ >> inst_$(CC_DIRNAME).log
copy /A /Y $(**:.yyc=.yyh) $(@:.c=.h) >> inst_$(CC_DIRNAME).log
$(OBJ_DIR)\harboury.c : $(HARBOUR_DIR)\harbour.yyc
copy /A /Y $** $@ >> inst_$(CC_DIRNAME).log
copy /A /Y $(**:.yyc=.yyh) $(@:.c=.h) >> inst_$(CC_DIRNAME).log
!else
!if "$(HB_REBUILD_PARSER)" != "no"
$(OBJ_DIR)\macroy.c : $(MACRO_DIR)\macro.y
bison --no-line -p hb_macro -d $** -o$@
@@ -646,6 +636,16 @@ $(OBJ_DIR)\macroy.c : $(MACRO_DIR)\macro.y
$(OBJ_DIR)\harboury.c : $(HARBOUR_DIR)\harbour.y
bison --no-line -d $** -o$@
!else
$(OBJ_DIR)\macroy.c : $(MACRO_DIR)\macro.yyc
copy /A /Y $** $@ >> inst_$(CC_DIRNAME).log
copy /A /Y $(**:.yyc=.yyh) $(@:.c=.h) >> inst_$(CC_DIRNAME).log
$(OBJ_DIR)\harboury.c : $(HARBOUR_DIR)\harbour.yyc
copy /A /Y $** $@ >> inst_$(CC_DIRNAME).log
copy /A /Y $(**:.yyc=.yyh) $(@:.c=.h) >> inst_$(CC_DIRNAME).log
!endif
#**********************************************************
@@ -672,17 +672,7 @@ $(OBJ_DIR)\harbourl.obj : $(OBJ_DIR)\harbourl.c
#**********************************************************
!if "$(HB_REBUILD_PARSER)" == "no"
$(DLL_OBJ_DIR)\macroy.c : $(HARBOUR_DIR)\macro.yyc
copy /A /Y $** $@ >> inst_$(CC_DIRNAME).log
copy /A /Y $(**:.yyc=.yyh) $(@:.c=.h) >> inst_$(CC_DIRNAME).log
$(DLL_OBJ_DIR)\harboury.c : $(HARBOUR_DIR)\harbour.yyc
copy /A /Y $** $@ >> inst_$(CC_DIRNAME).log
copy /A /Y $(**:.yyc=.yyh) $(@:.c=.h) >> inst_$(CC_DIRNAME).log
!else
!if "$(HB_REBUILD_PARSER)" != "no"
$(DLL_OBJ_DIR)\macroy.c : $(MACRO_DIR)\macro.y
bison --no-line -p hb_macro -d $** -o$@
@@ -690,6 +680,16 @@ $(DLL_OBJ_DIR)\macroy.c : $(MACRO_DIR)\macro.y
$(DLL_OBJ_DIR)\harboury.c : $(HARBOUR_DIR)\harbour.y
bison --no-line -d $** -o$@
!else
$(DLL_OBJ_DIR)\macroy.c : $(MACRO_DIR)\macro.yyc
copy /A /Y $** $@ >> inst_$(CC_DIRNAME).log
copy /A /Y $(**:.yyc=.yyh) $(@:.c=.h) >> inst_$(CC_DIRNAME).log
$(DLL_OBJ_DIR)\harboury.c : $(HARBOUR_DIR)\harbour.yyc
copy /A /Y $** $@ >> inst_$(CC_DIRNAME).log
copy /A /Y $(**:.yyc=.yyh) $(@:.c=.h) >> inst_$(CC_DIRNAME).log
!endif
#**********************************************************