Skip to content

Commit

Permalink
Merge pull request #5511 from garlick/build_fixes
Browse files Browse the repository at this point in the history
misc build system cleanup
  • Loading branch information
mergify[bot] authored Oct 19, 2023
2 parents 475229a + abb87fb commit 4bf109f
Show file tree
Hide file tree
Showing 17 changed files with 156 additions and 162 deletions.
46 changes: 29 additions & 17 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -442,41 +442,53 @@ AC_PKGCONFIG
##
# Project directories
##
AS_VAR_SET(fluxrcdir, $sysconfdir/flux)
AC_SUBST(fluxrcdir)

AS_VAR_SET(fluxrc1dir, $sysconfdir/flux/rc1.d)
AC_SUBST(fluxrc1dir)

AS_VAR_SET(fluxrc3dir, $sysconfdir/flux/rc3.d)
AC_SUBST(fluxrc3dir)

AS_VAR_SET(fluxlibexecdir, $libexecdir/flux)
adl_RECURSIVE_EVAL(["$sysconfdir/flux"], [fluxconfdir])
AC_DEFINE_UNQUOTED([FLUXCONFDIR], ["$fluxconfdir"],
[The expansion of "$sysconfdir/flux"])
AC_SUBST(fluxconfdir)

adl_RECURSIVE_EVAL(["$libexecdir/flux"], [fluxlibexecdir])
AC_DEFINE_UNQUOTED([FLUXLIBEXECDIR], ["$fluxlibexecdir"],
[The expansion of "$libexecdir/flux"])
AC_SUBST(fluxlibexecdir)

AS_VAR_SET(fluxcmddir, $libexecdir/flux/cmd)
adl_RECURSIVE_EVAL(["$libexecdir/flux/cmd"], [fluxcmddir])
AC_DEFINE_UNQUOTED([FLUXCMDDIR], ["$fluxcmddir"],
[The expansion of "$libexecdir/flux/cmd"])
AC_SUBST(fluxcmddir)

AS_VAR_SET(fluxlibdir, $libdir/flux)
adl_RECURSIVE_EVAL(["$libdir/flux"], [fluxlibdir])
AC_DEFINE_UNQUOTED([FLUXLIBDIR], ["$fluxlibdir"],
[The expansion of "$libdir/flux"])
AC_SUBST(fluxlibdir)

# Target of PYTHONPATH set by flux(1) cmddriver, so flux(1)
# doesn't inadvertently insert system python paths (or any
# other python path for that matter) first in PYTHONPATH.
#
AS_VAR_SET(fluxpylinkdir, $fluxlibdir/python$PYTHON_VERSION)
adl_RECURSIVE_EVAL(["$fluxlibdir/python$PYTHON_VERSION"], [fluxpylinkdir])
AC_DEFINE_UNQUOTED([FLUXPYLINKDIR], ["$fluxpylinkdir"],
[The expansion of "$fluxlibdir/python$PYTHON_VERSION"])
AC_SUBST(fluxpylinkdir)

AS_VAR_SET(fluxmoddir, $libdir/flux/modules)
adl_RECURSIVE_EVAL(["$libdir/flux/modules"], [fluxmoddir])
AC_DEFINE_UNQUOTED([FLUXMODDIR], ["$fluxmoddir"],
[The expansion of "$libdir/flux/modules"])
AC_SUBST(fluxmoddir)

AS_VAR_SET(jobtap_plugindir, $libdir/flux/job-manager/plugins)
adl_RECURSIVE_EVAL(["$libdir/flux/job-manager/plugins"], [jobtap_plugindir])
AC_DEFINE_UNQUOTED([JOBTAP_PLUGINDIR], ["$jobtap_plugindir"],
[The expansion of "$libdir/flux/job-manager/plugins"])
AC_SUBST(jobtap_plugindir)

AS_VAR_SET(shell_plugindir, $libdir/flux/shell/plugins)
adl_RECURSIVE_EVAL(["$libdir/flux/shell/plugins"], [shell_plugindir])
AC_DEFINE_UNQUOTED([SHELL_PLUGINDIR], ["$shell_plugindir"],
[The expansion of "$libdir/flux/shell/plugins"])
AC_SUBST(shell_plugindir)

