Files
harbour-core/harbour/config/os2/global.cf
Maurilio Longo 191fe46098 2009-01-09 12:55 UTC+0100 Maurilio Longo (maurilio.longo@libero.it)
* harbour/config/os2/global.cf
    * simplified and fixed an error in deleting files
  * harbour/source/rtl/hbffind.c
    ! fixed hb_fsFindNextLow() in OS/2 which was using stat to find file size, but
      as it seems, st_size contains garbage. Removed call to stat() and used
      buffer returned by DosFindFirst().
2009-01-09 12:00:57 +00:00

84 lines
1.6 KiB
CFEngine3

#
# $Id$
#
all : first
HB_GT_LIST=\
gtcgi \
gtos2 \
gtpca \
gtstd \
# verify if GT drivers exist
#HB_GT_LIBS := $(foreach gt, $(HB_GT_LIST), $(if $(wildcard $(TOP)$(ROOT)source/rtl/$(gt)),$(gt),))
# temporary workaround for some possible problems with some GNU make versions
HB_GT_LIBS := $(HB_GT_LIST)
ifeq ($(SHLVL),) # An OS/2 command shell
ARCH_DIR = $(HB_ARCH)
OS2_ARCH_DIR = $(subst /,\,$(HB_ARCH))
OS2_LIB_DIR = $(subst /,\,$(LIB_DIR))
OS2_LIB_PATH = $(subst /,\,$(LIB_PATH))
OS2_LIB_ARCH = $(subst /,\,$(LIB_ARCH))
DIRSEP = $(subst /,\,\)
MK = $(subst /,\,$(subst \~,~,$(MAKE)))
ifeq ($(OS2_SHELL),)
# Not running on OS/2 (which comes in handy for 'make -r clean')
RM = del /q
else
# Running on OS/2
RM = del /n
endif
RD = rmdir
CP = copy
MV = move
MD = md
ifeq ($(LIB_PATH),)
dirbase::
-FOR %d IN ($(HB_ARCHITECTURE) $(OS2_ARCH_DIR)) DO IF NOT EXIST %d $(MD) %d
clean::
-IF EXIST $(OS2_ARCH_DIR)\*.* $(RM) $(OS2_ARCH_DIR)\*.*
-FOR %d IN ($(OS2_ARCH_DIR) $(HB_ARCHITECTURE)) DO IF EXIST %d $(RD) %d
else
dirbase::
-FOR %d IN ($(HB_ARCHITECTURE) $(OS2_ARCH_DIR) $(OS2_LIB_PATH) $(OS2_LIB_DIR)) DO IF NOT EXIST %d $(MD) %d
clean::
-IF EXIST $(OS2_ARCH_DIR)\*.* $(RM) $(OS2_ARCH_DIR)\*.*
-FOR %d IN ($(OS2_ARCH_DIR) $(HB_ARCHITECTURE)) DO IF EXIST %d $(RD) %d
-IF EXIST $(OS2_LIB_ARCH) $(RM) $(OS2_LIB_ARCH)
endif
else # bash
ARCH_DIR = $(HB_ARCH)
MK = $(MAKE)
RM = rm -f
RD = rm -f -r
CP = cp -f
MV = mv -f
MD = mkdir
MDP = mkdir -p
OS2_LIB_ARCH = $(LIB_ARCH)
dirbase::
@[ -d $(ARCH_DIR) ] || $(MDP) $(ARCH_DIR)
@[ -z $(LIB_DIR) ] || [ -d $(LIB_DIR) ] || $(MDP) $(LIB_DIR)
clean::
-$(RD) $(ARCH_DIR) $(LIB_ARCH)
endif