diff options
-rw-r--r-- | Makefile.am | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/Makefile.am b/Makefile.am index f5ebb2f..776e3a7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -27,31 +27,36 @@ include $(top_srcdir)/tests/local.mk MANUAL = Distribution Build System +SHSOEXT = .shso SHPPFLAGS = \ -DPKGLIBDIR="$(pkgdatadir)" \ -DDATADIR="$(datadir)" \ -DLOCALEDIR="$(localedir)" \ -DSYSCONFDIR="$(sysconfdir)" \ -DMETADATA="$(METADATA)" +LINKLIB = '$(srcdir)/tools/shld.sh' -o $@ bin_SCRIPTS = $(bin_sources:.sh=) -pkgdata_DATA = $(pkgdata_sources:.sh=.sho) -pkgdatapackage_DATA = $(pkgdatapackage_sources:.sh=.sho) -pkgdatametadata_DATA = $(pkgdatametadata_sources:.sh=.sho) +libdata_DATA = lib/libopkbuild$(SHSOEXT)$(libopkbuild_shsoversion) +libopkbuild_sources = \ + $(pkgdata_sources) \ + $(pkgdatapackage_sources) \ + $(pkgdatametadata_sources) +libopkbuild_ldadd = $(libopkbuild_sources:.sh=.sho) +libopkbuild_dependencies = $(libopkbuild_ldadd) +libopkbuild_shsoversion = .1 man1_MANS = $(man1_sources:.1in=.1) man3_MANS = $(man3_sources:.3in=.3) locale_MESSAGES = $(locale_sources:.sh=.ms) dist_pkgdata_DATA = optstring CLEANFILES = \ $(bin_SCRIPTS) \ - $(pkgdata_DATA) \ - $(pkgdatapackage_DATA) \ - $(pkgdatametadata_DATA) \ + $(libdata_DATA) \ + $(libopkbuild_ldadd) \ $(man1_MANS) \ $(man3_MANS) \ $(locale_MESSAGES) -pkgdatapackagedir = $(pkgdatadir)/package -pkgdatametadatadir = $(pkgdatadir)/metadata +libdatadir = $(datadir)/sh helperdir = $(pkgdatadir)/helpers EXTRA_DIST = \ COPYING.2 \ @@ -61,9 +66,7 @@ EXTRA_DIST = \ autogen.sh \ mksysconf.in \ $(bin_sources) \ - $(pkgdata_sources) \ - $(pkgdatapackage_sources) \ - $(pkgdatametadata_sources) \ + $(libopkbuild_sources) \ $(man1_sources) \ $(man3_sources) \ $(locale_sources) \ @@ -161,6 +164,10 @@ test: printf '\n'; \ exit $${failed} +lib/libopkbuild$(SHSOEXT)$(libopkbuild_shsoversion): $(libopkbuild_dependencies) + @rm -f lib/libopkbuild$(SHSOEXT)$(libopkbuild_shsoversion) + $(AM_V_CCLD)$(LINKLIB) $(libopkbuild_ldadd) + .sh: $(AM_V_GEN)$(MKDIR_P) "$$(dirname $@)" $(AM_V_at)$(do_subst) $< >$@ |