File: sconstruct

package info (click to toggle)
xxdiff 1%3A4.0.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,716 kB
  • ctags: 2,245
  • sloc: cpp: 18,495; python: 6,134; sh: 1,543; ansic: 1,535; perl: 308; lex: 284; yacc: 279; lisp: 250; tcl: 213; makefile: 82
file content (160 lines) | stat: -rw-r--r-- 3,394 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
#!/usr/bin/env python
#
# Tentative scons build file.
#
# At this point this is probably not working. I'm just playing with this at the
# moment.
#

__version__ = "$Revision: 744 $"
__author__ = "Martin Blais <blais@furius.ca>"

import string, os.path

env = Environment()

headers = """
	optionsDialog.h 
	searchDialog.h 
	app.h 
	app.inline.h 
	cmdline.h 
	suicideMessageBox.h 
	defs.h 
	types.h 
	diffs.h 
	diffs.inline.h 
	builder.h 
	builder.inline.h 
	builderFiles2.h 
	builderFiles3.h 
	builderDirs2.h 
	builderUnmerge.h 
	builderSingle.h 
	exceptions.h 
	buffer.h 
	buffer.inline.h 
	help.h 
	hordiffImp.h 
	line.h 
	line.inline.h 
	main.h 
	overview.h 
	resParser.h 
	resources.h 
	resources.inline.h 
	accelUtil.h 
	copyLabel.h 
	text.h 
	scrollView.h 
	central.h 
	merged.h 
	lineNumbers.h 
	util.h 
	markers.h 
	getopt.h 
	diffutils.h 
	diffutils_hack.h 
	doc.html 
	kdeSupport.h 
	version.h
""".split()

sources = """
	optionsDialog.cpp 
	searchDialog.cpp 
	app.cpp 
	cmdline.cpp 
	suicideMessageBox.cpp 
	main.cpp 
	overview.cpp 
	copyLabel.cpp 
	text.cpp 
	scrollView.cpp 
	central.cpp 
	merged.cpp 
	lineNumbers.cpp 
	util.cpp 
	help.cpp 
	exceptions.cpp 
	builder.cpp 
	builderFiles2.cpp 
	builderFiles3.cpp 
	builderDirs2.cpp 
	builderUnmerge.cpp 
	builderSingle.cpp 
	diffs.cpp 
	hordiffImp.cpp 
	line.cpp 
	buffer.cpp 
	resources.cpp 
	accelUtil.cpp 
	resParser.cpp 
	markers.cpp 
	getopt.c 
	getopt1.c 
	version.c
""".split()
#	diffutils.cpp 

interfaces = """
	markersWidgetBase.ui 
	optionsDialogBase.ui 
	searchDialogBase.ui
""".split()

#-------------------------------------------------------------------------------

uic = os.path.join(os.environ['QTDIR'], 'bin', 'uic')
IntHeaderBuilder = Builder(action='%s $SOURCE -o $TARGET' % uic, suffix='.cpp', src_suffix='.ui') 


def buildIntSource(target, source, evn):
    print '=================', target, source, env
    #action='%s $SOURCE -o $TARGET' % uic
    
IntSourceBuilder = Builder(action=Action(buildIntSource), suffix='.cpp', src_suffix='.ui') 

#IntSourceBuilder = Builder(action='%s $SOURCE -o $TARGET' % uic, suffix='.cpp', src_suffix='.ui') 
# env.Append(BUILDERS = {'InterfaceSource': interfacesource_builder})


#-------------------------------------------------------------------------------
#
def processInterface(interfaces):
    new_sources = []
    for interface in interfaces:
        header = interface.replace('.ui', '.h')
        source = interface.replace('.ui', '.cpp')
        new_sources.append(source)
        IntSourceBuilder(env, target=source, source=interface)
        IntHeaderBuilder(env, target=header, source=interface)
        env.Depends(source, header)
    return new_sources

sources += processInterface(interfaces)


#interfacesource_builder = Builder(name='InterfaceSource',
#                            action='%s $SOURCE -i ??? -o $TARGET' % uic,
#                            src_suffix='.ui') 
#/usr/lib/qt3/bin/uic markersWidgetBase.ui -i markersWidgetBase.h -o markersWidgetBase.cpp
#
#
# nasm_env = Environment(BUILDERS = [nasm_builder]) 
# nasm_files = 'unix/snapvector unix/ftol' 
# nasm_objs = [ nasm_env.Nasm(target=x+'.o', source=x+'.nasm') for x in string.split(nasm_files) ] 
# 
#... 
# 
# env.Program(target='spam', source = source_list + nasm_objs)
# 




env.Build('markersWidgetBase.cpp')

prog = env.Program(target='xxdiff', source=sources)

Default(prog)