root/branches/libffado-2.0/SConstruct

Revision 1676, 19.6 kB (checked in by arnonym, 14 years ago)

Make sure that the 2.0 branch breaks too. see #199

Line 
1 #! /usr/bin/python
2 #
3 # Copyright (C) 2007-2008 Arnold Krille
4 # Copyright (C) 2007-2008 Pieter Palmers
5 # Copyright (C) 2008 Jonathan Woithe
6 #
7 # This file is part of FFADO
8 # FFADO = Free Firewire (pro-)audio drivers for linux
9 #
10 # FFADO is based upon FreeBoB.
11 #
12 # This program is free software: you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation, either version 2 of the License, or
15 # (at your option) version 3 of the License.
16 #
17 # This program is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 # GNU General Public License for more details.
21 #
22 # You should have received a copy of the GNU General Public License
23 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
24 #
25
26 FFADO_API_VERSION = "8"
27 FFADO_VERSION = "1.999.43"
28
29 import os
30 import re
31 from string import Template
32 import imp
33
34 if not os.path.isdir( "cache" ):
35         os.makedirs( "cache" )
36
37 opts = Options( "cache/options.cache" )
38
39 opts.AddOptions(
40         BoolOption( "DEBUG", """\
41 Toggle debug-build. DEBUG means \"-g -Wall\" and more, otherwise we will use
42   \"-O2\" to optimize.""", False ),
43         BoolOption( "PROFILE", "Build with symbols and other profiling info", False ),
44         PathOption( "PREFIX", "The prefix where ffado will be installed to.", "/usr/local", PathOption.PathAccept ),
45         PathOption( "BINDIR", "Overwrite the directory where apps are installed to.", "$PREFIX/bin", PathOption.PathAccept ),
46         PathOption( "LIBDIR", "Overwrite the directory where libs are installed to.", "$PREFIX/lib", PathOption.PathAccept ),
47         PathOption( "INCLUDEDIR", "Overwrite the directory where headers are installed to.", "$PREFIX/include", PathOption.PathAccept ),
48         PathOption( "SHAREDIR", "Overwrite the directory where misc shared files are installed to.", "$PREFIX/share/libffado", PathOption.PathAccept ),
49         BoolOption( "ENABLE_BEBOB", "Enable/Disable the bebob part.", True ),
50         BoolOption( "ENABLE_FIREWORKS", "Enable/Disable the ECHO Audio FireWorks AV/C part.", True ),
51         BoolOption( "ENABLE_MOTU", "Enable/Disable the MOTU part.", True ),
52         BoolOption( "ENABLE_GENERICAVC", """\
53 Enable/Disable the the generic avc part (mainly used by apple).
54   Note that disabling this option might be overwritten by other devices needing
55   this code.""", False ),
56         BoolOption( "ENABLE_ALL", "Enable/Disable support for all devices.", False ),
57         BoolOption( "SERIALIZE_USE_EXPAT", "Use libexpat for XML serialization.", False ),
58         BoolOption( "BUILD_TESTS", """\
59 Build the tests in their directory. As some contain quite some functionality,
60   this is on by default.
61   If you just want to use ffado with jack without the tools, you can disable this.\
62 """, True ),
63     BoolOption( "BUILD_STATIC_TOOLS", "Build a statically linked version of the FFADO tools.", False ),
64     EnumOption('DIST_TARGET', 'Build target for cross compiling packagers', 'auto', allowed_values=('auto', 'i386', 'i686', 'x86_64', 'powerpc', 'powerpc64', 'none' ), ignorecase=2),
65     BoolOption( "ENABLE_OPTIMIZATIONS", "Enable optimizations and the use of processor specific extentions (MMX/SSE/...).", False ),
66
67         )
68
69 ## Load the builders in config
70 buildenv=os.environ
71 vars_to_check = [
72         'PATH',
73         'PKG_CONFIG_PATH',
74         'LD_LIBRARY_PATH',
75         'XDG_CONFIG_DIRS',
76         'XDG_DATA_DIRS',
77         'HOME',
78         'CC',
79         'CFLAGS',
80         'CXX',
81         'CXXFLAGS',
82         'CPPFLAGS',
83 ]
84 for var in vars_to_check:
85         if os.environ.has_key(var):
86                 buildenv[var]=os.environ[var]
87         else:
88                 buildenv[var]=''
89
90 env = Environment( tools=['default','scanreplace','pyuic','pyuic4','dbus','doxygen','pkgconfig'], toolpath=['admin'], ENV = buildenv, options=opts )
91
92 if os.environ.has_key('LDFLAGS'):
93         env['LINKFLAGS'] = os.environ['LDFLAGS']
94
95 # grab OS CFLAGS / CCFLAGS
96 env['OS_CFLAGS']=[]
97 if os.environ.has_key('CFLAGS'):
98         env['OS_CFLAGS'] = os.environ['CFLAGS']
99 env['OS_CCFLAGS']=[]
100 if os.environ.has_key('CCFLAGS'):
101         env['OS_CCFLAGS'] = os.environ['CCFLAGS']
102
103 Help( """
104 For building ffado you can set different options as listed below. You have to
105 specify them only once, scons will save the last value you used and re-use
106 that.
107 To really undo your settings and return to the factory defaults, remove the
108 "cache"-folder and the file ".sconsign.dblite" from this directory.
109 For example with: "rm -Rf .sconsign.dblite cache"
110
111 Note that this is a development version! Don't complain if its not working!
112 See www.ffado.org for stable releases.
113 """ )
114 Help( opts.GenerateHelpText( env ) )
115
116 # make sure the necessary dirs exist
117 if not os.path.isdir( "cache" ):
118         os.makedirs( "cache" )
119 if not os.path.isdir( 'cache/objects' ):
120         os.makedirs( 'cache/objects' )
121
122 CacheDir( 'cache/objects' )
123
124 opts.Save( 'cache/options.cache', env )
125
126 def ConfigGuess( context ):
127         context.Message( "Trying to find the system triple: " )
128         ret = os.popen( "admin/config.guess" ).read()[:-1]
129         context.Result( ret )
130         return ret
131
132 def CheckForApp( context, app ):
133         context.Message( "Checking whether '" + app + "' executes " )
134         ret = context.TryAction( app )
135         context.Result( ret[0] )
136         return ret[0]
137
138 def CheckForPyModule( context, module ):
139         context.Message( "Checking for the python module '" + module + "' " )
140         ret = context.TryAction( "python $SOURCE", "import %s" % module, ".py" )
141         context.Result( ret[0] )
142         return ret[0]
143
144 def CompilerCheck( context ):
145         context.Message( "Checking for a working C-compiler " )
146         ret = context.TryRun( """
147 #include <stdlib.h>
148
149 int main() {
150         printf( "Hello World!" );
151         return 0;
152 }""", '.c' )[0]
153         context.Result( ret )
154         if ret == 0:
155                 return False;
156         context.Message( "Checking for a working C++-compiler " )
157         ret = context.TryRun( """
158 #include <iostream>
159
160 int main() {
161         std::cout << "Hello World!" << std::endl;
162         return 0;
163 }""", ".cpp" )[0]
164         context.Result( ret )
165         return ret
166
167 tests = {
168         "ConfigGuess" : ConfigGuess,
169         "CheckForApp" : CheckForApp,
170         "CheckForPyModule": CheckForPyModule,
171         "CompilerCheck" : CompilerCheck,
172 }
173 tests.update( env['PKGCONFIG_TESTS'] )
174 tests.update( env['PYUIC_TESTS'] )
175 tests.update( env['PYUIC4_TESTS'] )
176
177 conf = Configure( env,
178         custom_tests = tests,
179         conf_dir = "cache/",
180         log_file = 'cache/config.log' )
181
182 if env['SERIALIZE_USE_EXPAT']:
183         env['SERIALIZE_USE_EXPAT']=1
184 else:
185         env['SERIALIZE_USE_EXPAT']=0
186
187 if not env.GetOption('clean'):
188         #
189         # Check for working gcc and g++ compilers and their environment.
190         #
191         if not conf.CompilerCheck():
192                 print "\nIt seems as if your system isn't even able to compile any C-/C++-programs. Probably you don't have gcc and g++ installed. Compiling a package from source without a working compiler is very hard to do, please install the needed packages.\nHint: on *ubuntu you need both gcc- and g++-packages installed, easiest solution is to install build-essential which depends on gcc and g++."
193                 Exit( 1 )
194
195         # Check for pkg-config before using pkg-config to check for other dependencies.
196         if not conf.CheckForPKGConfig():
197                 print "\nThe program 'pkg-config' could not be found.\nEither you have to install the corresponding package first or make sure that PATH points to the right directions."
198                 Exit( 1 )
199
200         #
201         # The following checks are for headers and libs and packages we need.
202         #
203         allpresent = 1;
204         # for DBUS C++ bindings
205         allpresent &= conf.CheckHeader( "expat.h" )
206         allpresent &= conf.CheckLib( 'expat', 'XML_ExpatVersion', '#include <expat.h>' )
207        
208         pkgs = {
209                 'libraw1394' : '1.3.0',
210                 'libiec61883' : '1.1.0',
211                 'dbus-1' : '1.0',
212                 }
213         if not env['SERIALIZE_USE_EXPAT']:
214                 pkgs['libxml++-2.6'] = '2.13.0'
215
216         for pkg in pkgs:
217                 name2 = pkg.replace("+","").replace(".","").replace("-","").upper()
218                 env['%s_FLAGS' % name2] = conf.GetPKGFlags( pkg, pkgs[pkg] )
219                 if env['%s_FLAGS'%name2] == 0:
220                         allpresent &= 0
221
222         if not allpresent:
223                 print """
224 (At least) One of the dependencies is missing. I can't go on without it, please
225 install the needed packages for each of the lines saying "no".
226 (Remember to also install the *-devel packages!)
227
228 And remember to remove the cache with "rm -Rf .sconsign.dblite cache" so the
229 results above get rechecked.
230 """
231                 Exit( 1 )
232
233         # Check for C99 lrint() and lrintf() functions used to convert from
234         # float to integer more efficiently via float_cast.h.  If not
235         # present the standard slower methods will be used instead.  This
236         # might not be the best way of testing for these but it's the only
237         # way which seems to work properly.  CheckFunc() fails due to
238         # argument count problems.
239         if env.has_key( 'CFLAGS' ):
240                 oldcf = env['CFLAGS']
241         else:
242                 oldcf = ""
243         oldcf = env.Append(CFLAGS = '-std=c99')
244         if conf.CheckLibWithHeader( "m", "math.h", "c", "lrint(3.2);" ):
245                 HAVE_LRINT = 1
246         else:
247                 HAVE_LRINT = 0
248         if conf.CheckLibWithHeader( "m", "math.h", "c", "lrintf(3.2);" ):
249                 HAVE_LRINTF = 1
250         else:
251                 HAVE_LRINTF = 0
252         env['HAVE_LRINT'] = HAVE_LRINT;
253         env['HAVE_LRINTF'] = HAVE_LRINTF;
254         env.Replace(CFLAGS=oldcf)
255
256 #
257 # Optional checks follow:
258 #
259
260 # PyQT checks
261 build_mixer = False
262 if conf.CheckForApp( 'which pyuic4' ) and conf.CheckForPyModule( 'dbus' ) and conf.CheckForPyModule( 'PyQt4' ) and conf.CheckForPyModule( 'dbus.mainloop.qt' ):
263         env['PYUIC4'] = True
264         build_mixer = True
265
266 if conf.CheckForApp( 'which pyuic' ) and conf.CheckForPyModule( 'dbus' ) and conf.CheckForPyModule( 'qt' ):
267         env['PYUIC'] = True
268         build_mixer = True
269
270 if conf.CheckForApp( 'xdg-desktop-menu --help' ):
271         env['XDG_TOOLS'] = True
272 else:
273         print """
274 I couldn't find the program 'xdg-desktop-menu'. Together with xdg-icon-resource
275 this is needed to add the fancy entry to your menu. But the mixer will be installed, you can start it by executing "ffado-mixer".
276 """
277
278 if not build_mixer and not env.GetOption('clean'):
279         print """
280 I couldn't find all the prerequisites ('pyuic' / 'pyuic4' and the python-modules 'dbus' and
281 'qt' / 'PyQt4', the packages could be named like dbus-python and PyQt) to build the mixer.
282 Therefor neither the qt3 nor the qt4 mixer will get installed.
283 """
284
285 config_guess = conf.ConfigGuess()
286
287 env = conf.Finish()
288
289 if env['DEBUG']:
290         print "Doing a DEBUG build"
291         env.MergeFlags( "-DDEBUG -Wall -g" )
292 else:
293         env.MergeFlags( "-O2 -DNDEBUG" )
294
295 if env['PROFILE']:
296         print "Doing a PROFILE build"
297         env.MergeFlags( "-Wall -g" )
298
299
300 # this is required to indicate that the DBUS version we use has support
301 # for platform dependent threading init functions
302 # this is true for DBUS >= 0.96 or so. Since we require >= 1.0 it is
303 # always true
304 env.MergeFlags( "-DDBUS_HAS_THREADS_INIT_DEFAULT" )
305
306 if env['ENABLE_ALL']:
307         env['ENABLE_BEBOB'] = True
308         env['ENABLE_FIREWORKS'] = True
309         env['ENABLE_MOTU'] = True
310
311 if env['ENABLE_BEBOB'] or env['ENABLE_FIREWORKS']:
312         env['ENABLE_GENERICAVC'] = True
313
314 env['BUILD_STATIC_LIB'] = False
315 if env['BUILD_STATIC_TOOLS']:
316     print "Building static versions of the tools..."
317     env['BUILD_STATIC_LIB'] = True
318
319 env['build_base']="#/"
320
321 #
322 # Get the DESTDIR (if wanted) from the commandline
323 #
324 env.destdir = ARGUMENTS.get( 'DESTDIR', "" )
325
326 #
327 # Uppercase variables are for usage in code, lowercase versions for usage in
328 # scons-files for installing.
329 #
330 env['BINDIR'] = Template( env['BINDIR'] ).safe_substitute( env )
331 env['LIBDIR'] = Template( env['LIBDIR'] ).safe_substitute( env )
332 env['INCLUDEDIR'] = Template( env['INCLUDEDIR'] ).safe_substitute( env )
333 env['SHAREDIR'] = Template( env['SHAREDIR'] ).safe_substitute( env )
334 env['bindir'] = Template( env.destdir + env['BINDIR'] ).safe_substitute( env )
335 env['libdir'] = Template( env.destdir + env['LIBDIR'] ).safe_substitute( env )
336 env['includedir'] = Template( env.destdir + env['INCLUDEDIR'] ).safe_substitute( env )
337 env['sharedir'] = Template( env.destdir + env['SHAREDIR'] ).safe_substitute( env )
338
339 env.Command( target=env['sharedir'], source="", action=Mkdir( env['sharedir'] ) )
340
341 env.Alias( "install", env['libdir'] )
342 env.Alias( "install", env['includedir'] )
343 env.Alias( "install", env['sharedir'] )
344 env.Alias( "install", env['bindir'] )
345
346 #
347 # shamelessly copied from the Ardour scons file
348 #
349
350 opt_flags = []
351 env['USE_SSE'] = 0
352
353 # guess at the platform, used to define compiler flags
354
355 config_cpu = 0
356 config_arch = 1
357 config_kernel = 2
358 config_os = 3
359 config = config_guess.split ("-")
360
361 needs_fPIC = False
362
363 # Autodetect
364 if env['DIST_TARGET'] == 'auto':
365     if re.search ("x86_64", config[config_cpu]) != None:
366         env['DIST_TARGET'] = 'x86_64'
367     elif re.search("i[0-5]86", config[config_cpu]) != None:
368         env['DIST_TARGET'] = 'i386'
369     elif re.search("i686", config[config_cpu]) != None:
370         env['DIST_TARGET'] = 'i686'
371     elif re.search("powerpc64", config[config_cpu]) != None:
372         env['DIST_TARGET'] = 'powerpc64'
373     elif re.search("powerpc", config[config_cpu]) != None:
374         env['DIST_TARGET'] = 'powerpc'
375     else:
376         env['DIST_TARGET'] = config[config_cpu]
377     print "Detected DIST_TARGET = " + env['DIST_TARGET']
378
379 if ((re.search ("i[0-9]86", config[config_cpu]) != None) or (re.search ("x86_64", config[config_cpu]) != None) or (re.search ("powerpc", config[config_cpu]) != None)):
380    
381     build_host_supports_sse = 0
382     build_host_supports_sse2 = 0
383     build_host_supports_sse3 = 0
384
385     if config[config_kernel] == 'linux' :
386        
387         if (env['DIST_TARGET'] == 'i686') or (env['DIST_TARGET'] == 'x86_64'):
388            
389             flag_line = os.popen ("cat /proc/cpuinfo | grep '^flags'").read()[:-1]
390             x86_flags = flag_line.split (": ")[1:][0].split ()
391            
392             if "mmx" in x86_flags:
393                 opt_flags.append ("-mmmx")
394             if "sse" in x86_flags:
395                 build_host_supports_sse = 1
396             if "sse2" in x86_flags:
397                 build_host_supports_sse2 = 1
398             #if "sse3" in x86_flags:
399                 #build_host_supports_sse3 = 1
400             if "3dnow" in x86_flags:
401                 opt_flags.append ("-m3dnow")
402            
403             if config[config_cpu] == "i586":
404                 opt_flags.append ("-march=i586")
405             elif config[config_cpu] == "i686":
406                 opt_flags.append ("-march=i686")
407
408         elif (env['DIST_TARGET'] == 'powerpc') or (env['DIST_TARGET'] == 'powerpc64'):
409
410             cpu_line = os.popen ("cat /proc/cpuinfo | grep '^cpu'").read()[:-1]
411
412             ppc_type = cpu_line.split (": ")[1]
413             if re.search ("altivec", ppc_type) != None:
414                 opt_flags.append ("-maltivec")
415                 opt_flags.append ("-mabi=altivec")
416
417             ppc_type = ppc_type.split (", ")[0]
418             if re.match ("74[0145][0578]A?", ppc_type) != None:
419                 opt_flags.append ("-mcpu=7400")
420                 opt_flags.append ("-mtune=7400")
421             elif re.match ("750", ppc_type) != None:
422                 opt_flags.append ("-mcpu=750")
423                 opt_flags.append ("-mtune=750")
424             elif re.match ("PPC970", ppc_type) != None:
425                 opt_flags.append ("-mcpu=970")
426                 opt_flags.append ("-mtune=970")
427             elif re.match ("Cell Broadband Engine", ppc_type) != None:
428                 opt_flags.append ("-mcpu=cell")
429                 opt_flags.append ("-mtune=cell")
430
431     if ((env['DIST_TARGET'] == 'i686') or (env['DIST_TARGET'] == 'x86_64')) \
432        and build_host_supports_sse and env['ENABLE_OPTIMIZATIONS']:
433         opt_flags.extend (["-msse", "-mfpmath=sse"])
434         env['USE_SSE'] = 1
435
436     if ((env['DIST_TARGET'] == 'i686') or (env['DIST_TARGET'] == 'x86_64')) \
437        and build_host_supports_sse2 and env['ENABLE_OPTIMIZATIONS']:
438         opt_flags.extend (["-msse2"])
439         env['USE_SSE2'] = 1
440
441     #if ((env['DIST_TARGET'] == 'i686') or (env['DIST_TARGET'] == 'x86_64')) \
442        #and build_host_supports_sse2 and env['ENABLE_OPTIMIZATIONS']:
443         #opt_flags.extend (["-msse3"])
444         #env['USE_SSE3'] = 1
445
446     # build for 64-bit userland?
447     if env['DIST_TARGET'] == "powerpc64":
448         print "Doing a 64-bit PowerPC build"
449         env.MergeFlags( "-m64" )
450     elif env['DIST_TARGET'] == "x86_64":
451         print "Doing a 64-bit x86 build"
452         env.MergeFlags( "-m64" )
453         needs_fPIC = True
454     else:
455         print "Doing a 32-bit build"
456         env.MergeFlags( "-m32" )
457
458 if needs_fPIC or '-fPIC' in env['OS_CFLAGS'] or "-fPIC" in env['OS_CCFLAGS']:
459     env.MergeFlags( "-fPIC" )
460
461 # end of processor-specific section
462 if env['ENABLE_OPTIMIZATIONS']:
463     opt_flags.extend (["-fomit-frame-pointer","-ffast-math","-funroll-loops"])
464     env.MergeFlags( opt_flags )
465     print "Doing an optimized build..."
466
467 env['REVISION'] = os.popen('svnversion .').read()[:-1]
468 # This may be as simple as '89' or as complex as '4123:4184M'.
469 # We'll just use the last bit.
470 env['REVISION'] = env['REVISION'].split(':')[-1]
471
472 # try to circumvent localized versions
473 if len(env['REVISION']) >= 5 and env['REVISION'][0:6] == 'export':
474         env['REVISION'] = ''
475
476 # avoid the 1.999.41- type of version for exported versions
477 if env['REVISION'] != '':
478         env['REVISIONSTRING'] = '-' + env['REVISION']
479 else:
480         env['REVISIONSTRING'] = ''
481
482 env['FFADO_API_VERSION'] = FFADO_API_VERSION
483
484 env['PACKAGE'] = "libffado"
485 env['VERSION'] = FFADO_VERSION
486 env['LIBVERSION'] = "1.0.0"
487
488 env['CONFIGDIR'] = "~/.ffado"
489 env['CACHEDIR'] = "~/.ffado"
490
491 env['USER_CONFIG_FILE'] = env['CONFIGDIR'] + "/configuration"
492 env['SYSTEM_CONFIG_FILE'] = env['SHAREDIR'] + "/configuration"
493
494 env['REGISTRATION_URL'] = "http://ffado.org/deviceregistration/register.php?action=register"
495
496 #
497 # To have the top_srcdir as the doxygen-script is used from auto*
498 #
499 env['top_srcdir'] = env.Dir( "." ).abspath
500
501 #
502 # Start building
503 #
504 env.ScanReplace( "config.h.in" )
505 # ensure that the config.h is updated with the version
506
507 env.Depends( "config.h", "SConstruct" )
508 env.Depends( "config.h", 'cache/options.cache' )
509
510 # update config.h whenever the SVN revision changes
511 env.Depends( "config.h", env.Value(env['REVISION']))
512
513 env.Depends( "libffado.pc", "SConstruct" )
514 pkgconfig = env.ScanReplace( "libffado.pc.in" )
515 env.Install( env['libdir'] + '/pkgconfig', pkgconfig )
516
517 env.Install( env['sharedir'], 'configuration' )
518
519 subdirs=['external','src','libffado','support','doc']
520 if env['BUILD_TESTS']:
521         subdirs.append('tests')
522
523 env.SConscript( dirs=subdirs, exports="env" )
524
525 # By default only src is built but all is cleaned
526 if not env.GetOption('clean'):
527     Default( 'src' )
528     Default( 'support' )
529     if env['BUILD_TESTS']:
530         Default( 'tests' )
531
532 #
533 # Deal with the DESTDIR vs. xdg-tools conflict (which is basicely that the
534 # xdg-tools can't deal with DESTDIR, so the packagers have to deal with this
535 # their own :-/
536 #
537 if len(env.destdir) > 0:
538         if not len( ARGUMENTS.get( "WILL_DEAL_WITH_XDG_MYSELF", "" ) ) > 0:
539                 print """
540 WARNING!
541 You are using the (packagers) option DESTDIR to install this package to a
542 different place than the real prefix. As the xdg-tools can't cope with
543 that, the .desktop-files are not installed by this build, you have to
544 deal with them your own.
545 (And you have to look into the SConstruct to learn how to disable this
546 message.)
547 """
548 else:
549
550         def CleanAction( action ):
551                 if env.GetOption( "clean" ):
552                         env.Execute( action )
553
554         if env.has_key( 'XDG_TOOLS' ) and env.has_key( 'PYUIC4' ):
555                 if not env.GetOption("clean"):
556                         action = "install"
557                 else:
558                         action = "uninstall"
559                 mixerdesktopaction = env.Action( "xdg-desktop-menu %s support/xdg/ffado.org-ffadomixer.desktop" % action )
560                 mixericonaction = env.Action( "xdg-icon-resource %s --size 64 --novendor --context apps support/xdg/hi64-apps-ffado.png ffado" % action )
561                 env.Command( "__xdgstuff1", None, mixerdesktopaction )
562                 env.Command( "__xdgstuff2", None, mixericonaction )
563                 env.Alias( "install", ["__xdgstuff1", "__xdgstuff2" ] )
564                 CleanAction( mixerdesktopaction )
565                 CleanAction( mixericonaction )
566
567 #
568 # Create a tags-file for easier emacs/vim-source-browsing
569 #  I don't know if the dependency is right...
570 #
571 findcommand = "find . \( -path \"*.h\" -o -path \"*.cpp\" -o -path \"*.c\" \) \! -path \"*.svn*\" \! -path \"./doc*\" \! -path \"./cache*\""
572 env.Command( "tags", "", findcommand + " |xargs ctags" )
573 env.Command( "TAGS", "", findcommand + " |xargs etags" )
574 env.AlwaysBuild( "tags", "TAGS" )
575 if 'NoCache' in dir(env):
576     env.NoCache( "tags", "TAGS" )
577
578 # Another convinience target
579 if env.GetOption( "clean" ):
580         env.Execute( "rm cache/objects -Rf" )
581
Note: See TracBrowser for help on using the browser.