From 54044cd745c5a0aa02cefe2b3946e4090959aa4d Mon Sep 17 00:00:00 2001 From: midipix Date: Wed, 27 Mar 2024 20:33:46 +0000 Subject: slibtoolize mode: install slibtool.m4 only with a specified m4 macro dir. --- src/stoolie/slbt_stoolie_ctx.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/stoolie/slbt_stoolie_ctx.c') diff --git a/src/stoolie/slbt_stoolie_ctx.c b/src/stoolie/slbt_stoolie_ctx.c index ec87821..b74edd3 100644 --- a/src/stoolie/slbt_stoolie_ctx.c +++ b/src/stoolie/slbt_stoolie_ctx.c @@ -263,15 +263,13 @@ int slbt_st_get_stoolie_ctx( SLBT_SYSTEM_ERROR(dctx,dpath)); /* m4 directory */ - if (!(dpath = ctx->m4buf)) - dpath = slbt_this_dir; - - if ((ctx->fdm4 = openat(fdtgt,dpath,O_DIRECTORY,0)) < 0) - if (errno == ENOENT) - if (!mkdirat(fdtgt,dpath,0755)) - ctx->fdm4 = openat(fdtgt,dpath,O_DIRECTORY,0); + if ((dpath = ctx->m4buf)) + if ((ctx->fdm4 = openat(fdtgt,dpath,O_DIRECTORY,0)) < 0) + if (errno == ENOENT) + if (!mkdirat(fdtgt,dpath,0755)) + ctx->fdm4 = openat(fdtgt,dpath,O_DIRECTORY,0); - if (ctx->fdm4 < 0) + if (dpath && (ctx->fdm4 < 0)) return slbt_st_free_stoolie_ctx_impl( ctx,(-1), SLBT_SYSTEM_ERROR(dctx,dpath)); -- cgit v1.2.3