AS_VAR_SET(fluxconnectordir, $libdir/flux/connectors)
adl_RECURSIVE_EVAL(["$libdir/flux/connectors"], [fluxconnectordir])
AC_DEFINE_UNQUOTED([FLUXCONNECTORDIR], ["$fluxconnectordir"],
[The expansion of "$libdir/flux/connectors"])
AC_SUBST(fluxconnectordir)

AS_VAR_SET(fluxincludedir, $includedir/flux)
Expand Down
4 changes: 3 additions & 1 deletion etc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ systemdsystemunit_DATA = flux.service
#endif

tmpfilesdir = $(prefix)/lib/tmpfiles.d
fluxrc1dir = $(fluxconfdir)/rc1.d

tmpfiles_DATA = flux.conf

dist_fluxrc_SCRIPTS = \

dist_fluxconf_SCRIPTS = \
rc1 \
rc3

Expand Down
6 changes: 2 additions & 4 deletions etc/flux-core.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ libdir=@libdir@
includedir=@includedir@
datarootdir=@datarootdir@
mandir=@mandir@
fluxrcdir=@fluxrcdir@
fluxrc1dir=@fluxrc1dir@
fluxrc3dir=@fluxrc3dir@
fluxconfdir=@fluxconfdir@
fluxcmddir=@fluxcmddir@
fluxlibdir=@fluxlibdir@
fluxmoddir=@fluxmoddir@
fluxcmdhelpdir=@datadir@/flux/help.d
fluxshellrcdir=@fluxrcdir@/shell
fluxshellrcdir=@fluxconfdir@/shell
fluxshellpluginpath=@fluxlibdir@/shell/plugins

Name: flux-core
Expand Down
2 changes: 2 additions & 0 deletions src/broker/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ flux_broker_LDADD = \
$(builddir)/libbroker.la \
$(top_builddir)/src/common/libflux-core.la \
$(top_builddir)/src/common/libzmqutil/libzmqutil.la \
$(top_builddir)/src/common/libflux/libflux.la \
$(top_builddir)/src/common/libsubprocess/libsubprocess.la \
$(top_builddir)/src/common/libpmi/libupmi.la \
$(top_builddir)/src/common/libpmi/libpmi_client.la \
Expand All @@ -91,6 +92,7 @@ test_ldadd = \
$(top_builddir)/src/common/libtestutil/libtestutil.la \
$(top_builddir)/src/common/libflux-core.la \
$(top_builddir)/src/common/libzmqutil/libzmqutil.la \
$(top_builddir)/src/common/libflux/libflux.la \
$(top_builddir)/src/common/libflux-internal.la \
$(top_builddir)/src/common/libtap/libtap.la \
$(ZMQ_LIBS) \
Expand Down
19 changes: 10 additions & 9 deletions src/cmd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,20 @@ AM_CPPFLAGS = \
$(ZMQ_CFLAGS) \
$(FLUX_SECURITY_CFLAGS) \
$(HWLOC_CFLAGS) \
$(PMIX_CFLAGS) \
$(JANSSON_CFLAGS) \
$(LIBARCHIVE_CFLAGS)


fluxcmd_ldadd = \
$(top_builddir)/src/common/libkvs/libkvs.la \
$(top_builddir)/src/common/librlist/librlist.la \
$(top_builddir)/src/common/libpmi/libupmi.la \
$(top_builddir)/src/common/libpmi/libpmi_client.la \
$(top_builddir)/src/common/libpmi/libpmi_common.la \
$(top_builddir)/src/common/libflux-internal.la \
$(top_builddir)/src/common/libflux-core.la \
$(top_builddir)/src/common/libflux-optparse.la \
$(top_builddir)/src/common/libccan/libccan.la \
$(top_builddir)/src/common/libfilemap/libfilemap.la \
$(FLUX_SECURITY_LIBS) \
$(LIBPTHREAD) \
$(HWLOC_LIBS) \
$(JANSSON_LIBS) \
$(LIBARCHIVE_LIBS) \
$(PMIX_LIBS)
$(JANSSON_LIBS)

LDADD = $(fluxcmd_ldadd)

