Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 59bb080

Browse files
Fix up problems when compiling in a directory other than the source
directory.
1 parent 227b120 commit 59bb080

4 files changed

Lines changed: 56 additions & 35 deletions

File tree

Grammar/Makefile

Lines changed: 0 additions & 33 deletions
This file was deleted.

Grammar/Makefile.in

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# NOTE: Makefile.in is converted into Makefile by the configure script
2+
# in the parent directory. Once configure has run, you can recreate
3+
# the Makefile by running just config.status.
4+
5+
# === Variables set by config.stat ===
6+
7+
VERSION= @VERSION@
8+
9+
srcdir= @srcdir@
10+
VPATH= @srcdir@
11+
12+
CC= @CC@
13+
RANLIB= @RANLIB@
14+
AR= @AR@
15+
16+
DEFS= @DEFS@
17+
LIBS= @LIBS@
18+
19+
20+
# === Fixed definitions ===
21+
22+
TOP= ..
23+
PGENDIR= $(TOP)/Parser
24+
PGEN= $(PGENDIR)/pgen
25+
DESTH= $(srcdir)/$(TOP)/Include/graminit.h
26+
DESTC= $(srcdir)/$(TOP)/Python/graminit.c
27+
28+
all: install
29+
30+
# This target is used by the master Makefile to add the objects to the library
31+
add2lib:
32+
33+
install: $(DESTH) $(DESTC)
34+
35+
depend:
36+
37+
$(DESTH): graminit.h
38+
cp graminit.h $(DESTH)
39+
40+
$(DESTC): graminit.c
41+
cp graminit.c $(DESTC)
42+
43+
graminit.c graminit.h: $(PGEN) Grammar
44+
$(PGEN) $(srcdir)/Grammar
45+
46+
$(PGEN):
47+
cd $(PGENDIR); $(MAKE) pgen
48+
49+
clean:
50+
-rm -f *.o core *~ [@,#]* *.old *.orig *.rej
51+
-rm -f graminit.[ch]
52+
53+
clobber: clean
54+
-rm -f tags TAGS

Makefile.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,7 @@ libpython$(VERSION).dylib: $(LIBRARY)
196196
$(SUBDIRS): Makefiles
197197

198198
Grammar:
199-
P=`pwd`/Parser; cd $(srcdir)/Grammar; $(MAKE) PGENDIR=$$P \
200-
OPT="$(OPT)" VERSION="$(VERSION)" \
199+
cd Grammar ; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
201200
prefix="$(prefix)" exec_prefix="$(exec_prefix)" all
202201

203202
Parser:

configure.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,6 +1167,7 @@ AC_CHECK_TYPE(socklen_t, int)
11671167
AC_OUTPUT(Makefile \
11681168
Objects/Makefile \
11691169
Parser/Makefile \
1170+
Grammar/Makefile \
11701171
Python/Makefile \
11711172
Modules/Makefile.pre \
11721173
Modules/Setup.config)

0 commit comments

Comments
 (0)