sources.append(
{"name" : "libdlib.a",
"group" : "dlib",
"sources" : ["ThirdParty/dlib-18.10/dlib/all/source.cpp"],
"build_dir" : "ThirdParty/dlib-18.10/dlib/all",
"install_dir" : "libs",
"cxxflags" : "-DDLIB_NO_GUI_SUPPORT",
}
)
app.build
sources.append(
{"name" : "app",
"depends" : ["dlib"],
"sources" : ["src/app/main.cpp"],
"build_dir" : "src/app",
"install_dir" : "bin",
"cxxflags" : "-Wall",
"ldflags" : "-lz",
"post_cmds" : ["cp ./src/app/config.*.txt ./bin/"],
}
)
Here is a more complicated file that I just created to support the use of protoc (protobuf).
idl.build
PROTOSRC = "%(PROJ_DIR)s/ThirdParty/protobuf-2.6.1/src"
PROTOINCLUDE = "%(PROTOSRC)s/google"
PROTOC = "%(PROTOSRC)s/protoc"
PROTOLIBS = "%(PROTOSRC)s/.libs/*.a"
# copy the proto libs to the lib dir and add a symbolic link
# to the header files (I could copy them, but I don't want fabricate
# to have to track them)
sources.append(
{"name" : "protolibs",
"post_cmds" : ["cp %(PROTOLIBS)s ./libs",
"ln -s %(PROTOINCLUDE)s ./include"],
}
)
# generate the src/header files from the .proto file
sources.append(
{"name" : "icd",
"depends" : ["protolibs"],
"icd.proto" : "./src/app/icd.proto",
"post_cmds" : ["%(PROTOC)s %(icd.proto)s --cpp_out=."],
}
)
fabricate.diff
16:19 $ diff -Naur /tmp/fabricate.py fabricate.py
--- /a/fabricate.py 2014-12-03 16:19:30.152417926 -0800
+++ /b/fabricate.py 2014-09-29 18:04:41.404331760 -0700
@@ -713,7 +713,13 @@
os.close(handle)
raise
try:
- status, deps, outputs = self._do_strace(args, kwargs, outfile, outname)
+ try:
+ status, deps, outputs = self._do_strace(args, kwargs, outfile, outname)
+ except KeyboardInterrupt:
+ # this exception is caught here because it seems to fix the issue with python hanging
+ # when ctrl-c is pressed.
+ pass
+
if status is None:
raise ExecutionError(
'%r was killed unexpectedly' % args[0], '', -1)