automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: automake 1.7.1 hangs while processing Makefile.am


From: Jason Jordan
Subject: Re: automake 1.7.1 hangs while processing Makefile.am
Date: Sat, 7 Dec 2002 00:14:12 -0500 (EST)

On Tue, 3 Dec 2002, Alexandre Duret-Lutz wrote:

[...]

> As a workaround I suggest you use _LDADD substitutions as
> suggested in the `Conditional Sources' section of the manual.
>
> Basically instead of playing with conditionals, you should just
> fill an AC_SUBSTed variable with the objects you want.
>
> test "x$needs_mode_cat" = xyes && condobjs="$condobj mod_cat.$(OBJEXT)"
> test "x$needs_mode_cmp" = xyes && condobjs="$condobj mod_cmp.$(OBJEXT)"
> test "x$needs_mode_fix" = xyes && condobjs="$condobj mod_fix.$(OBJEXT)"
> ...
> AC_SUBST([condobjs])
>
> Then use $(condobjs) to fill shntool_LDADD and
> shntool_DEPENDENCIES in Makefile.am.


Thank you, this worked like a charm.  I also had to add all possible
format source files to EXTRA_DIST so they would be included in the
distribution.  :)

I've included my current Makefile.am below for reference, in case anyone
is curious.  It works fine with the latest automake 1.7.2.

Thanks again for your help!

-jason


--- src/Makefile.am ---
CORE_SOURCES = core_convert.c core_fileio.c core_misc.c core_output.c 
core_shntool.c core_wave.c
GLUE_SOURCES = glue_modes.c glue_formats.c
MODE_SOURCES_ALL = mode_cat.c mode_cmp.c mode_conv.c mode_fix.c mode_info.c 
mode_join.c mode_len.c mode_split.c mode_strip.c
FORMAT_SOURCES_ALL = format_aiff.c format_ape.c format_flac.c format_lpac.c 
format_null.c format_ofr.c format_shn.c format_wav.c

MODE_ALIASES_ALL = $(shell echo $(MODE_SOURCES_ALL) | sed -e 's/mode_//g' -e 
's/\.c//g')
MODE_ALIASES = @MODES_CONFIGURED@

MODULE_OBJS = @MODE_OBJS@ @FORMAT_OBJS@

bin_PROGRAMS = shntool

shntool_SOURCES = $(CORE_SOURCES)
nodist_shntool_SOURCES = $(GLUE_SOURCES)
shntool_LDADD = $(MODULE_OBJS)
shntool_DEPENDENCIES = $(MODULE_OBJS)

EXTRA_DIST = $(MODE_SOURCES_ALL) $(FORMAT_SOURCES_ALL)

install-exec-hook:
        for mode_alias in $(MODE_ALIASES_ALL) ; do \
          test -e $(bindir)/shn$$mode_alias && $(RM) $(bindir)/shn$$mode_alias 
; \
        done ; \
        for mode_alias in $(MODE_ALIASES) ; do \
          test -e $(bindir)/shn$$mode_alias || $(LN_S) $(PACKAGE) 
$(bindir)/shn$$mode_alias ; \
        done

distclean-local:
        $(RM) $(GLUE_SOURCES)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]