lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [lucy-commits] [7/14] git commit: refs/heads/master - Capture build environment info with Charmonizer.
Date Wed, 02 Jan 2013 20:38:07 GMT
Capture build environment info with Charmonizer.

Add a new module, "BuildEnv" which captures data such as the name of the
compiler executable, compiler flags, and so on.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/33a67f33
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/33a67f33
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/33a67f33

Branch: refs/heads/master
Commit: 33a67f33e9f4a88b7ecd33bcf8cbcab2f6b4672b
Parents: d704613
Author: Marvin Humphrey <marvin@rectangular.com>
Authored: Tue Dec 11 16:46:26 2012 -0800
Committer: Marvin Humphrey <marvin@rectangular.com>
Committed: Wed Jan 2 12:10:12 2013 -0800

----------------------------------------------------------------------
 charmonizer/src/Charmonizer/Probe/BuildEnv.c |   32 +++++++++++++
 charmonizer/src/Charmonizer/Probe/BuildEnv.h |   49 +++++++++++++++++++++
 clownfish/runtime/common/charmonizer.main    |    2 +
 common/charmonizer.main                      |    1 +
 4 files changed, 84 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/33a67f33/charmonizer/src/Charmonizer/Probe/BuildEnv.c
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Probe/BuildEnv.c b/charmonizer/src/Charmonizer/Probe/BuildEnv.c
new file mode 100644
index 0000000..1be7d38
--- /dev/null
+++ b/charmonizer/src/Charmonizer/Probe/BuildEnv.c
@@ -0,0 +1,32 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "Charmonizer/Core/HeaderChecker.h"
+#include "Charmonizer/Core/ConfWriter.h"
+#include "Charmonizer/Probe/BuildEnv.h"
+
+void
+chaz_BuildEnv_run(void) {
+    chaz_ConfWriter_start_module("BuildEnv");
+
+    chaz_ConfWriter_add_def("CC", chaz_CC_get_cc());
+    chaz_ConfWriter_add_def("CFLAGS", chaz_CC_get_cflags());
+    chaz_ConfWriter_add_def("EXTRA_CFLAGS", chaz_CC_get_extra_cflags());
+
+    chaz_ConfWriter_end_module();
+}
+
+

http://git-wip-us.apache.org/repos/asf/lucy/blob/33a67f33/charmonizer/src/Charmonizer/Probe/BuildEnv.h
----------------------------------------------------------------------
diff --git a/charmonizer/src/Charmonizer/Probe/BuildEnv.h b/charmonizer/src/Charmonizer/Probe/BuildEnv.h
new file mode 100644
index 0000000..f2c1670
--- /dev/null
+++ b/charmonizer/src/Charmonizer/Probe/BuildEnv.h
@@ -0,0 +1,49 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* Charmonizer/Probe/BuildEnv.h -- Build environment.
+ *
+ * Capture various information about the build environment, including the C
+ * compiler's interface, the shell, the operating system, etc.
+ *
+ * The following symbols will be defined:
+ *
+ * CC - String representation of the C compiler executable.
+ * CFLAGS - C compiler flags.
+ * EXTRA_CFLAGS - Extra C compiler flags.
+ */
+
+#ifndef H_CHAZ_BUILDENV
+#define H_CHAZ_BUILDENV
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdio.h>
+
+/* Run the BuildEnv module.
+ */
+void chaz_BuildEnv_run(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* H_CHAZ_BUILDENV */
+
+
+

http://git-wip-us.apache.org/repos/asf/lucy/blob/33a67f33/clownfish/runtime/common/charmonizer.main
----------------------------------------------------------------------
diff --git a/clownfish/runtime/common/charmonizer.main b/clownfish/runtime/common/charmonizer.main
index de9ba04..b65dc01 100644
--- a/clownfish/runtime/common/charmonizer.main
+++ b/clownfish/runtime/common/charmonizer.main
@@ -22,6 +22,7 @@
 #include <string.h>
 #include "Charmonizer/Probe.h"
 #include "Charmonizer/Probe/AtomicOps.h"
+#include "Charmonizer/Probe/BuildEnv.h"
 #include "Charmonizer/Probe/DirManip.h"
 #include "Charmonizer/Probe/Floats.h"
 #include "Charmonizer/Probe/FuncMacro.h"
@@ -50,6 +51,7 @@ int main(int argc, const char **argv) {
     }
 
     /* Run probe modules. */
+    chaz_BuildEnv_run();
     chaz_DirManip_run();
     chaz_Headers_run();
     chaz_AtomicOps_run();

http://git-wip-us.apache.org/repos/asf/lucy/blob/33a67f33/common/charmonizer.main
----------------------------------------------------------------------
diff --git a/common/charmonizer.main b/common/charmonizer.main
index 2ba57eb..7090033 100644
--- a/common/charmonizer.main
+++ b/common/charmonizer.main
@@ -50,6 +50,7 @@ int main(int argc, const char **argv) {
     }
 
     /* Run probe modules. */
+    chaz_BuildEnv_run();
     chaz_DirManip_run();
     chaz_Headers_run();
     chaz_AtomicOps_run();


Mime
View raw message