|
|
6f991b |
/*******************************************************************/
|
|
|
6f991b |
/* slibtool: a skinny libtool implementation, written in C */
|
|
|
6f991b |
/* Copyright (C) 2016 Z. Gilboa */
|
|
|
6f991b |
/* Released under the Standard MIT License; see COPYING.SLIBTOOL. */
|
|
|
6f991b |
/*******************************************************************/
|
|
|
6f991b |
|
|
|
6f991b |
#include <stdio.h>
|
|
|
6f991b |
#include <slibtool/slibtool.h>
|
|
|
6f991b |
|
|
|
fab986 |
int slbt_output_exec(
|
|
|
6f991b |
const struct slbt_driver_ctx * dctx,
|
|
|
fab986 |
const struct slbt_exec_ctx * ectx,
|
|
|
fab986 |
const char * step)
|
|
|
6f991b |
{
|
|
|
6f991b |
char ** parg;
|
|
|
6f991b |
|
|
|
fab986 |
if (fprintf(stdout,"%s: %s:",dctx->program,step) < 0)
|
|
|
6f991b |
return -1;
|
|
|
6f991b |
|
|
|
6f991b |
for (parg=ectx->argv; *parg; parg++)
|
|
|
6f991b |
if (fprintf(stdout," %s",*parg) < 0)
|
|
|
6f991b |
return -1;
|
|
|
6f991b |
|
|
|
6f991b |
if (fputc('\n',stdout) < 0)
|
|
|
6f991b |
return -1;
|
|
|
6f991b |
|
|
|
6f991b |
return 0;
|
|
|
6f991b |
}
|
|
|
fab986 |
|
|
|
fab986 |
int slbt_output_compile(
|
|
|
fab986 |
const struct slbt_driver_ctx * dctx,
|
|
|
fab986 |
const struct slbt_exec_ctx * ectx)
|
|
|
fab986 |
{
|
|
|
fab986 |
return slbt_output_exec(dctx,ectx,"compile");
|
|
|
fab986 |
}
|
|
|
ba3523 |
|
|
|
ca15b9 |
int slbt_output_install(
|
|
|
ca15b9 |
const struct slbt_driver_ctx * dctx,
|
|
|
ca15b9 |
const struct slbt_exec_ctx * ectx)
|
|
|
ca15b9 |
{
|
|
|
ca15b9 |
return slbt_output_exec(dctx,ectx,"install");
|
|
|
ca15b9 |
}
|
|
|
ca15b9 |
|
|
|
ba3523 |
int slbt_output_link(
|
|
|
ba3523 |
const struct slbt_driver_ctx * dctx,
|
|
|
ba3523 |
const struct slbt_exec_ctx * ectx)
|
|
|
ba3523 |
{
|
|
|
ba3523 |
return slbt_output_exec(dctx,ectx,"link");
|
|
|
ba3523 |
}
|