This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Remove grammar rule from Makefile
Type: Stage:
Components: Build Versions:
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: donnc, nascheme
Priority: normal Keywords: patch

Created on 2001-02-08 07:20 by donnc, last changed 2022-04-10 16:03 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
None donnc, 2001-02-08 07:20 None
Messages (4)
msg35647 - (view) Author: Donn Cave (donnc) Date: 2001-02-08 07:20
When building from a distinct source directory, the build directory is naturally
empty, so make tries to build graminit.c and graminit.h and move them to their
natural location - the source directory.  When the source directory is a read-only
filesystem that kills the build, and anyway it's inappropriate.  There may be a
better way to express the rule, but previous releases seem to have mostly omitted
it anyway.
msg35648 - (view) Author: Neil Schemenauer (nascheme) * (Python committer) Date: 2001-02-16 04:14
I've checked in, IMHO, a better solution.  The grammar
source files are now generated in the build directory.  If
this doesn't work for a read-only source dir please let me
know.
msg35649 - (view) Author: Neil Schemenauer (nascheme) * (Python committer) Date: 2001-02-21 13:47
D'oh, your right.  Can you look at patch #103930?  I don't
want to omit the rule.  Prevous versions of Python did
omit it but that caused some surprises when people started
hacking on the grammar.  
msg35650 - (view) Author: Donn Cave (donnc) Date: 2001-02-20 22:19
Actually this is only a more complicated way to do the
same thing - now you generate the files, but you still
don't use them.  Not graminit.h, anyway.  Here's what
happens if I remove graminit.h from the source directory:

cc -c -g -O2 -Wall -Wstrict-prototypes -I.
  -I/tulsa/src/python-2.1a2b/Include -DHAVE_CONFIG_H 
  -o Python/compile.o /tulsa/src/python-2.1a2b/Python/compile.c
/tulsa/src/python-2.1a2b/Python/compile.c:17: graminit.h: No such file or directory

You would have to add -IInclude to CFLAGS, along with
-I$(srcdir)/Include;  otherwise --srcdir build with
modified grammar is broken (whether srcdir is read only
or read/write.)
History
Date User Action Args
2022-04-10 16:03:43adminsetgithub: 33881
2001-02-08 07:20:19donnccreate