Skip to content

Commit

Permalink
build: clean up RC_LIBEXECDIR and RC_PLUGINDIR definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
williamh committed Sep 19, 2024
1 parent f13591b commit cf5703d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
9 changes: 2 additions & 7 deletions src/librc/meson.build
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
rc_h_conf_data = configuration_data()
if rootprefix == '/'
rc_h_conf_data.set('PREFIX', '')
else
rc_h_conf_data.set('PREFIX', rootprefix)
endif
rc_h_conf_data.set('LIB', libname)
rc_h_conf_data.set('LIBEXECDIR', rc_libexecdir)
rc_h_conf_data.set('RC_LIBEXECDIR', get_option('prefix') / get_option('libexecdir') / 'rc')
rc_h_conf_data.set('RC_PLUGINDIR', get_option('prefix') / libdir / 'rc/plugins' )
rc_h_conf_data.set('LOCAL_PREFIX', local_prefix)
rc_h_conf_data.set('PKG_PREFIX', pkg_prefix)
rc_h_conf_data.set('SYSCONFDIR', get_option('sysconfdir'))
Expand Down
10 changes: 3 additions & 7 deletions src/librc/rc.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,9 @@
extern "C" {
#endif

#define RC_PREFIX "@PREFIX@"
#define RC_SYSCONFDIR "@SYSCONFDIR@"
#define RC_LIBDIR "@PREFIX@/@LIB@/rc"
#define RC_LIBEXECDIR "@LIBEXECDIR@"
#if defined(PREFIX)
#define RC_SVCDIR RC_LIBEXECDIR "/init.d"
#elif defined(__linux__) || (defined(__FreeBSD_kernel__) && \
#define RC_LIBEXECDIR "@RC_LIBEXECDIR@"
#if defined(__linux__) || (defined(__FreeBSD_kernel__) && \
defined(__GLIBC__)) || defined(__GNU__)
#define RC_SVCDIR "/run/openrc"
#else
Expand All @@ -37,7 +33,7 @@ extern "C" {
#define RC_RUNLEVELDIR RC_SYSCONFDIR "/runlevels"
#define RC_INITDIR RC_SYSCONFDIR "/init.d"
#define RC_CONFDIR RC_SYSCONFDIR "/conf.d"
#define RC_PLUGINDIR RC_LIBDIR "/plugins"
#define RC_PLUGINDIR "@RC_PLUGINDIR@"

#define RC_INIT_FIFO RC_SVCDIR"/init.ctl"
#define RC_PROFILE_ENV RC_SYSCONFDIR "/profile.env"
Expand Down

0 comments on commit cf5703d

Please sign in to comment.