Changeset 120


Ignore:
Timestamp:
May 11, 2003, 1:48:35 AM (22 years ago)
Author:
bird
Message:

Staging.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile

    • Property cvs2svn:cvs-rev changed from 1.19 to 1.20
    r119 r120  
    3434export PATH_BIN        = $(PATH_TOP)/bin/$(BUILD_PLATFORM)/$(BUILD_MODE)
    3535export PATH_BIND       = $(PATH_TOPD)/bin/$(BUILD_PLATFORM)/$(BUILD_MODE)
    36 ifndef PATH_OBJ
    3736export PATH_OBJ        = $(PATH_TOP)/obj/$(BUILD_PLATFORM)/$(BUILD_MODE)
    3837export PATH_OBJD       = $(PATH_TOPD)/obj/$(BUILD_PLATFORM)/$(BUILD_MODE)
    39 endif
    4038export PATH_BUILTTOOLS = $(PATH_OBJ)/builttools
    4139export PATH_BUILTTOOLSD= $(PATH_OBJD)/builttools
     
    115113
    116114all-logged:     \
    117         all-start \
     115        all-banner-start \
    118116                all-env \
    119117                all-sanity \
    120118                all-preload \
    121                 all-builttools-initial \
    122                 all-versionstamps \     
     119                all-versionstamps \
    123120                all-symlinks \
    124121                \
    125         all-binutils \
    126                 all-gcc \
    127         all-emx \
     122        all-stage1 \
     123        all-stage2 \
    128124                \
    129125                all-install \
    130126                \
    131                 all-symlinks-unlink \
    132         all-ended
    133 
    134                
    135 all-start:
     127                all-symlinks-unlink
     128        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     129        @echo "+ Make Ended Successfully: $(shell date)"
     130        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     131
     132#
     133# banners
     134#
     135               
     136all-banner-start:
    136137        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
    137138        @echo "+ Make started: $(shell date)"
    138139        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
    139        
    140                                                        
    141 all-ended:
    142         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
    143         @echo "+ Make ended: $(shell date)"
    144         @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
    145                                                        
     140               
     141all-banner-stage1:
     142        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     143        @echo "+ Stage 1 - starting: $(shell date)"
     144        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     145
     146all-banner-stage2:
     147        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     148        @echo "+ Stage 2 - starting: $(shell date)"
     149        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     150       
     151all-banner-builttools-initial:
     152        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     153        @echo "+ Initializing builttools tree"
     154        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     155               
     156all-banner-builttools-stage2:
     157        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     158        @echo "+ Copying stage2 builttools"
     159        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     160
     161all-banner-install:
     162        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     163        @echo "+ Install - starting: $(shell date)"
     164        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     165       
     166all-banner-install-done:
     167        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     168        @echo "+ Install - done: $(shell date)"
     169        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     170
     171               
     172#
     173# Sanity and environment dumps - to make it easier to figure out make bugs.
     174#
    146175       
    147176all-env:       
     
    200229        @echo "    LIBRARY_PATH         = $(LIBRARY_PATH)"
    201230        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     231        @echo "Content of PATH_OBJ:"
     232        -ls -la $(PATH_OBJ)/
     233        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     234        @echo "Content of PATH_BIN:"
     235        -ls -la $(PATH_BIN)/
     236        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     237       
    202238       
    203239all-sanity:
     
    233269        @echo "ok"
    234270       
    235                                                                                
     271
     272#
     273# Preload tools we commonly use this speeds up stuff.
     274#                                                                       
    236275PRELOADED_TOOLS = bin/sh.exe bin/echo.exe bin/true.exe usr/bin/test.exe usr/bin/expr.exe \
    237276     usr/bin/gawk.exe usr/bin/sed.exe bin/rm.exe bin/cat.exe bin/cp.exe
     
    244283                emxload -e $(UNIXROOT)/$$tool;  \
    245284        done
    246         emxload -e gcc.exe g++.exe ld.exe cc1.exe as.exe cc1plus.exe cpp0.exe ar.exe
     285        emxload -e gcc.exe g++.exe ld.exe cc1.exe as.exe cc1plus.exe ar.exe cpp0.exe ld.exe
    247286endif
    248287        @echo ""
    249        
    250 
    251 # we do some version stamping/branding of certain files. It's mainly to
    252 # distiguish releases and to tell everyone that they're from Innotek. :)
     288
     289#
     290# Version stamping/branding.
     291#       Update various version strings which are printed from the tools to tell
     292#       the build date and that's our built. This helps us tell releases apart.
    253293#
    254294# IMPORTANT! Take care not to commit the changed files
     
    262302
    263303
    264 
    265 all-install:    \
    266         gcc-install
    267 #       emx-install
    268 #       binutils-install
    269 
    270        
     304#
     305# Stages
     306#       A rebuild with the new toolsuite is usually required when there is ABI
     307#       changes and other vital changes done to the tools.
     308#       
     309                                               
     310all-stage1: $(PATH_OBJ)/.all-stage1
     311$(PATH_OBJ)/.all-stage1:
     312        $(MAKE) -f $(MAKEFILE) all-stage1-it
     313        echo "$(@F)" > $(PATH_OBJ)/.last-stage
     314        touch $@
     315        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     316        @echo "+ Stage 1 - done: $(shell date)"
     317        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     318
     319all-stage1-it: \       
     320                all-banner-stage1 \
     321                all-builttools-initial \
     322        all-emx \
     323        all-binutils \
     324                all-gcc
     325               
     326
     327all-stage2: $(PATH_OBJ)/.all-stage2
     328$(PATH_OBJ)/.all-stage2: \
     329                $(PATH_OBJ)/.all-stage2.save-stage1
     330        $(MAKE) -f $(MAKEFILE) all-stage2-it
     331        echo "$(@F)" > $(PATH_OBJ)/.last-stage
     332        touch $@
     333        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     334        @echo "+ Stage 2 - done: $(shell date)"
     335        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     336
     337$(PATH_OBJ)/.all-stage2.save-stage1:
     338        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     339        @echo "+ Saving Stage 1 - Starting: $(shell date)"
     340        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     341ifeq "$(BUILD_PLATFORM)" "OS2"
     342        -for prog in `emxload -l | sed -e 's/\\/\//g' -e 's/.*³[\t ]*//' | grep '$(PATH_OBJD)'`; \
     343        do \
     344                emxload -u $$prog; \
     345        done
     346endif
     347        $(MAKE) -f $(MAKEFILE) all-builttools-stage2
     348        rm -Rf $(PATH_OBJ)/stage1
     349        mkdir -p $(PATH_OBJ)/stage1
     350        if [ -d $(PATH_OBJ)/gcc ] ; then mv $(PATH_OBJ)/gcc $(PATH_OBJ)/stage1/gcc; fi
     351        if [ -d $(PATH_OBJ)/emx ] ; then mv $(PATH_OBJ)/emx $(PATH_OBJ)/stage1/emx; fi
     352        $(MAKE) -f $(MAKEFILE) all-preload
     353        touch $@
     354        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     355        @echo "+ Saving Stage 1 - done: $(shell date)"
     356        @echo "+++++++++++++++++++++++++++++++++++++++++++++++++++"
     357       
     358all-stage2-it: \
     359                all-banner-stage2 \
     360        all-emx \
     361        all-binutils \
     362                all-gcc
     363
     364
     365#
     366# Install to bin tree makeing it ready for packing.
     367#
     368all-install: \
     369        all-banner-install \
     370        gcc-install     \
     371        emx-install \
     372        all-banner-install-done \
     373
     374       
     375#
     376# Generate all the diffs we have to supply.
     377#
    271378all-diff: \
    272379        gcc-diff \
     
    275382       
    276383       
     384       
     385       
     386       
     387       
    277388###############################################################################
    278389###############################################################################
     
    284395###############################################################################
    285396###############################################################################
    286 .PHONY: all-builttools-initial all-builttools-dirs
     397.PHONY: all-builttools-initial all-builttools-dirs all-builttools-clean all-builttools-stage2
     398               
    287399all-builttools-initial: \
     400                all-banner-builttools-initial \
     401                all-builttools-clean \
    288402        all-builttools-dirs \
    289403                $(PATH_BUILTTOOLS)/bin/dllar.cmd \
    290 
    291                
     404               
     405all-builttools-clean:
     406        rm -Rf $(PATH_BUILTTOOLS)
     407       
    292408all-builttools-dirs:
    293409        mkdir -p $(PATH_BUILTTOOLS)/bin $(PATH_BUILTTOOLS)/lib $(PATH_BUILTTOOLS)/include
     
    296412        cp $< $@
    297413
    298 
     414all-builttools-stage2: \
     415                all-banner-builttools-stage2 \
     416                $(PATH_BUILTTOOLS)/bin/dllar.cmd \
     417                gcc-builttools-stage2 \
     418                emx-builttools-stage2 \
     419                all-builttools-stage2-libs
     420               
     421all-builttools-stage2-libs:
     422        -for aoutlib in `find $(PATH_BUILTTOOLS) -name "*.a" | sed -e 's/\.a$$//' `; \
     423        do \
     424                if [ ! -f $(aoutlib).lib ]; then \
     425                        echo "  $${aoutlib}"; \
     426                        $(PATH_BUILTTOOLS)/bin/emxomf.exe $${aoutlib}.a; \
     427                fi;\
     428        done
    299429
    300430
     
    467597gcc/libobjc \
    468598
     599# Here is a problem, we can't regenerate binutils makefiles when symlinked into
     600# gcc. At least not yet. The result is messed up severely.
    469601not_yet =\
    470602gcc/bfd \
     
    553685# TODO: Andy, on Linux --enable-clh result in linking errors.
    554686
    555        
    556687# Install the GCC build
    557688#       Repeating the prefix doesn't hurt anybody.
    558689gcc-install-it:
    559690        $(MAKE) prefix=$(PATH_BIND)/usr install
    560        
    561 
    562        
     691
     692
     693
    563694# easy, update src/gcc/gcc/version.c
    564695gcc-versionstamps:
     
    569700        rm -f $(PATH_TOP)/src/gcc/gcc/version.tmp.c
    570701
     702
     703# Install to builttools directory.     
     704gcc-builttools-stage2:
     705        $(MAKE) -C $(PATH_OBJ)/gcc prefix=$(PATH_BUILTTOOLSD) install
    571706
    572707               
     
    728863###############################################################################
    729864###############################################################################
    730 all-emx  emx:
    731         echo "Successfully build EMX."
    732         echo "Warning!!! EMX not yet done!"
    733        
     865all-emx  emx: \
     866                emx-build
     867        @echo "Successfully build EMX."
     868       
     869# Some helpers.         
     870# TODO: Change OUT and INS to the right ones. Currently not possible as
     871#       doing such breaks the rules generating.
     872EMX_MODE = dbg
     873ifeq "$(BUILD_MODE)" "RELEASE"
     874EMX_MODE = opt
     875endif
     876EMX_OUT  = out/
     877EMX_INS  = out/install/
     878EMX_MASM = $(PATH_TOP)/tools/x86.os2/masm/v6.0/binp/ml.exe
     879EMX_DEFINES = OUT=$(EMX_OUT) INS=$(EMX_INS) MODE=$(EMX_MODE) "ASM=$(EMX_MASM) -c"
    734880                                                                       
     881# build the components. (directory changer rules)
     882.PHONY: emx-build emx-install emx-configure
     883emx-build emx-install emx-configure:
     884        mkdir -p $(PATH_OBJ)/emx
     885        $(MAKE) -C $(PATH_TOP)/src/emx -f $(MAKEFILE) $@-it
     886
     887# This is the configure equivalent.     
     888emx-configure-it: $(PATH_TOP)/src/emx/out/genrules.smak
     889$(PATH_TOP)/src/emx/$(EMX_OUT)genrules.smak:
     890        rm -f $(PATH_TOP)/src/emx/out/genrules.smak
     891        $(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) $(EMX_OUT)genrules.smak
     892       
     893emx-build-it: \
     894                $(PATH_TOP)/src/emx/$(EMX_OUT)genrules.smak
     895        $(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) all
     896
     897emx-install-it: \
     898                $(PATH_TOP)/src/emx/$(EMX_OUT)genrules.smak
     899        $(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) install
     900
     901                                       
     902# easy, update same stuff in a bunch of files.
     903EMX_FILE_VER = \
     904emxbind/emxbind.h emxcat/emxcat.c emxdoc/emxdoc.c emxexp/emxexp.c emximp/emximp.c \
     905emxload/emxload.c emxomf/emxaout.c emxomf/emxomf.c emxomf/emxomfar.c emxomf/emxomfld.c \
     906emxomf/listomf.c emxstack/emxstack.c emxtsf/emxtsf.c os2/version.h
     907emx-versionstamps:
     908        @echo "Version stamping EMX..."
     909        @for file in $(EMX_FILE_VER); \
     910    do \
     911                echo "   src/emx/src/$$file" && \
     912                if (cp -f $(PATH_TOP)/src/emx/src/$$file $(PATH_TOP)/src/emx/src/$$file.tmp && \
     913                        sed -e '/#[\t ]*define[\t ]*VERSION[\t ]*/s/"0\.9d.*"/"0.9d $(INNOTEK_VERSION)"/' \
     914                                $(PATH_TOP)/src/emx/src/$$file.tmp > $(PATH_TOP)/src/emx/src/$$file && \
     915                        rm -f $(PATH_TOP)/src/emx/src/$$file.tmp) ; \
     916                then true; \
     917                else exit 1; \
     918                fi; \
     919        done
     920
    735921                                                                       
    736                                                                        
    737 # do nothing *yet*.                             
    738 emx-versionstamps:
    739         echo "Todo Versionstamping EMX tools and such."
    740                                                                        
    741                                                                        
     922# Install the compiled emx stuff to builttools.
     923emx-builttools-stage2: 
     924        $(MAKE) -C $(PATH_TOP)/src/emx $(EMX_DEFINES) INS=$(PATH_BUILTTOOLS)/  install
     925
     926
    742927# Generate diffs for Binutils (part of packing).
    743928.PHONY: binutils-diff $(ALL_PREFIX)/src/diffs/emx-$(EMX_VERSION).diff
Note: See TracChangeset for help on using the changeset viewer.