poke-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Fix problem with generation of man/poke.1


From: John Darrington
Subject: Re: [PATCH] Fix problem with generation of man/poke.1
Date: Thu, 14 Nov 2019 13:00:15 +0100
User-agent: NeoMutt/20170113 (1.7.2)

On Thu, Nov 14, 2019 at 12:34:41PM +0100, Jose E. Marchesi wrote:
     
     Hi John.
     
         ---
          man/Makefile.am | 14 +++++++++-----
          1 file changed, 9 insertions(+), 5 deletions(-)
         
         diff --git a/man/Makefile.am b/man/Makefile.am
         index 1627b1f..30d0319 100644
         --- a/man/Makefile.am
         +++ b/man/Makefile.am
         @@ -23,10 +23,14 @@ MAINTAINERCLEANFILES = $(man_MANS)
          # The man pages depend on the version number.
          common_mandeps = $(top_srcdir)/configure.ac
          
         -# Depend on the source, not the binary; we don't need to regenerate
         -# the binary when any source file changes, only the main one.
         +# Jose writes:
         +##  Depend on the source, not the binary; we don't need to regenerate
         +##  the binary when any source file changes, only the main one.
         +# However, there is no guarantee that the binary will exist, so 
dependence
         +# on the source is appropriate, and help2man is cheap anyway.
     
     You mean "dependence on the object is appropriate"?

Yes.  That's what I meant.  Sorry
     
         +
          # Use -o so that the `missing' program can infer the output file.
          
         -poke.1: $(top_srcdir)/src/poke.c $(common_mandeps)
         -      $(HELP2MAN) -p poke --name="The GNU extensible binary editor" \
         -              $(builddir)/../src/poke -o $@
         +poke.1: $(top_builddir)/src/poke $(common_mandeps)
         + POKEDATADIR=$(abs_top_srcdir)/src $(HELP2MAN) -p poke --name="The
         GNU extensible binary editor" \
         +              $< -o $@
     
     I don't get it.  The man/ subdirectory is recursed by Automake after
     src/ while executing the target `all' so the binary should indeed exist
     at the time the rule is triggered...  

You cannot guarantee that.  Firstly, if the -j flag is passed then you
do not know the order - they could even happen in parallel.  Secondly,
when make sees a rule like :

basedir: src man x y

whilst *most* implementations (when no -j flag is given) process the 
targets from left to right, that is not specified by any standard
(the GNU Make manual doesn't specify)

FWIW: I recommend not using the SUBDIRS feature of automake.  Instead,
use a non recursive makefile system - it's faster and more reliable.
See Peter Miller's paper "Recursive Make Considererd Harmfull".

J'


-- 
Avoid eavesdropping.  Send strong encrypted email.
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3



reply via email to

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