Subversion Repositories DevTools

Rev

Rev 237 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

###############################################################################
# Copyright (c) VIX TECHNOLOGY (AUST) LTD
#
# File:         TOOLSET/borland.rul[e]
# Contents:     Rules to build Borland C++
#
###############################################################################


###############################################################################
#..     Parse user options
#       Global options already parsed
#       These options extend the global options
#
ifdef OPTIONS
endif

###############################################################################
#
#       Make MAcro to assist in building Borland Project Files
#       Arguments
#               $1      - Name of the project file
#               $2      - Path to the project
#               $3      - Name of makefile
#               $4      - Name of logfile
#
#
#       The following script will
#               Setup the PATH to include DLLs
#               Convert the project file into a makefile
#               cd to the target directory
#               Run make on the makefile
#                       Create ilink32.cfg to create local defs
#                       Force DCC32 to use Quiet mode
#               Report errors
#
define MakeProject
        ( $(rm) -f $(4); \
        . $(INTERFACEDIR)/set_$(GBE_PLATFORM).sh; \
        rm -f $(3); \
        echo "[BORLAND] Building Project: $(2)/$(1)"; \
        echo "[BORLAND] Converting Project file to Makefile: $(1)"; \
        bpr2mak.exe  -o$(3) "$(2)/$(1)"  >$(4) 2>&1; \
        ret=$$?; \
        if [ $$ret -gt 0 ] ; then \
        echo "Error creating Makefile"; \
        echo >>$(4); \
        $(GBE_BIN)/cat $(4); \
        exit $$ret; \
        fi; \
        echo "[BORLAND] Running Makefile: $(1)"; \
        cd "$(2)"; \
        echo '-L"$(BCB)/Lib/Release"' > ilink32.cfg; \
        make.exe  -f$(CURDIR)/$(3) -DDCC32="dcc32 -Q" >$(CURDIR)/$(4) 2>&1; \
        ret=$$?; \
        rm -f ilink32.cfg; \
        cd $(CURDIR); \
        echo >>$(4); \
        $(GBE_BIN)/cat $(4); \
        exit $$ret )
endef
#