Compare commits
No commits in common. "45fc27f1a837dfb2536e8a7c50537fc6a8b4cfa4" and "a4c736e4e781261d31f9eb51977182806fa23c53" have entirely different histories.
45fc27f1a8
...
a4c736e4e7
10
ppp.py
10
ppp.py
|
@ -11,8 +11,6 @@ if argc < 3:
|
|||
print_usage()
|
||||
sys.exit(1)
|
||||
|
||||
includes = sys.argv[2:]
|
||||
|
||||
# figure out src dir from root argument
|
||||
sep="/"
|
||||
src_dir = sep.join(sys.argv[2].split(sep)[:-1])
|
||||
|
@ -28,7 +26,7 @@ def preprocess_file(path):
|
|||
|
||||
with open(path) as f:
|
||||
content = f.readlines()
|
||||
content = [x.strip('\n') for x in content]
|
||||
content = [x.strip() for x in content]
|
||||
lines=len(content)
|
||||
|
||||
for l in content:
|
||||
|
@ -38,11 +36,7 @@ def preprocess_file(path):
|
|||
include_path = l.split(" ")[1]
|
||||
|
||||
# prepend directory
|
||||
#include_path = "/".join([src_dir, include_path])
|
||||
for inc in includes:
|
||||
if os.path.basename(inc) == include_path:
|
||||
include_path = inc
|
||||
break
|
||||
include_path = "/".join([src_dir, include_path])
|
||||
|
||||
preprocess_file(include_path)
|
||||
continue
|
||||
|
|
Loading…
Reference in New Issue