root/trunk/libffado/SConstruct

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