Ignore:
Timestamp:
Nov 7, 2017, 7:12:52 AM (8 years ago)
Author:
Ben Rietbroek
Message:

Improved language selection [v1.1.1-testing]

The old method copied the language specific files to a central location
before starting the build. This is a bit annoying when using version
control because the copied files get marked as changed, blurring the
current state of the work directory. Also, the specific language files
from the last build are always the active ones.

The new method conditionally includes the specific language files based
upon the BLD_LANG definition, which is passed on the cli. No more file
copying for specific language builds.

CAUTION:
This is a testbuild !
AirBoot uses the BIOS to access disks and a small coding error can trash
partition tables or other vital disk structures. You are advised to make
backups of TRACK0 and EBRs before using this testbuild. More info at:
https://rousseaux.github.io/netlabs.air-boot/pdf/AirBoot-v1.1.0-manual.pdf

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bootcode/Makefile

    r185 r186  
    160160# -Zd   = line number debug info
    161161# -Zi   = symbolic debug info
    162 ASM_FLAGS_D0=-DDEBUG_LEVEL=$(DEBUG_LEVEL) -DJWASM -DBLD_LANG="'$(%BLD_LANG)'" $(%JWASM_DEFINES) -q -W0 -Cp -zcw -Fo$^. -Sa $(JWASM_LIST_FILE) -Fw$^&.err
    163 ASM_FLAGS_D1=-DDEBUG_LEVEL=$(DEBUG_LEVEL) -DJWASM -DBLD_LANG="'$(%BLD_LANG)'" $(%JWASM_DEFINES) -q -W4 -Cp -zcw -Fo$^. -Sa $(JWASM_LIST_FILE) -Fw$^&.err
    164 ASM_FLAGS_D2=-DDEBUG_LEVEL=$(DEBUG_LEVEL) -DJWASM -DBLD_LANG="'$(%BLD_LANG)'" $(%JWASM_DEFINES) -q -WX -Cp -zcw -Fo$^. -Sa $(JWASM_LIST_FILE) -Fw$^&.err
     162ASM_FLAGS_D0=-DDEBUG_LEVEL=$(DEBUG_LEVEL) -DJWASM -DBLD_LANG="$(%BLD_LANG)" $(%JWASM_DEFINES) -q -W0 -Cp -zcw -Fo$^. -Sa $(JWASM_LIST_FILE) -Fw$^&.err
     163ASM_FLAGS_D1=-DDEBUG_LEVEL=$(DEBUG_LEVEL) -DJWASM -DBLD_LANG="$(%BLD_LANG)" $(%JWASM_DEFINES) -q -W4 -Cp -zcw -Fo$^. -Sa $(JWASM_LIST_FILE) -Fw$^&.err
     164ASM_FLAGS_D2=-DDEBUG_LEVEL=$(DEBUG_LEVEL) -DJWASM -DBLD_LANG="$(%BLD_LANG)" $(%JWASM_DEFINES) -q -WX -Cp -zcw -Fo$^. -Sa $(JWASM_LIST_FILE) -Fw$^&.err
    165165# Workaround for JWasm list-file generation.
    166166# Generate the list-file on a local drive so JWasm doen't take forever.
     
    289289
    290290# -----------------------------------------------------------------------------
    291 # LANGUAGE SETUP
    292 # -----------------------------------------------------------------------------
    293 # Setup the relevant language files.
    294 # This is done by generating include-files for the specified language.
    295 # This is a 'pre-action' before assembling the AiR-BOOT.ASM source.
    296 # -----------------------------------------------------------------------------
    297 langsetup: .SYMBOLIC .MULTIPLE
    298 # Default to development language is none defined.
    299 !if "$(%BLD_LANG)"==""
    300 #~ %BLD_LANG=DEV_BLD_LANG
    301 !endif
    302 # Generate include-files for specified language.
    303 # After this, the Assembly sources are setup for the specified language.
    304 # Note that this target is not used as a 'dependency' but 'called' explicitly
    305 # by the $(BLD_LANGUAGES) target.
    306 !ifdef __LINUX__
    307         @bash -c 'echo -e "include text/$(%BLD_LANG)/mbr.asm\r">   text$(DS)txtmbr.asm'
    308         @bash -c 'echo -e "include text/$(%BLD_LANG)/menus.asm\r"> text$(DS)txtmenus.asm'
    309         @bash -c 'echo -e "include text/$(%BLD_LANG)/other.asm\r"> text$(DS)txtother.asm'
    310 !else
    311         @echo include text/$(%BLD_LANG)/mbr.asm>   text$(DS)txtmbr.asm
    312         @echo include text/$(%BLD_LANG)/menus.asm> text$(DS)txtmenus.asm
    313         @echo include text/$(%BLD_LANG)/other.asm> text$(DS)txtother.asm
    314 !endif
    315 
    316 
    317 # -----------------------------------------------------------------------------
    318291# BUILD ALL LANGUAGES
    319292# -----------------------------------------------------------------------------
     
    328301        @%MAKE clean
    329302        @%MAKE rmbin
    330         @%MAKE langsetup
    331303        @%MAKE $(TARGET)
    332304# Checking %AB_DEV does not work from target 'dev:' when non-recursively
Note: See TracChangeset for help on using the changeset viewer.