|
1 # |
|
2 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 # All rights reserved. |
|
4 # This component and the accompanying materials are made available |
|
5 # under the terms of "Eclipse Public License v1.0" |
|
6 # which accompanies this distribution, and is available |
|
7 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 # |
|
9 # Initial Contributors: |
|
10 # Nokia Corporation - initial contribution. |
|
11 # |
|
12 # Contributors: |
|
13 # |
|
14 # Description: |
|
15 # |
|
16 |
|
17 # This file converts the input stored in $(OPTIONS) variable into several different variables |
|
18 # depending in the content. |
|
19 # |
|
20 # $(OPTIONS) variable is assumed to contain following syntax: |
|
21 # -X,Y filename.ext -X filename.ext |
|
22 # |
|
23 # where X and Y are numbers for the color depth. |
|
24 # The first number is the actual color depth of the file and the second is the color depth |
|
25 # of the mask file. The second number (and the comma) may or may not be defined. |
|
26 # |
|
27 # |
|
28 # Options will be splitted into variables of $(FILES) which contains the filenames after the |
|
29 # options and to OPTION_$(FILE) where $(FILE) is each of the $(FILES) |
|
30 # |
|
31 # Example: lets consider following variables are defined: |
|
32 # |
|
33 # |
|
34 # And that our input is: |
|
35 # OPTIONS=-c8,1 calc_paper -c8,8 display_side_l -c8 display_center |
|
36 # |
|
37 # The option reader would go through the $(OPTIONS) and fill out following variables: |
|
38 # |
|
39 # FILES=calc_paper display_side_l display_center |
|
40 # |
|
41 # OPTION_calc_paper=-c8,2 |
|
42 # |
|
43 # OPTION_display_side_l=-c8,8 |
|
44 # |
|
45 # OPTION_display_center=-c8 |
|
46 |
|
47 # File is the second word from the start, strip extension away just in case |
|
48 FILE:=$(basename $(word 2,$(OPTIONS))) |
|
49 #$(warning FILE $(FILE)) |
|
50 |
|
51 # Set OPTION_file variable to the option preceding the file |
|
52 OPTION_$(FILE):=$(firstword $(OPTIONS)) |
|
53 #$(warning OPTION_$(FILE) $(OPTION_$(FILE))) |
|
54 |
|
55 # Collect all the files |
|
56 FILES:=$(FILES) $(FILE) |
|
57 |
|
58 # Shift away the 2 first variables from OPTIONS |
|
59 OPTIONS:=$(wordlist 3,$(words $(OPTIONS)),$(OPTIONS)) |
|
60 #$(warning OPTIONS $(OPTIONS)) |
|
61 |
|
62 ifneq ($(strip $(OPTIONS)),) |
|
63 # Loop again |
|
64 include $(EPOCROOT)epoc32$/tools$/makefile_templates$/s60$/mifconv_option_reader_recursive.make |
|
65 endif |
|
66 |