Re: make distclean breaks "later "configure && makes"", i.e., removes a file in distro that a build needs (cannot process parse.y)

2018-02-14 Thread Michael Felt

I'll start all over again - using the following structure:

cd dist; wget distro..tar.gz

cd ../src; gzip -dc ../dist/distro.tar.gz | tar xf -

mkdir ../distro; cd ../distro

../src/distro/configure --arguments; make; make distclean

../src/distro/configure --arguments; make

As I have not been build OOT, maybe this fixes it - I forget why I am 
not building OOT. Maybe because I was not being handy when having to 
update a source tree with a patch.


IF above works - I'll say "my mistake", if not - might still be my 
mistake, but not one I can figure out.




On 2/14/2018 4:32 PM, Chet Ramey wrote:

There is code in the Makefile that attempts to detect when the build and
source directories are not the same, and removes y.tab.[ch] from the build
directory when they are not. The problem is that when you run
`./configure', the source directory gets set to `.' and the build directory
gets set to the absolute pathname.  Those don't compare as equal, and the
files get removed.

I could solve that problem with a short `same_dir' script, but maybe
there's an easier way.





Re: make distclean breaks "later "configure && makes"", i.e., removes a file in distro that a build needs (cannot process parse.y)

2018-02-14 Thread Chet Ramey
On 2/14/18 7:03 AM, Michael Felt wrote:
> I can down the distribution, e.g.
> ftp://ftp.gnu.org/gnu/bash/bash-4.4.18.tar.gz, unpack it, goto base
> directory and run configure.
> 
> Thought I had reported this earlier, but guess not!
> 
> If after a successful build, I run "make distclean" - "./configure &&
> make"  no longer works.

There is code in the Makefile that attempts to detect when the build and
source directories are not the same, and removes y.tab.[ch] from the build
directory when they are not. The problem is that when you run
`./configure', the source directory gets set to `.' and the build directory
gets set to the absolute pathname.  Those don't compare as equal, and the
files get removed.

I could solve that problem with a short `same_dir' script, but maybe
there's an easier way.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/



Re: make distclean breaks "later "configure && makes"", i.e., removes a file in distro that a build needs (cannot process parse.y)

2018-02-14 Thread Martijn Dekker
Op 14-02-18 om 14:29 schreef Greg Wooledge:
> On Wed, Feb 14, 2018 at 01:03:05PM +0100, Michael Felt wrote:
>> If after a successful build, I run "make distclean" - "./configure && make" 
>> no longer works.
> 
>> configure: WARNING: bison not available; needed to process parse.y
>> + /usr/bin/make > .buildaix/make.out
>> yacc: not found
> 
> You need to install the bison package.  The tarballs of bash source
> include an already-processed yacc file, but "make distclean" removes
> that, and you need bison (or yacc, but bison is preferred) to recreate
> it.

But isn't it the point of "make distclean" to delete everything *except*
the files that come with the tarball distribution?

- M.




Re: make distclean breaks "later "configure && makes"", i.e., removes a file in distro that a build needs (cannot process parse.y)

2018-02-14 Thread Greg Wooledge
On Wed, Feb 14, 2018 at 01:03:05PM +0100, Michael Felt wrote:
> If after a successful build, I run "make distclean" - "./configure && make" 
> no longer works.

> configure: WARNING: bison not available; needed to process parse.y
> + /usr/bin/make > .buildaix/make.out
> yacc: not found

You need to install the bison package.  The tarballs of bash source
include an already-processed yacc file, but "make distclean" removes
that, and you need bison (or yacc, but bison is preferred) to recreate
it.