From a3601c83bcee12872e0236694154fa87c87c80ca Mon Sep 17 00:00:00 2001 From: "Gonzalo A. Diethelm" Date: Tue, 8 Jun 1999 01:21:08 +0000 Subject: [PATCH] ChangeLogTag:Mon Jun 07 20:20:32 1999 Gonzalo A. Diethelm --- harbour/ChangeLog | 16 ++++++++++++++++ harbour/config/bin.cf | 4 +--- harbour/config/c.cf | 6 ++++-- harbour/config/dir.cf | 4 ++++ harbour/config/global.cf | 17 +++++++++++------ harbour/config/install.cf | 4 ++++ harbour/config/lib.cf | 4 +--- harbour/config/test.cf | 4 +--- harbour/config/win32/gcc.cf | 10 +++++----- harbour/config/win32/global.cf | 2 +- harbour/config/win32/msvc.cf | 10 +++++----- harbour/config/win32/rules.cf | 2 +- 12 files changed, 54 insertions(+), 29 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 7f389b0093..a2de5a4def 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -1,3 +1,19 @@ +Mon Jun 07 20:20:32 1999 Gonzalo A. Diethelm + + * config/bin.cf: + * config/c.cf: + * config/dir.cf: + * config/global.cf: + * config/install.cf: + * config/lib.cf: + * config/test.cf: + * config/win32/gcc.cf: + * config/win32/global.cf: + * config/win32/msvc.cf: + * config/win32/rules.cf: + Updated rules so they work under WinNT CMD.EXE without any Unix + utilities installed. + 19990607-19:45 EDT David G. Holm * include/extend.h - Moved "#include " to include/types.h diff --git a/harbour/config/bin.cf b/harbour/config/bin.cf index 36750a95ad..3aa6266305 100644 --- a/harbour/config/bin.cf +++ b/harbour/config/bin.cf @@ -13,9 +13,7 @@ ALL_OBJS = $(ALL_C_OBJS) $(ALL_PRG_OBJS) first : dirbase descend descend : - @cd $(ARCH_DIR); \ - $(MAKE) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' $(EXE_NAME); \ - cd $(GRANDP) + $(MAKE) -C $(ARCH_DIR) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' $(EXE_NAME) $(EXE_NAME) : $(ALL_OBJS) $(LD_RULE) diff --git a/harbour/config/c.cf b/harbour/config/c.cf index 109b139524..fdc17819b2 100644 --- a/harbour/config/c.cf +++ b/harbour/config/c.cf @@ -7,7 +7,8 @@ C_OBJS = $(C_SOURCES:.c=$(OBJ_EXT)) MAIN_OBJ = $(C_MAIN:.c=$(OBJ_EXT)) ifdef YACC_SOURCE -YACC_C = $(shell echo $(YACC_SOURCE) | cut -c1-4)_y.c +YACC_BASE = $(YACC_SOURCE:.y=) +YACC_C = $(YACC_BASE)y.c YACC_H_TMP = $(YACC_C:.c=.h) YACC_H = y_tab.h YACC_OUTPUT = $(YACC_C:.c=.out) @@ -15,7 +16,8 @@ YACC_OBJ = $(YACC_C:.c=$(OBJ_EXT)) endif ifdef LEX_SOURCE -LEX_C = $(shell echo $(LEX_SOURCE) | cut -c1-4)_l.c +LEX_BASE = $(LEX_SOURCE:.l=) +LEX_C = $(LEX_BASE)l.c LEX_OBJ = $(LEX_C:.c=$(OBJ_EXT)) endif diff --git a/harbour/config/dir.cf b/harbour/config/dir.cf index bd78432813..3940ad7c62 100644 --- a/harbour/config/dir.cf +++ b/harbour/config/dir.cf @@ -5,8 +5,12 @@ all : first first clean install :: +ifeq (Windows,$(findstring Windows,$(OS))) + @cmd /c FOR /D %d IN ($(DIRS)) DO @$(MAKE) -C %d $@ +else # ! Windows @for d in $(DIRS); do \ if [ -d $$d ]; then \ $(MAKE) -C $$d $@; \ fi \ done +endif # ! Windows diff --git a/harbour/config/global.cf b/harbour/config/global.cf index 85430e043e..baa8d09736 100644 --- a/harbour/config/global.cf +++ b/harbour/config/global.cf @@ -7,17 +7,22 @@ all : first GRANDP = ../../ ARCH = $(HB_ARCHITECTURE)/$(HB_COMPILER) +ifeq (Windows,$(findstring Windows,$(OS))) +ARCH_DIR = $(subst /,\\,$(ARCH))\\ +else # ! Windows ARCH_DIR = $(ARCH)/ +endif include $(TOP)$(ROOT)config/$(ARCH).cf dirbase:: - @if [ ! -d $(HB_ARCH) ]; then \ - $(MD) $(HB_ARCH); \ - fi; \ - if [ ! -d $(ARCH_DIR) ]; then \ - $(MD) $(ARCH_DIR); \ - fi +ifeq (Windows,$(findstring Windows,$(OS))) + -$(MD) $(HB_ARCHITECTURE) + -$(MD) $(ARCH_DIR) >NUL +else # ! Windows + @[ -d $(HB_ARCHITECTURE) ] || $(MD) $(HB_ARCHITECTURE) ]; \ + [ -d $(ARCH_DIR) ] || $(MD) $(ARCH_DIR) ] +endif clean:: $(RM) -r $(ARCH_DIR) diff --git a/harbour/config/install.cf b/harbour/config/install.cf index d6198b2952..a248d0794b 100644 --- a/harbour/config/install.cf +++ b/harbour/config/install.cf @@ -3,6 +3,9 @@ # install:: first +ifeq (Windows,$(findstring Windows,$(OS))) + @cmd /c FOR %f IN ($(INSTALL_OBJS)) DO @COPY %f $(INSTALL_DIR) +else # ! Windows @if [ ! -d $(INSTALL_DIR) ]; \ then \ echo "! Can't install, path not found:" $(INSTALL_DIR); \ @@ -18,3 +21,4 @@ install:: first fi \ done \ fi +endif # ! Windows diff --git a/harbour/config/lib.cf b/harbour/config/lib.cf index 6cdf239222..658558912c 100644 --- a/harbour/config/lib.cf +++ b/harbour/config/lib.cf @@ -14,9 +14,7 @@ ALL_OBJS = $(ALL_C_OBJS) $(ALL_PRG_OBJS) first : dirbase descend descend : - @cd $(ARCH_DIR); \ - $(MAKE) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' $(LIB_NAME); \ - cd $(GRANDP) + $(MAKE) -C $(ARCH_DIR) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' $(LIB_NAME) $(LIB_NAME) : $(ALL_OBJS) $(AR_RULE) diff --git a/harbour/config/test.cf b/harbour/config/test.cf index 1c33574410..2985775327 100644 --- a/harbour/config/test.cf +++ b/harbour/config/test.cf @@ -8,6 +8,4 @@ include $(TOP)$(ROOT)config/prg.cf first : dirbase descend descend : - @cd $(ARCH_DIR); \ - $(MAKE) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' $(PRG_EXES); \ - cd $(GRANDP) + $(MAKE) -C $(ARCH_DIR) -f $(GRANDP)Makefile 'TOP=$(GRANDP)' $(PRG_EXES) diff --git a/harbour/config/win32/gcc.cf b/harbour/config/win32/gcc.cf index 1513db7e39..893d1d1c60 100644 --- a/harbour/config/win32/gcc.cf +++ b/harbour/config/win32/gcc.cf @@ -2,7 +2,7 @@ # $Id$ # -include $(TOP)$(ROOT)config/$(ARCHITECTURE)/global.cf +include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf OBJ_EXT = .o EXE_EXT = .exe @@ -11,13 +11,13 @@ LIB_EXT = .a CC = gcc CC_OUT = -o -CPPFLAGS = -DDEBUG -I. -I$(INC_DIR) +CPPFLAGS = -DDEBUG -I. -I$(HB_INC_DIR) CFLAGS = -Wall -g LD = gcc LD_OUT = -o -ifdef LIB_DIR -LDFLAGS = -L$(LIB_DIR) +ifdef HB_LIB_DIR +LDFLAGS = -L$(HB_LIB_DIR) endif LINKLIBS = $(foreach lib, $(LIBS), -l$(lib)) # LINKLIBS += -lm @@ -26,4 +26,4 @@ AR = ar ARFLAGS = AR_RULE = $(AR) $(ARFLAGS) r $@ $^ || $(RM) $@ -include $(TOP)$(ROOT)config/$(ARCHITECTURE)/rules.cf +include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/rules.cf diff --git a/harbour/config/win32/global.cf b/harbour/config/win32/global.cf index d1bdd8fed7..12b5441fd6 100644 --- a/harbour/config/win32/global.cf +++ b/harbour/config/win32/global.cf @@ -5,4 +5,4 @@ RM = rm -f CP = cp -f MV = mv -f -MD = mkdir -p +MD = mkdir diff --git a/harbour/config/win32/msvc.cf b/harbour/config/win32/msvc.cf index 086ed9f1d3..3fb90877ce 100644 --- a/harbour/config/win32/msvc.cf +++ b/harbour/config/win32/msvc.cf @@ -2,7 +2,7 @@ # $Id$ # -include $(TOP)$(ROOT)config/$(ARCHITECTURE)/global.cf +include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/global.cf OBJ_EXT = .obj EXE_EXT = .exe @@ -11,13 +11,13 @@ LIB_EXT = .lib CC = cl.exe CC_OUT = -Fo -CPPFLAGS = -DDEBUG -I. -I$(INC_DIR) +CPPFLAGS = -DDEBUG -I. -I$(HB_INC_DIR) CFLAGS = -W0 -Zi # -W4 for max warnings LD = cl.exe LD_OUT = -Fe -ifdef LIB_DIR -LDFLAGS += -link -LIBPATH:$(LIB_DIR) +ifdef HB_LIB_DIR +LDFLAGS += -link -LIBPATH:$(HB_LIB_DIR) endif LINKLIBS = $(foreach lib, $(LIBS), $(lib)$(LIB_EXT)) @@ -25,4 +25,4 @@ AR = lib.exe ARFLAGS = AR_RULE = $(AR) $(ARFLAGS) /out:$@ $^ || $(RM) $@ -include $(TOP)$(ROOT)config/$(ARCHITECTURE)/rules.cf +include $(TOP)$(ROOT)config/$(HB_ARCHITECTURE)/rules.cf diff --git a/harbour/config/win32/rules.cf b/harbour/config/win32/rules.cf index 8f3aeaac59..5c510f5ed1 100644 --- a/harbour/config/win32/rules.cf +++ b/harbour/config/win32/rules.cf @@ -12,7 +12,7 @@ LEX_FLAGS = -i # How to run Harbour. HB = harbour$(EXE_EXT) -HB_FLAGS = -n -q -I$(TOP) -I$(INC_DIR) +HB_FLAGS = -n -q -I$(TOP) -I$(HB_INC_DIR) # The rule to link an executable. LD_RULE = $(LD) $(CFLAGS) $(LD_OUT)$@ $^ $(LDFLAGS) $(LINKLIBS)