summaryrefslogtreecommitdiff
path: root/src/logic/slbt_exec_compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/logic/slbt_exec_compile.c')
-rw-r--r--src/logic/slbt_exec_compile.c34
1 files changed, 3 insertions, 31 deletions
diff --git a/src/logic/slbt_exec_compile.c b/src/logic/slbt_exec_compile.c
index 4a75270..90df731 100644
--- a/src/logic/slbt_exec_compile.c
+++ b/src/logic/slbt_exec_compile.c
@@ -13,6 +13,7 @@
#include <slibtool/slibtool.h>
#include "slibtool_spawn_impl.h"
#include "slibtool_mkdir_impl.h"
+#include "slibtool_metafile_impl.h"
static int slbt_exec_compile_remove_file(
const struct slbt_driver_ctx * dctx,
@@ -36,9 +37,7 @@ int slbt_exec_compile(
struct slbt_exec_ctx * ectx)
{
int ret;
- FILE * fout;
struct slbt_exec_ctx * actx = 0;
- const struct slbt_source_version * verinfo;
/* dry run */
if (dctx->cctx->drvflags & SLBT_DRIVER_DRY_RUN)
@@ -133,35 +132,8 @@ int slbt_exec_compile(
}
}
- /* libtool object */
- if (!(fout = fopen(ectx->ltobjname,"w"))) {
- slbt_free_exec_ctx(actx);
- return -1;
- }
-
- verinfo = slbt_source_version();
-
- ret = fprintf(fout,
- "# libtool compatible object wrapper\n"
- "# Generated by %s (slibtool %d.%d.%d)\n"
- "# [commit reference: %s]\n\n"
-
- "pic_object='%s'\n"
- "non_pic_object='%s'\n",
-
- dctx->program,
- verinfo->major,verinfo->minor,verinfo->revision,
- verinfo->commit,
-
- (dctx->cctx->drvflags & SLBT_DRIVER_SHARED)
- ? ectx->lobjname
- : "none",
- (dctx->cctx->drvflags & SLBT_DRIVER_STATIC)
- ? ectx->aobjname
- : "none");
-
- fclose(fout);
+ ret = slbt_create_object_wrapper(dctx,ectx);
slbt_free_exec_ctx(actx);
- return (ret > 0) ? 0 : -1;
+ return ret;
}