~glmark2-dev/glmark2/canvas-drm-rebranch

« back to all changes in this revision

Viewing changes to waflib/Tools/winres.py

  • Committer: Alexandros Frantzis
  • Date: 2012-06-11 10:42:17 UTC
  • Revision ID: alexandros.frantzis@linaro.org-20120611104217-2ccl3of6i1i7nbfg
Build: Update waf to 1.6.11 and unpack it as required by debian policy.

See: http://wiki.debian.org/UnpackWaf

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /usr/bin/env python
 
2
# encoding: utf-8
 
3
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
 
4
 
 
5
from waflib import Task
 
6
from waflib.TaskGen import extension
 
7
def rc_file(self,node):
 
8
        obj_ext='.rc.o'
 
9
        if self.env['WINRC_TGT_F']=='/fo':
 
10
                obj_ext='.res'
 
11
        rctask=self.create_task('winrc',node,node.change_ext(obj_ext))
 
12
        try:
 
13
                self.compiled_tasks.append(rctask)
 
14
        except AttributeError:
 
15
                self.compiled_tasks=[rctask]
 
16
class winrc(Task.Task):
 
17
        run_str='${WINRC} ${WINRCFLAGS} ${CPPPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} ${WINRC_TGT_F} ${TGT} ${WINRC_SRC_F} ${SRC}'
 
18
        color='BLUE'
 
19
def configure(conf):
 
20
        v=conf.env
 
21
        v['WINRC_TGT_F']='-o'
 
22
        v['WINRC_SRC_F']='-i'
 
23
        if not conf.env.WINRC:
 
24
                if v.CC_NAME=='msvc':
 
25
                        conf.find_program('RC',var='WINRC',path_list=v['PATH'])
 
26
                        v['WINRC_TGT_F']='/fo'
 
27
                        v['WINRC_SRC_F']=''
 
28
                else:
 
29
                        conf.find_program('windres',var='WINRC',path_list=v['PATH'])
 
30
        if not conf.env.WINRC:
 
31
                conf.fatal('winrc was not found!')
 
32
        v['WINRCFLAGS']=[]
 
33
 
 
34
extension('.rc')(rc_file)
 
 
b'\\ No newline at end of file'