[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Installing something nonstandard in $(libdir)
From: |
Zack Weinberg |
Subject: |
Installing something nonstandard in $(libdir) |
Date: |
Thu, 6 Feb 2020 17:31:07 -0500 |
For reasons too complicated to get into here, I have been
experimenting with building shared libraries in an autoconf+automake
build *without* using libtool. [Please do not try to talk me out of
this.] I have something that works correctly on ELF-based operating
systems with GCC, *except* for installation, where automake is
refusing to do what I want.
Specifically, suppose I have custom rules like this:
if ENABLE_SHARED
noinst_LIBRARIES += libfoo-pic.a
libfoo_pic_a_SOURCES = $(libfoo_a_SOURCES)
libfoo_pic_a_CFLAGS = $(libfoo_a_CFLAGS) $(PICFLAGS)
libfoo_so = libfoo$(SOEXT).1
$(libfoo_so): libcrypt-pic.a Makefile
$(AM_V_CCLD)$(LINK) $(SO_LDFLAGS) $(SONAME)$(libfoo_so) \
$(WHOLE_A) libfoo-pic.a $(END_WHOLE_A) $(SO_LIBS)
libfoo.so: Makefile
-$(AM_V_at)rm -f libfoo.so
$(AM_V_GEN)$(LN_S) $(libfoo_so) $@
endif
where $(PICFLAGS), $(SO_LDFLAGS), etc. are set by autoconf, then the
only missing piece is to install $(libfoo_so) and libfoo.so in
$(libdir), but I can't find any magic variable that will do that.
lib_LIBRARIES is the obvious choice but that throws errors like
Makefile.am:158: error: 'libfoo$(SOEXT).1' is not a standard library name
Makefile.am:158: did you mean 'libfoo$(SOEXT).a'?
and lib_DATA is the obvious alternative but that doesn't work either:
Makefile.am:145: error: 'libdir' is not a legitimate directory for 'DATA'
So, the question is, is there a lib_SOMETHING variable that I can use
to install to $(libdir) arbitrary stuff that automake doesn't
understand? If not, is there some other option?
(Please cc: me on replies, I'm not subscribed.)
zw
- Installing something nonstandard in $(libdir),
Zack Weinberg <=