summaryrefslogtreecommitdiffstats
path: root/Makefile.in
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-07-25 22:34:08 (GMT)
committerGuido van Rossum <guido@python.org>1997-07-25 22:34:08 (GMT)
commit1eec528d5ea2cf2810181a5ae8bdbbfbb4831547 (patch)
tree491fd2a362ee0a03a401a8a37ec27e9478a0be8d /Makefile.in
parent630924f190a4c3088cc4d3f275390d23e9028ba8 (diff)
downloadcpython-1eec528d5ea2cf2810181a5ae8bdbbfbb4831547.zip
cpython-1eec528d5ea2cf2810181a5ae8bdbbfbb4831547.tar.gz
cpython-1eec528d5ea2cf2810181a5ae8bdbbfbb4831547.tar.bz2
Build getbuildno.o here, to adequately update it every time a new
python executable is built. (It still won't reflect builds of the library only, but since the default make target builds the python executable, that's alright.)
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in16
1 files changed, 15 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in
index 753c5bc..14d7ef4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -80,7 +80,9 @@
VERSION= @VERSION@
srcdir= @srcdir@
VPATH= @srcdir@
+CC= @CC@
RANLIB= @RANLIB@
+DEFS= @DEFS@
# Machine-dependent subdirectories
MACHDEP= @MACHDEP@
@@ -139,17 +141,29 @@ DISTFILES= README ChangeLog $(CONFIGFILES)
DISTDIRS= $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy
DIST= $(DISTFILES) $(DISTDIRS)
+# Compilation flags for getbuildinfo.c only
+CFLAGS= $(OPT) -I. $(DEFS)
+
LIBRARY= libpython$(VERSION).a
# Default target
all: $(LIBRARY) python
# Build the interpreter
-python: $(LIBRARY)
+python: $(LIBRARY) buildno
+ expr `cat buildno` + 1 >@buildno
+ mv @buildno buildno
+ $(CC) -c $(CFLAGS) -DBUILD=`cat buildno` \
+ $(srcdir)/Modules/getbuildinfo.c
+ $(AR) cr $(LIBRARY) getbuildinfo.o
+ $(RANLIB) $(LIBRARY)
cd Modules; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
prefix="$(prefix)" exec_prefix="$(exec_prefix)" \
LIBRARY=../$(LIBRARY) link
+buildno:
+ echo 0 >buildno
+
# Build the library
$(LIBRARY): $(SUBDIRS)
if test ! -f $(LIBRARY); \