Skip to content

Commit 08c9848

Browse files
committed
[embuilder] Add support for '*' wildcard for matching library names
This is very useful for doing things like `./embuild build libGL*` to `./embuilder clean libc*`.
1 parent ec2ce4c commit 08c9848

File tree

2 files changed

+11
-108
lines changed

2 files changed

+11
-108
lines changed

embuilder.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"""
1414

1515
import argparse
16+
import fnmatch
1617
import logging
1718
import sys
1819
import time
@@ -120,7 +121,7 @@
120121

121122

122123
def get_help():
123-
all_tasks = get_system_tasks()[1] + PORTS
124+
all_tasks = get_all_tasks()
124125
all_tasks.sort()
125126
return '''
126127
Available targets:
@@ -163,6 +164,10 @@ def get_system_tasks():
163164
return system_libraries, system_tasks
164165

165166

167+
def get_all_tasks():
168+
return get_system_tasks()[1] + PORTS
169+
170+
166171
def main():
167172
all_build_start_time = time.time()
168173

@@ -239,7 +244,10 @@ def main():
239244
for name, targets in task_targets.items():
240245
if targets is None:
241246
# Use target name as task
242-
tasks.append(name)
247+
if '*' in name:
248+
tasks.extend(fnmatch.filter(get_all_tasks(), name))
249+
else:
250+
tasks.append(name)
243251
else:
244252
# There are some ports that we don't want to build as part
245253
# of ALL since the are not well tested or widely used:

system/lib/gl/gl.c

Lines changed: 1 addition & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <GL/gl.h>
1616
#include <GL/glext.h>
1717

18+
#include <webgl/webgl1.h>
1819
#include <webgl/webgl1_ext.h>
1920

2021
// Define emscripten_ versions of gl functions, to avoid name collisions
@@ -23,126 +24,20 @@
2324
* Miscellaneous
2425
*/
2526

26-
GLAPI void GLAPIENTRY emscripten_glClearIndex( GLfloat c );
27-
28-
GLAPI void GLAPIENTRY emscripten_glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );
29-
30-
GLAPI void GLAPIENTRY emscripten_glClear( GLbitfield mask );
31-
32-
GLAPI void GLAPIENTRY emscripten_glIndexMask( GLuint mask );
33-
34-
GLAPI void GLAPIENTRY emscripten_glColorMask( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha );
35-
3627
GLAPI void GLAPIENTRY emscripten_glAlphaFunc( GLenum func, GLclampf ref );
3728

38-
GLAPI void GLAPIENTRY emscripten_glBlendFunc( GLenum sfactor, GLenum dfactor );
39-
40-
GLAPI void GLAPIENTRY emscripten_glLogicOp( GLenum opcode );
41-
42-
GLAPI void GLAPIENTRY emscripten_glCullFace( GLenum mode );
43-
44-
GLAPI void GLAPIENTRY emscripten_glFrontFace( GLenum mode );
45-
46-
GLAPI void GLAPIENTRY emscripten_glPointSize( GLfloat size );
47-
48-
GLAPI void GLAPIENTRY emscripten_glLineWidth( GLfloat width );
49-
50-
GLAPI void GLAPIENTRY emscripten_glLineStipple( GLint factor, GLushort pattern );
51-
5229
GLAPI void GLAPIENTRY emscripten_glPolygonMode( GLenum face, GLenum mode );
5330

54-
GLAPI void GLAPIENTRY emscripten_glPolygonOffset( GLfloat factor, GLfloat units );
55-
56-
GLAPI void GLAPIENTRY emscripten_glPolygonStipple( const GLubyte *mask );
57-
58-
GLAPI void GLAPIENTRY emscripten_glGetPolygonStipple( GLubyte *mask );
59-
60-
GLAPI void GLAPIENTRY emscripten_glEdgeFlag( GLboolean flag );
61-
62-
GLAPI void GLAPIENTRY emscripten_glEdgeFlagv( const GLboolean *flag );
63-
64-
GLAPI void GLAPIENTRY emscripten_glScissor( GLint x, GLint y, GLsizei width, GLsizei height);
65-
6631
GLAPI void GLAPIENTRY emscripten_glClipPlane( GLenum plane, const GLdouble *equation );
6732

68-
GLAPI void GLAPIENTRY emscripten_glGetClipPlane( GLenum plane, GLdouble *equation );
69-
7033
GLAPI void GLAPIENTRY emscripten_glDrawBuffer( GLenum mode );
7134

7235
GLAPI void GLAPIENTRY emscripten_glReadBuffer( GLenum mode );
7336

74-
GLAPI void GLAPIENTRY emscripten_glEnable( GLenum cap );
75-
76-
GLAPI void GLAPIENTRY emscripten_glDisable( GLenum cap );
77-
78-
GLAPI GLboolean GLAPIENTRY emscripten_glIsEnabled( GLenum cap );
79-
80-
8137
GLAPI void GLAPIENTRY emscripten_glEnableClientState( GLenum cap ); /* 1.1 */
8238

8339
GLAPI void GLAPIENTRY emscripten_glDisableClientState( GLenum cap ); /* 1.1 */
8440

85-
86-
GLAPI void GLAPIENTRY emscripten_glGetBooleanv( GLenum pname, GLboolean *params );
87-
88-
GLAPI void GLAPIENTRY emscripten_glGetDoublev( GLenum pname, GLdouble *params );
89-
90-
GLAPI void GLAPIENTRY emscripten_glGetFloatv( GLenum pname, GLfloat *params );
91-
92-
GLAPI void GLAPIENTRY emscripten_glGetIntegerv( GLenum pname, GLint *params );
93-
94-
95-
GLAPI void GLAPIENTRY emscripten_glPushAttrib( GLbitfield mask );
96-
97-
GLAPI void GLAPIENTRY emscripten_glPopAttrib( void );
98-
99-
100-
GLAPI void GLAPIENTRY emscripten_glPushClientAttrib( GLbitfield mask ); /* 1.1 */
101-
102-
GLAPI void GLAPIENTRY emscripten_glPopClientAttrib( void ); /* 1.1 */
103-
104-
105-
GLAPI GLint GLAPIENTRY emscripten_glRenderMode( GLenum mode );
106-
107-
GLAPI GLenum GLAPIENTRY emscripten_glGetError( void );
108-
109-
GLAPI const GLubyte * GLAPIENTRY emscripten_glGetString( GLenum name );
110-
111-
GLAPI const GLubyte * GLAPIENTRY emscripten_glGetStringi( GLenum name, GLuint index);
112-
113-
GLAPI void GLAPIENTRY emscripten_glFinish( void );
114-
115-
GLAPI void GLAPIENTRY emscripten_glFlush( void );
116-
117-
GLAPI void GLAPIENTRY emscripten_glHint( GLenum target, GLenum mode );
118-
119-
120-
/*
121-
* Depth Buffer
122-
*/
123-
124-
GLAPI void GLAPIENTRY emscripten_glClearDepth( GLclampd depth );
125-
126-
GLAPI void GLAPIENTRY emscripten_glDepthFunc( GLenum func );
127-
128-
GLAPI void GLAPIENTRY emscripten_glDepthMask( GLboolean flag );
129-
130-
GLAPI void GLAPIENTRY emscripten_glDepthRange( GLclampd near_val, GLclampd far_val );
131-
132-
133-
/*
134-
* Accumulation Buffer
135-
*/
136-
137-
GLAPI void GLAPIENTRY emscripten_glClearAccum( GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha );
138-
139-
GLAPI void GLAPIENTRY emscripten_glAccum( GLenum op, GLfloat value );
140-
141-
142-
/*
143-
* Transformation
144-
*/
145-
14641
GLAPI void GLAPIENTRY emscripten_glMatrixMode( GLenum mode );
14742

14843
GLAPI void GLAPIENTRY emscripten_glOrtho( GLdouble left, GLdouble right,

0 commit comments

Comments
 (0)