generate.py 333 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
import os
import sys

FOLDERS = ["core", "pass", "c_api"]

fo = open(sys.argv[1], "w")



for folder in FOLDERS:
    path = str(os.path.join("../src", folder))
    flst = os.listdir(path)
    for f in flst:
    	if f.endswith(".cc") == True:
        	fo.write('#include "' + str(os.path.join("src", folder, f)) + '"\n')


fo.close()