Expand Down Expand Up @@ -88,6 +81,14 @@ flux_SOURCES = \
nodist_flux_SOURCES = \
builtin-cmds.c

flux_LDADD = \
$(top_builddir)/src/common/libpmi/libupmi.la \
$(top_builddir)/src/common/libpmi/libpmi_client.la \
$(top_builddir)/src/common/libpmi/libpmi_common.la \
$(top_builddir)/src/common/libfilemap/libfilemap.la \
$(LIBARCHIVE_LIBS) \
$(fluxcmd_ldadd)

#
# Flux subcommands
#
Expand Down
1 change: 0 additions & 1 deletion src/common/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ noinst_LTLIBRARIES = libflux-internal.la
libflux_internal_la_SOURCES =
libflux_internal_la_LIBADD = \
$(builddir)/libfluxutil/libfluxutil.la \
$(builddir)/libflux/libmessage.la \
$(builddir)/liblsd/liblsd.la \
$(builddir)/libccan/libccan.la \
$(builddir)/libutil/libutil.la \
Expand Down
6 changes: 0 additions & 6 deletions src/common/libdebugged/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ AM_CPPFLAGS = \
noinst_LTLIBRARIES = libdebugged.la
libdebugged_la_SOURCES = debugged.c debugged.h

libdebugged_la_CPPFLAGS = \
$(AM_CPPFLAGS)
libdebugged_la_LDFLAGS = \
-avoid-version -module -shared -export-dynamic \
$(AM_LDFLAGS)

TESTS = test_debugged.t

check_PROGRAMS = $(TESTS)
Expand Down
6 changes: 0 additions & 6 deletions src/common/libeventlog/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ libeventlog_la_SOURCES = \
eventlogger.h \
eventlogger.c

libeventlog_la_CPPFLAGS = \
$(AM_CPPFLAGS)
libeventlog_la_LDFLAGS = \
-avoid-version \
$(AM_LDFLAGS)

TESTS = test_eventlog.t

check_PROGRAMS = $(TESTS)
Expand Down
76 changes: 14 additions & 62 deletions src/common/libflux/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,51 +11,13 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/common/libccan \
-I$(top_builddir) \
-I$(top_builddir)/src/common/libflux \
-DABS_TOP_BUILDDIR=\"${abs_top_builddir}\" \
-DABS_TOP_SRCDIR=\"${abs_top_srcdir}\" \
-DLUADIR=\"$(luadir)\" \
-DLUAEXECDIR=\"$(luaexecdir)\" \
$(JANSSON_CFLAGS) \
$(LIBUUID_CFLAGS)

installed_conf_cppflags = \
-DINSTALLED_MODULE_PATH=\"$(fluxmoddir)\" \
-DINSTALLED_CONNECTOR_PATH=\"$(fluxconnectordir)\" \
-DINSTALLED_EXEC_PATH=\"$(fluxcmddir)\" \
-DINSTALLED_LUA_PATH_ADD=\"$(luadir)/?.lua\" \
-DINSTALLED_LUA_CPATH_ADD=\"$(luaexecdir)/?.so\" \
-DINSTALLED_PYTHON_PATH=\"$(fluxpylinkdir)\" \
-DINSTALLED_MAN_PATH=\"$(mandir)\" \
-DINSTALLED_PROGRAM_LIBRARY_PATH=\"$(fluxlibdir)\" \
-DINSTALLED_PMI_LIBRARY_PATH=\"$(fluxlibdir)/libpmi.so\" \
-DINSTALLED_RC1_PATH=\"$(fluxrcdir)/rc1\" \
-DINSTALLED_RC3_PATH=\"$(fluxrcdir)/rc3\" \
-DINSTALLED_SHELL_PATH=\"$(fluxlibexecdir)/flux-shell\" \
-DINSTALLED_SHELL_PLUGINPATH=\"$(fluxlibdir)/shell/plugins\" \
-DINSTALLED_SHELL_INITRC=\"$(fluxrcdir)/shell/initrc.lua\" \
-DINSTALLED_JOBTAP_PLUGINPATH=\"$(fluxlibdir)/job-manager/plugins\" \
-DINSTALLED_UPMI_PLUGINPATH=\"$(fluxlibdir)/upmi/plugins\" \
-DINSTALLED_CMDHELP_PATTERN=\"${datadir}/flux/help.d/*.json\" \
-DINSTALLED_NO_DOCS_PATH=\"${datadir}/flux/.nodocs\" \
-DINSTALLED_RUNDIR=\"${runstatedir}/flux\"

