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.)
This commit is contained in:
Guido van Rossum 1997-07-25 22:34:08 +00:00
parent 630924f190
commit 1eec528d5e
1 changed files with 15 additions and 1 deletions

View File

@ -80,7 +80,9 @@
VERSION= @VERSION@ VERSION= @VERSION@
srcdir= @srcdir@ srcdir= @srcdir@
VPATH= @srcdir@ VPATH= @srcdir@
CC= @CC@
RANLIB= @RANLIB@ RANLIB= @RANLIB@
DEFS= @DEFS@
# Machine-dependent subdirectories # Machine-dependent subdirectories
MACHDEP= @MACHDEP@ MACHDEP= @MACHDEP@
@ -139,17 +141,29 @@ DISTFILES= README ChangeLog $(CONFIGFILES)
DISTDIRS= $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy DISTDIRS= $(SUBDIRS) $(SUBDIRSTOO) Ext-dummy
DIST= $(DISTFILES) $(DISTDIRS) DIST= $(DISTFILES) $(DISTDIRS)
# Compilation flags for getbuildinfo.c only
CFLAGS= $(OPT) -I. $(DEFS)
LIBRARY= libpython$(VERSION).a LIBRARY= libpython$(VERSION).a
# Default target # Default target
all: $(LIBRARY) python all: $(LIBRARY) python
# Build the interpreter # 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)" \ cd Modules; $(MAKE) OPT="$(OPT)" VERSION="$(VERSION)" \
prefix="$(prefix)" exec_prefix="$(exec_prefix)" \ prefix="$(prefix)" exec_prefix="$(exec_prefix)" \
LIBRARY=../$(LIBRARY) link LIBRARY=../$(LIBRARY) link
buildno:
echo 0 >buildno
# Build the library # Build the library
$(LIBRARY): $(SUBDIRS) $(LIBRARY): $(SUBDIRS)
if test ! -f $(LIBRARY); \ if test ! -f $(LIBRARY); \