Skip to content
Snippets Groups Projects
Commit 049f59b2 authored by David Bigagli's avatar David Bigagli
Browse files

Modify the Makefile.am for the libpmi2 to build versioned library.

parent 871f576e
No related branches found
No related tags found
No related merge requests found
...@@ -5,10 +5,33 @@ AUTOMAKE_OPTIONS = foreign ...@@ -5,10 +5,33 @@ AUTOMAKE_OPTIONS = foreign
pkginclude_HEADERS = slurm/pmi2.h pkginclude_HEADERS = slurm/pmi2.h
PLUGIN_FLAGS = -module -avoid-version --export-dynamic if WITH_GNU_LD
PMI2_VERSION_SCRIPT = \
pmi2_version.map
PMI2_OTHER_FLAGS = \
-Wl,--version-script=$(PMI2_VERSION_SCRIPT)
endif
libpmi2_current = 0
libpmi2_age = 0
libpmi2_rev = 0
BUILT_SOURCES = $(PMI2_VERSION_SCRIPT)
lib_LTLIBRARIES = libpmi2.la lib_LTLIBRARIES = libpmi2.la
libpmi2_la_SOURCES = pmi2_api.c pmi2_util.c slurm/pmi2.h libpmi2_la_SOURCES = pmi2_api.c pmi2_util.c slurm/pmi2.h
libpmi2_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) libpmi2_la_LDFLAGS = $(LIB_LDFLAGS) -version-info $(libpmi2_current):$(libpmi2_rev):$(libpmi2_age) \
$(PMI2_OTHER_FLAGS)
$(PMI2_VERSION_SCRIPT) :
(echo "{ global:"; \
echo " PMI2_*;"; \
echo " local: *;"; \
echo "};") > $(PMI2_VERSION_SCRIPT)
CLEANFILES = \
$(PMI_VERSION_SCRIPT)
DISTCLEANFILES = \
$(PMI_VERSION_SCRIPT)
...@@ -397,11 +397,29 @@ top_builddir = @top_builddir@ ...@@ -397,11 +397,29 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@ top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign AUTOMAKE_OPTIONS = foreign
pkginclude_HEADERS = slurm/pmi2.h pkginclude_HEADERS = slurm/pmi2.h
PLUGIN_FLAGS = -module -avoid-version --export-dynamic @WITH_GNU_LD_TRUE@PMI2_VERSION_SCRIPT = \
@WITH_GNU_LD_TRUE@ pmi2_version.map
@WITH_GNU_LD_TRUE@PMI2_OTHER_FLAGS = \
@WITH_GNU_LD_TRUE@ -Wl,--version-script=$(PMI2_VERSION_SCRIPT)
libpmi2_current = 0
libpmi2_age = 0
libpmi2_rev = 0
BUILT_SOURCES = $(PMI2_VERSION_SCRIPT)
lib_LTLIBRARIES = libpmi2.la lib_LTLIBRARIES = libpmi2.la
libpmi2_la_SOURCES = pmi2_api.c pmi2_util.c slurm/pmi2.h libpmi2_la_SOURCES = pmi2_api.c pmi2_util.c slurm/pmi2.h
libpmi2_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) libpmi2_la_LDFLAGS = $(LIB_LDFLAGS) -version-info $(libpmi2_current):$(libpmi2_rev):$(libpmi2_age) \
all: all-am $(PMI2_OTHER_FLAGS)
CLEANFILES = \
$(PMI_VERSION_SCRIPT)
DISTCLEANFILES = \
$(PMI_VERSION_SCRIPT)
all: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) all-am
.SUFFIXES: .SUFFIXES:
.SUFFIXES: .c .lo .o .obj .SUFFIXES: .c .lo .o .obj
...@@ -610,13 +628,15 @@ distdir: $(DISTFILES) ...@@ -610,13 +628,15 @@ distdir: $(DISTFILES)
fi; \ fi; \
done done
check-am: all-am check-am: all-am
check: check-am check: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) check-am
all-am: Makefile $(LTLIBRARIES) $(HEADERS) all-am: Makefile $(LTLIBRARIES) $(HEADERS)
installdirs: installdirs:
for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"; do \ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done done
install: install-am install: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) install-am
install-exec: install-exec-am install-exec: install-exec-am
install-data: install-data-am install-data: install-data-am
uninstall: uninstall-am uninstall: uninstall-am
...@@ -638,14 +658,17 @@ install-strip: ...@@ -638,14 +658,17 @@ install-strip:
mostlyclean-generic: mostlyclean-generic:
clean-generic: clean-generic:
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic: distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic: maintainer-clean-generic:
@echo "This command is intended for maintainers to use" @echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild." @echo "it deletes files that may require special tools to rebuild."
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
clean: clean-am clean: clean-am
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
...@@ -717,7 +740,7 @@ ps-am: ...@@ -717,7 +740,7 @@ ps-am:
uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS
.MAKE: install-am install-strip .MAKE: all check install install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
clean-libLTLIBRARIES clean-libtool ctags distclean \ clean-libLTLIBRARIES clean-libtool ctags distclean \
...@@ -735,6 +758,12 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS ...@@ -735,6 +758,12 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS
uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS
$(PMI2_VERSION_SCRIPT) :
(echo "{ global:"; \
echo " PMI2_*;"; \
echo " local: *;"; \
echo "};") > $(PMI2_VERSION_SCRIPT)
# Tell versions [3.59,3.63) of GNU make to not export all variables. # Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded. # Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: .NOEXPORT:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment