File: SConscript

package info (click to toggle)
gpick 0.2.5%2Bgit20161221-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 2,748 kB
  • ctags: 3,744
  • sloc: cpp: 26,803; python: 871; ansic: 476; yacc: 252; lex: 197; xml: 63; makefile: 50; sh: 8
file content (30 lines) | stat: -rw-r--r-- 657 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/env python

import os
import sys

Import('*')
local_env = env.Clone()

local_env.PrependUnique(CPPPATH = ['.'])
local_env.Append(CPPDEFINES = ['YY_NO_UNISTD_H'])

if not env['PREBUILD_GRAMMAR']:
	parser = local_env.Lemon('css_grammar.y')
	lexer = local_env.Flex('css_lex.l')
else:
	parser = [File('css_grammar.c'), File('css_grammar.h')]
	lexer = [File('css_lex.cpp'), File('css_lex.h')]

generated_files = Flatten([parser, lexer])

sources = local_env.Glob('*.cpp')

objects = local_env.StaticObject(
	source = [sources])
	
if not env['PREBUILD_GRAMMAR']:
	Depends(parser, lexer)
	Depends(objects, parser)
	
Return('objects', 'generated_files')