File: regen.py

package info (click to toggle)
lapackpp 2024.10.26-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,500 kB
  • sloc: cpp: 80,181; ansic: 27,660; python: 4,838; xml: 182; perl: 99; makefile: 53; sh: 23
file content (25 lines) | stat: -rwxr-xr-x 438 bytes parent folder | download
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
#!/usr/bin/env python3
#
# Usage: ./regen.py
#
# For all src/*.o files, regenerate wrappers in ../gen/*.cc
# Does NOT touch ../src/*.cc

from __future__ import print_function

import sys
import os
import re

def run( cmd ):
    print( cmd )
    os.system( cmd )
# end

files = os.listdir( '../src' )
for f in files:
    s = re.search( r'^(\w+)\.cc', f )
    if (s):
        arg = s.group(1)
        run( './wrapper_gen.py ' + arg )
# end