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.



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 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.


e.g.:

root@x065:[/data/prj/gnu/bash/bash-4.4.19]make distclean
    rm -f shell.o eval.o y.tab.o general.o make_cmd.o print_cmd.o   
dispose_cmd.o execute_cmd.o variables.o copy_cmd.o error.o  expr.o 
flags.o jobs.o subst.o hashcmd.o hashlib.o mailcheck.o  trap.o input.o 
unwind_prot.o pathexp.o sig.o test.o version.o  alias.o array.o 
arrayfunc.o assoc.o braces.o bracecomp.o bashhist.o  bashline.o  list.o 
stringlib.o locale.o findcmd.o redir.o  pcomplete.o pcomplib.o syntax.o 
xmalloc.o  bash bashbug

    rm -f .build .made version.h
...
    rm -f config.h config.cache config.status config.log stamp-h 
po/POTFILES config.status.lineno tags TAGS
    rm -f signames.h recho zecho printenv  tests/recho tests/zecho  
tests/printenv xcase tests/xcase  mksignames lsignames.h  mksyntax 
syntax.c bashversion bashversion.o buildversion.o mksignames.o 
signames.o buildsignames.o Makefile Makefile builtins/Makefile 
doc/Makefile  lib/readline/Makefile lib/glob/Makefile  lib/sh/Makefile 
lib/tilde/Makefile lib/malloc/Makefile  lib/termcap/Makefile 
examples/loadables/Makefile  examples/loadables/Makefile.inc 
examples/loadables/perl/Makefile support/Makefile lib/intl/Makefile 
po/Makefile po/Makefile.in pathnames.h


root@x065:[/data/prj/gnu/bash/bash-4.4.19]CPPFLAGS="-I/opt/include" 
CFLAGS="-I/opt/aixtools/include -O2 -qmaxmem=-1 -qarch=pwr5"\

    ./configure\
    --prefix=/opt/aixtools \
    --sysconfdir=/var/bash/etc\
    --sharedstatedir=/var/bash/com\
    --localstatedir=/var/bash\
    --mandir=/usr/share/man\
    --infodir=/opt/share/info/bash \
    > .buildaix/configure.out
configure: WARNING: bison not available; needed to process parse.y
+ /usr/bin/make > .buildaix/make.out
yacc: not found

make: 1254-004 The error code from the last command is 1.


Stop.
/usr/bin/make returned an error