toolsandutils/buildsystem/extension/tools/bldex.mk
changeset 0 83f4b4db085c
child 1 d4b442d23379
equal deleted inserted replaced
-1:000000000000 0:83f4b4db085c
       
     1 # Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 # All rights reserved.
       
     3 # This component and the accompanying materials are made available
       
     4 # under the terms of "Eclipse Public License v1.0"
       
     5 # which accompanies this distribution, and is available
       
     6 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 #
       
     8 # Initial Contributors:
       
     9 # Nokia Corporation - initial contribution.
       
    10 #
       
    11 # Contributors:
       
    12 #
       
    13 # Description:
       
    14 # Generate some source files
       
    15 # Note that the YACC and LEX tools used expect to see Unix-style
       
    16 # path names and will hang horribly if given DOS pathnames
       
    17 # 
       
    18 #
       
    19 
       
    20 FIXSLASHES:=$(subst \,/,$(EPOCROOT))
       
    21 EPOCROOTABS:=$(patsubst %/,%,$(FIXSLASHES))
       
    22 EPOCROOT:=$(EPOCROOTABS)/
       
    23 
       
    24 YACC_VERSION:=$(EPOCROOT)epoc32/gcc/bin/bison
       
    25 LEX_VERSION:=$(EPOCROOT)epoc32/gcc/bin/flex
       
    26 
       
    27 include $(EPOCROOT)epoc32/tools/shell/$(notdir $(basename $(SHELL))).mk
       
    28 
       
    29 LEXSOURCE:=$(EXTENSION_ROOT)/$(LEXSOURCE)
       
    30 YACCSOURCE:=$(EXTENSION_ROOT)/$(YACCSOURCE)
       
    31 
       
    32 GENERATED_FILES= \
       
    33 	$(EPOCROOT)epoc32/build/rcomp/build/rcomp.cpp \
       
    34 	$(EPOCROOT)epoc32/build/rcomp/build/rcomp.hpp \
       
    35 	$(EPOCROOT)epoc32/build/rcomp/build/rcompl.cpp
       
    36 
       
    37 $(EPOCROOT)epoc32/build/rcomp/build/rcompl.cpp : $(LEXSOURCE)
       
    38 	$(call createdir,$(EPOCROOT)epoc32/build/rcomp/build)
       
    39 	$(LEX_VERSION) -t $< > $@
       
    40 
       
    41 $(EPOCROOT)epoc32/build/rcomp/build/rcomp.cpp $(EPOCROOT)epoc32/build/rcomp/build/rcomp.hpp : $(YACCSOURCE)
       
    42 	$(call createdir,$(EPOCROOT)epoc32/build/rcomp/build)
       
    43 	$(YACC_VERSION) -d -o $@ $<
       
    44 
       
    45 do_nothing:
       
    46 	
       
    47 
       
    48 #
       
    49 # The targets invoked by bld...
       
    50 #
       
    51 
       
    52 # Do the work in the MAKMAKE target, in the hope of getting the files
       
    53 # created in time to scan them in the processing of RCOMP.MMP
       
    54 
       
    55 MAKMAKE : $(GENERATED_FILES)
       
    56 
       
    57 BLD : MAKMAKE
       
    58 
       
    59 SAVESPACE : MAKMAKE
       
    60 
       
    61 CLEAN : 
       
    62 	$(call remove,$(GENERATED_FILES))
       
    63 
       
    64 FREEZE : do_nothing
       
    65 
       
    66 LIB : do_nothing
       
    67 
       
    68 CLEANLIB : do_nothing
       
    69 
       
    70 RESOURCE : do_nothing
       
    71 
       
    72 FINAL : do_nothing
       
    73 
       
    74 RELEASABLES : do_nothing
       
    75