2009-01-29 22:50 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/config/rules.cf
  * harbour/config/dos/bcc16.cf
    ! fixed wrong automatic macros $? was used instead of $<

  * harbour/config/dir.cf
    * optional new DIR_RULE setting for easier testing

  * harbour/config/c.cf
    + added support for setting dependencies for files which needs
      grammar header files generated by bison (YACC_DEPEND)

  * harbour/source/macro/Makefile
    * marked macrolex.c as YACC_DEPEND dependent

  * harbour/source/compiler/Makefile
    * marked complex.c as YACC_DEPEND dependent
This commit is contained in:
Przemyslaw Czerpak
2009-01-29 21:47:10 +00:00
parent 818977af2b
commit d83d51d6b9
7 changed files with 28 additions and 3 deletions

View File

@@ -8,6 +8,24 @@
2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org)
*/
2009-01-29 22:50 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/config/rules.cf
* harbour/config/dos/bcc16.cf
! fixed wrong automatic macros $? was used instead of $<
* harbour/config/dir.cf
* optional new DIR_RULE setting for easier testing
* harbour/config/c.cf
+ added support for setting dependencies for files which needs
grammar header files generated by bison (YACC_DEPEND)
* harbour/source/macro/Makefile
* marked macrolex.c as YACC_DEPEND dependent
* harbour/source/compiler/Makefile
* marked complex.c as YACC_DEPEND dependent
2009-01-29 19:48 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/bin/postinst.sh
! added missing export in envvar setting.

View File

@@ -14,6 +14,9 @@ YACC_H = y_tab.h
YACC_OUTPUT = $(YACC_C:.c=.out)
YACC_OBJ = $(YACC_C:.c=$(OBJ_EXT))
YACC_HB_H := $(foreach h, $(YACC_HEADERS), $(HB_INC_COMPILE)/$(h))
ifneq ($(YACC_DEPEND),)
$(foreach f, $(YACC_DEPEND), $(f:.c=$(OBJ_EXT))) : $(YACC_C)
endif
endif
ifdef LEX_SOURCE

View File

@@ -8,6 +8,7 @@ ifneq ($(HB_COMPILER),)
include $(TOP)$(ROOT)config/global.cf
#include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/dir.cf
ifeq ($(DIR_RULE),)
# NOTE: The empty line directly before 'endef' HAVE TO exist!
# It causes that every commands will be separated by LF
define dir_mk
@@ -17,6 +18,7 @@ endef
DIRS_MK = $(foreach d, $(DIRS), $(if $(wildcard $(d)/Makefile),$(d),))
DIR_RULE = $(foreach dir, $(DIRS_MK), $(dir_mk))
endif
all : first

View File

@@ -28,7 +28,7 @@ CPPFLAGS = -I$($(HB_ARCHITECTURE)_$(HB_COMPILER)_GRANDP) -I$(_HB_INC_COMPILE)
CFLAGS = -i48 -O2 -mh -d -DHB_LONG_LONG_OFF
# BCC (at least version 3.1) requires that the output file be listed ahead of the input file
CC_RULE = $(CC) $(CPPFLAGS) $(CFLAGS) $(C_USR) $(CC_OUT)$(?F:.c=$(OBJ_EXT)) $(CC_IN) $?
CC_RULE = $(CC) $(CPPFLAGS) $(CFLAGS) $(C_USR) $(CC_OUT)$(<F:.c=$(OBJ_EXT)) $(CC_IN) $<
#Note: The empty line below HAVE TO exist!

View File

@@ -34,13 +34,13 @@ endif
# The rule to compile a C source file.
ifeq ($(CC_RULE),)
# Use default rule if architecture/compiler specific rule is not defined
CC_RULE = $(CC) $(CPPFLAGS) $(CFLAGS) $(C_USR) $(CC_IN) $? $(CC_OUT)$(?F:.c=$(OBJ_EXT))
CC_RULE = $(CC) $(CPPFLAGS) $(CFLAGS) $(C_USR) $(CC_IN) $< $(CC_OUT)$(<F:.c=$(OBJ_EXT))
endif
# The rule to compile a C++ source file.
ifeq ($(CPP_RULE),)
# Use default rule if architecture/compiler specific rule is not defined
CPP_RULE = $(CC) $(CPPFLAGS) $(CFLAGS) $(C_USR) $(CC_IN) $? $(CC_OUT)$(?F:.cpp=$(OBJ_EXT))
CPP_RULE = $(CC) $(CPPFLAGS) $(CFLAGS) $(C_USR) $(CC_IN) $< $(CC_OUT)$(<F:.cpp=$(OBJ_EXT))
endif

View File

@@ -13,6 +13,7 @@ ROOT = ../../
#YACC_FLAGS = -p hb_comp
YACC_SOURCE=harbour.y
YACC_DEPEND=complex.c
YACC_HEADERS=\
hbcomp.h \
hbcompdf.h \

View File

@@ -23,6 +23,7 @@ ROOT = ../../
#YACC_FLAGS = -p hb_macro
YACC_SOURCE=macro.y
YACC_DEPEND=macrolex.c
YACC_HEADERS=\
hbmacro.h \
hbsetup.h \