intree_conf_cppflags = \
-DINTREE_MODULE_PATH=\"$(abs_top_builddir)/src/modules/.libs\" \
-DINTREE_CONNECTOR_PATH=\"$(abs_top_builddir)/src/connectors/.libs\" \
-DINTREE_EXEC_PATH=\"$(abs_top_builddir)/src/cmd:$(abs_top_srcdir)/src/cmd:$(abs_top_builddir)/src/broker\" \
-DINTREE_LUA_PATH_ADD=\"$(abs_top_builddir)/t/?.lua\;$(abs_top_srcdir)/src/bindings/lua/?.lua\" \
-DINTREE_LUA_CPATH_ADD=\"$(abs_top_builddir)/src/bindings/lua/?.so\" \
-DINTREE_PYTHON_PATH=\"$(abs_top_builddir)/src/bindings/python:$(abs_top_srcdir)/src/bindings/python\" \
-DINTREE_MAN_PATH=\"$(abs_top_builddir)/doc\" \
-DINTREE_PROGRAM_LIBRARY_PATH=\"$(abs_top_builddir)/src/common/.libs\" \
-DINTREE_PMI_LIBRARY_PATH=\"$(abs_top_builddir)/src/common/flux/.libs/libpmi.so\" \
-DINTREE_RC1_PATH=\"$(abs_top_srcdir)/etc/rc1\" \
-DINTREE_RC3_PATH=\"$(abs_top_srcdir)/etc/rc3\" \
-DINTREE_SHELL_PATH=\"$(abs_top_builddir)/src/shell/flux-shell\" \
-DINTREE_SHELL_PLUGINPATH=\"$(abs_top_builddir)/src/shell/plugins\" \
-DINTREE_SHELL_INITRC=\"$(abs_top_srcdir)/src/shell/initrc.lua\" \
-DINTREE_JOBTAP_PLUGINPATH=\"$(abs_top_builddir)/src/modules/job-manager/plugins/.libs\" \
-DINTREE_UPMI_PLUGINPATH=\"$(abs_top_builddir)/src/common/libpmi/plugins/.libs\" \
-DINTREE_CMDHELP_PATTERN=\"${abs_top_builddir}/etc/flux/help.d/*.json\" \
-DINTREE_NO_DOCS_PATH=\"${abs_top_builddir}/etc/flux/.nodocs\"


fluxcoreinclude_HEADERS = \
flux.h \
types.h \
Expand Down Expand Up @@ -87,8 +49,7 @@ nodist_fluxcoreinclude_HEADERS = \
version.h

noinst_LTLIBRARIES = \
libflux.la \
libmessage.la
libflux.la

libflux_la_SOURCES = \
flog.c \
Expand All @@ -103,6 +64,13 @@ libflux_la_SOURCES = \
reactor_private.h \
msg_handler.c \
message.c \
message_private.h \
message_iovec.h \
message_iovec.c \
message_route.h \
message_route.c \
message_proto.h \
message_proto.c \
msglist.c \
request.c \
response.c \
Expand Down Expand Up @@ -134,24 +102,8 @@ libflux_la_SOURCES = \
fripp.h \
fripp.c

libflux_la_CPPFLAGS = \
$(installed_conf_cppflags) \
$(intree_conf_cppflags) \
$(AM_CPPFLAGS)
libflux_la_LDFLAGS = -avoid-version -module -shared -export-dynamic

libmessage_la_SOURCES = \
message_private.h \
message_iovec.h \
message_iovec.c \
message_route.h \
message_route.c \
message_proto.h \
message_proto.c


libmessage_la_CPPFLAGS = $(AM_CPPFLAGS)
libmessage_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
libflux_la_LDFLAGS = \
$(AM_LDFLAGS)

TESTS = test_message.t \
test_msglist.t \
Expand Down
Loading

0 comments on commit 4bf109f

Please sign in to comment.