Skip to content

Commit

Permalink
adding makefile.am that looks like it was written by a goblin
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <vsoch@users.noreply.github.com>
  • Loading branch information
vsoch committed Sep 2, 2022
1 parent b461086 commit 5e4cfbb
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ build
flux.egg-info
_*_clean.h
_*_preproc.h
*.so-built

# generated library version header
/src/common/libflux/version.h
Expand Down
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -577,4 +577,3 @@ AS_IF([test "x$enable_docs" != "xno"], [
AC_MSG_WARN([Python Docutils not found. Manual pages will not be generated.])
fi
])

37 changes: 36 additions & 1 deletion src/bindings/python/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
AM_CPPFLAGS = \
$(WARNING_CFLAGS) \
-Wno-missing-field-initializers \
-I$(top_srcdir) -I$(top_srcdir)/src/include \
-I$(top_srcdir)/src/common/libflux \
-I$(top_builddir)/src/common/libflux \
$(PYTHON_CPPFLAGS) \
$(CODE_COVERAGE_CFLAGS)

AM_LDFLAGS = \
-avoid-version \
-module \
$(san_ld_zdef_flag) \
-Wl,-rpath,$(PYTHON_PREFIX)/lib \
$(CODE_COVERAGE_LIBS) \
$(top_builddir)/src/common/.libs \
$(top_builddir)/src/common/libflux/.libs \
$(top_builddir)/src/common/libdebugged/.libs

STDERR_DEVNULL = $(stderr_devnull_$(V))
stderr_devnull_ = $(stderr_devnull_$(AM_DEFAULT_VERBOSITY))
stderr_devnull_0 = >/dev/null 2>&1

# This could run after make install
#install-data-hook:
# export FLUX_INSTALL_ROOT=$(realpath $(top_srcdir))
# $(AM_V_GEN)$(PYTHON) $(srcdir)/setup.py install
# touch core.so-built

# TODO, this currently builds the core redundantly, we probably need a check
if HAVE_FLUX_SECURITY
all: core.so-built hostlist.so-built idset.so-built rlist.so-built security.so-built
else
Expand All @@ -6,30 +36,35 @@ endif

# Note that if you provide --flux-root here it doesn't seem to take...
core.so-built: Makefile
ldconfig
export FLUX_INSTALL_ROOT=$(realpath $(top_srcdir))
$(AM_V_GEN)$(PYTHON) $(srcdir)/setup.py install
touch core.so-built

hostlist.so-built:
export LD_LIBRARY_PATH=$(top_builddir)/src/common/.libs:$(top_builddir)/src/common/libdebugged/.libs
export FLUX_INSTALL_ROOT=$(realpath $(top_srcdir))
$(AM_V_GEN)$(PYTHON) $(srcdir)/setup.py install --hostlist
touch hostlist.so-built

idset.so-built:
export LD_LIBRARY_PATH=$(top_builddir)/src/common/.libs:$(top_builddir)/src/common/libdebugged/.libs
export FLUX_INSTALL_ROOT=$(realpath $(top_srcdir))
$(AM_V_GEN)$(PYTHON) $(srcdir)/setup.py install --idset
touch idset.so-built

rlist.so-built:
export LD_LIBRARY_PATH=$(top_builddir)/src/common/.libs:$(top_builddir)/src/common/libdebugged/.libs
export FLUX_INSTALL_ROOT=$(realpath $(top_srcdir))
$(AM_V_GEN)$(PYTHON) $(srcdir)/setup.py install --rlist
touch rlist.so-built

security.so-built:
export LD_LIBRARY_PATH=$(top_builddir)/src/common/.libs:$(top_builddir)/src/common/libdebugged/.libs
export FLUX_INSTALL_ROOT=$(realpath $(top_srcdir))
$(AM_V_GEN)$(PYTHON) $(srcdir)/setup.py install --security \
--security-include=$(FLUX_SECURITY_INCDIR) \
--security-src=/code/security --flux-root=${FLUX_INSTALL_ROOT}
--security-src=/code/security
touch security.so-built

.PHONY: all core.so-built core.so-built idset.so-built rlist.so-built security.so-built
Expand Down
2 changes: 2 additions & 0 deletions src/bindings/python/_flux/_core_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
""",
libraries=["flux-core", "debugged", "flux"],
library_dirs=[
f"{root}/src/common/.libs",
f"{root}/src/common/libdebugged/.libs",
f"{root}/src/common/libflux/.libs",
],
Expand All @@ -36,6 +37,7 @@
],
extra_compile_args=[
f"-L{root}/src/common/.libs",
f"-L{root}/src/common/libflux/.libs",
f"-L{root}/src/common/libdebugged/.libs",
],
)
Expand Down

0 comments on commit 5e4cfbb

Please sign in to comment.