Re: generating tarstamp.h on trunk

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

 



On Tue, 18 Sep 2018 19:45:26 +0200
Simon Sobisch <simonsobisch@xxxxxx> 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
		$^ > $@~ && mv $@~ $@

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






[Index of Archives]     [Gcc Help]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Info]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux