automake
[Top][All Lists]
Advanced

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

Re: simple recipe for multiple outputs in manual is parallel-unsafe?


From: Bruce Korb
Subject: Re: simple recipe for multiple outputs in manual is parallel-unsafe?
Date: Fri, 14 Oct 2011 10:39:04 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110616 SUSE/3.1.11 Thunderbird/3.1.11

On 10/14/11 09:31, Dave Goodell wrote:

Having pondered this issue a lot for my playtime toy:
   http://www.gnu.org/software/autogen

my solution was to implement -M options, a la gcc.
That's fine for that thing, but it leads me to what is likely
a proper ultimate solution for multi-output tools:  wrapper scripts

When the wrapper script runs successfully, it emits the sentinel
file.  Syntax for support integrated directly into "make" would
be nice, but meanwhile wrapper scripts can be hacked together.
I think it makes make file writing easier.


For amusement, "-MFstamp-opts" creates an empty file with the
correct time stamp and the rule to create it lives in the Makefile.


$ cat .deps/opts-dep
# Makefile dependency file created by autogen
# with the following command:
#   /old-home/bkorb/ag/ag/agen5/.libs/autogen
#   -L../autoopts/tpl
#   -L../autoopts/tpl
#   -MF.deps/opts-dep
#   -MTstamp-opts
#   ./opts.def
AUTOGEN_stamp_opts_TList = \
        opts.h \
        opts.c

AUTOGEN_stamp_opts_SList = \
        ./opts.def \
        ../autoopts/tpl/options.tpl \
        ../autoopts/tpl/optlib.tlib \
        ../autoopts/tpl/tpl-config.tlib \
        ../autoopts/tpl/opthead.tlib \
        ../autoopts/tpl/optcode.tlib \
        ../autoopts/tpl/optmain.tlib

stamp-opts : $(AUTOGEN_stamp_opts_SList)

$(AUTOGEN_stamp_opts_TList) : stamp-opts
        @:



reply via email to

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