gnucobol-users
[Top][All Lists]
Advanced

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

Re: [GnuCOBOL-users] generating tarstamp.h on trunk


From: James K. Lowden
Subject: Re: [GnuCOBOL-users] generating tarstamp.h on trunk
Date: Wed, 19 Sep 2018 13:01:15 -0400

On Tue, 18 Sep 2018 19:45:26 +0200
Simon Sobisch <address@hidden> wrote:

> HACKING says:
> If you build from VCS the tools in the first 4 lists are always
> needed.
> 
> For running build_aux/bootstrap (necessary after VCS checkout) /
> reconfigure:
>   o autoconf 2.64
...
> I'm quite sure the part
> *running build_aux/bootstrap (necessary after VCS checkout)*
> should be more obvious.
> 
> Can you please suggest a patch/new version?

I suggest "make" work as directed.  The user shouldn't have to read
README to read HACKING to run build_aux/bootstrap to compile the code.

Below is a script that produces a useful tarstamp.h:  

[snip]
#!/bin/sh
export LC_ALL=C

while read name when
do
    printf "#define %s %s\n" $name "$when"
done<<EOF
COB_TAR_DATE "$(date -u +'%b %d %Y %T') UTC" 
COB_NUM_TAR_DATE $(date -u +'%Y%m%d')
COB_NUM_TAR_TIME $(date -u +'%H%M%S')
EOF
[pins]

add it to the root as "tarstamp.gen".  Refer to it as
$(top_srcdir)/tarstamp.gen in Makefile.am.  Add a rule to Makefile.am

        $(top_builddir)/tarstamp: $(top_srcdir)/tarstamp.gen
                $^ > address@hidden && mv address@hidden $@

Make make sure tarstamp.h is a prerequisite for anything that needs it.
Remove any other generation logic from Makefile.am and bootstrap.  

How does that sound?  

--jkl





reply via email to

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