[A] Added check for amalgamation script has been run
This commit is contained in:
parent
a1ffd31ae3
commit
a933b13d25
@ -87,6 +87,11 @@ matrix:
|
|||||||
|
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
# Check library file was generated
|
||||||
|
- python amalgamate.py -o dummy.c
|
||||||
|
- diff dummy.c lib/fort.c
|
||||||
|
- rm dummy.c
|
||||||
|
|
||||||
# make sure CC is correctly set
|
# make sure CC is correctly set
|
||||||
- if [[ "${FORT_C_COMPILER}" != "" ]];
|
- if [[ "${FORT_C_COMPILER}" != "" ]];
|
||||||
then
|
then
|
||||||
@ -186,3 +191,5 @@ script:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
def comment_line(line):
|
def comment_line(line):
|
||||||
return "/* {} */ /* Commented by amalgamation script */".format(line)
|
return "/* {} */ /* Commented by amalgamation script */".format(line)
|
||||||
@ -84,7 +85,10 @@ def is_c_source_file(file):
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
config = {}
|
config = {}
|
||||||
config["output_file"] = "./lib/fort.c"
|
if len(sys.argv) >= 3 and sys.argv[1] == "-o":
|
||||||
|
config["output_file"] = sys.argv[2]
|
||||||
|
else:
|
||||||
|
config["output_file"] = "./lib/fort.c"
|
||||||
config["src_dir"] = "./src"
|
config["src_dir"] = "./src"
|
||||||
all_files = os.listdir(config["src_dir"])
|
all_files = os.listdir(config["src_dir"])
|
||||||
config["src_files"] = filter(is_c_source_file, all_files)
|
config["src_files"] = filter(is_c_source_file, all_files)
|
||||||
|
Loading…
Reference in New Issue
Block a user