mirror of https://github.com/python/cpython
New files
This commit is contained in:
parent
6fa6343f0e
commit
627b2d7cd7
|
@ -0,0 +1,38 @@
|
|||
MAKE= make
|
||||
|
||||
SUBDIRS= Parser Grammar Objects Python
|
||||
|
||||
all: config.status
|
||||
for i in $(SUBDIRS); do (echo $$i; cd $$i; $(MAKE) all); done
|
||||
|
||||
localclean:
|
||||
-rm -f core *~ [@,#]* *.old *.orig *.rej
|
||||
-(cd Py; rm -f core *~ [@,#]* *.old *.orig *.rej)
|
||||
|
||||
clean: localclean
|
||||
-for i in $(SUBDIRS); do \
|
||||
(echo $$i;cd $$i;$(MAKE) clean); \
|
||||
done
|
||||
|
||||
clobber: localclean
|
||||
-for i in $(SUBDIRS); do \
|
||||
(echo $$i;cd $$i;$(MAKE) clobber); \
|
||||
done
|
||||
|
||||
distclean: clobber
|
||||
-for i in $(SUBDIRS); do \
|
||||
if test -f $$i/Makefile.in; then \
|
||||
rm -f $$i/Makefile; \
|
||||
fi; \
|
||||
done
|
||||
-rm -f config.status
|
||||
|
||||
Makefiles: config.status
|
||||
./config.status
|
||||
|
||||
config.status: configure
|
||||
./configure
|
||||
|
||||
configure: configure.in
|
||||
autoconf
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
This is an ALPHA release of Python 1.0 for UNIX. Currently it builds
|
||||
a rather minimal executable and requires that you already have Python
|
||||
0.9.9 (or at least its library).
|
||||
|
||||
Instructions for building:
|
||||
|
||||
(1) Run the configure shell script:
|
||||
|
||||
./configure
|
||||
|
||||
This may take a minute or two -- it does a rather thorough
|
||||
investigation of your system to find out many compile-time flags. It
|
||||
prints messages but does not ask questions. When finished, it will
|
||||
create config.status in the current directory, as well as Makefile in
|
||||
each of the subdirectories Parser, Objects and Python. Note that
|
||||
unless you have the CC shell environment variable set to the name of
|
||||
your C compiler, it will attempt to find the GNU C compiler (gcc) and
|
||||
use it if it finds it. On some systems a broken gcc may be installed;
|
||||
put CC=cc in the environment to override it. On some systems it may
|
||||
be interesting to compare both compilers. (Note: the Makefile has
|
||||
been rigged in such a way that it will run configure if you haven't
|
||||
done so.)
|
||||
|
||||
(2) Run Make:
|
||||
|
||||
make
|
||||
|
||||
This will recursively run Make in each of the Parser, Objects and
|
||||
Python subdirectories. In Parser it builds an executable "pgen" and a
|
||||
library libParser.a. In Objects it builds a library libObjects.a. In
|
||||
Python it builds a library libPython.a and an executable "python".
|
||||
|
||||
(3) Test the resulting executable:
|
||||
|
||||
Python/python -c 'import testall'
|
||||
|
||||
For now, this will assume that you have a working version of Python
|
||||
release 0.9.9 installed in /usr/local (it uses the Python library from
|
||||
/usr/local/lib/python) or that your PYTHONPATH shell environment
|
||||
variable points to the 0.9.9 Python library.
|
||||
|
||||
(4) Optionally: read Extensions/README and try to build a Python with
|
||||
all the extensions that make sense on your system. (Note: some
|
||||
extensions are not supported yet.)
|
||||
|
||||
(5) Give feedback:
|
||||
|
||||
Mail guido@cwi.nl
|
||||
|
||||
Please tell me whether the build succeeded or not. If you needed to
|
||||
edit *any* file, tell me which file, why and how (send me a diff or a
|
||||
copy of the modified file if you can). If you get stuck, please send
|
||||
me the error output. Don't forget to mention the operating system,
|
||||
compiler and hardware version that you used, e.g. "Solaris 2.2 with
|
||||
gcc version cygnus-2.0.2 on a dual processor Sparcstation 10" or "IRIX
|
||||
5.1 with standard cc on an Indigo XS-24 with R4000 CPU". If you can
|
||||
build the core interpreter but get stuck building an extended version,
|
||||
let me know which extensions gave problems and how.
|
||||
|
||||
--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
|
||||
URL: <http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,77 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT(Py/object.h)
|
||||
|
||||
# checks for alternative programs
|
||||
AC_PROG_CC
|
||||
AC_PROG_RANLIB
|
||||
|
||||
# checks for UNIX variants that set C preprocessor variables
|
||||
AC_AIX
|
||||
AC_ISC_POSIX
|
||||
AC_MINIX
|
||||
dnl DYNIX test runs compile so must be last
|
||||
AC_DYNIX_SEQ
|
||||
|
||||
# checks for header files
|
||||
AC_STDC_HEADERS
|
||||
AC_HAVE_HEADERS(dlfcn.h signal.h stdarg.h unistd.h utime.h sys/param.h sys/select.h sys/times.h sys/utsname.h)
|
||||
AC_DIR_HEADER
|
||||
|
||||
# checks for typedefs
|
||||
AC_GETGROUPS_T
|
||||
AC_MODE_T
|
||||
AC_OFF_T
|
||||
AC_PID_T
|
||||
AC_RETSIGTYPE
|
||||
AC_SIZE_T
|
||||
AC_UID_T
|
||||
|
||||
# checks for libraries
|
||||
AC_HAVE_LIBRARY(dl)
|
||||
LIBS="${LIBS} -L${READLINESRC-${PWD-${CWD-`pwd`}}/readline}"
|
||||
AC_HAVE_LIBRARY(readline)
|
||||
if test -n "${have_lib}"; then
|
||||
AC_HAVE_LIBRARY(termcap)
|
||||
fi
|
||||
|
||||
# Check for IRIX or SOLARIS thread interface
|
||||
AC_HAVE_LIBRARY(mpc)
|
||||
if test -n "${have_lib}"; then
|
||||
DEFS="${DEFS} -DUSE_THREAD"
|
||||
LIBOBJS="${LIBOBJS} thread.o"
|
||||
fi
|
||||
|
||||
AC_HAVE_LIBRARY(thread)
|
||||
if test -n "${have_lib}"; then
|
||||
DEFS="${DEFS} -DUSE_THREAD"
|
||||
LIBOBJS="${LIBOBJS} thread.o"
|
||||
fi
|
||||
|
||||
# checks for library functions
|
||||
AC_HAVE_FUNCS(clock ftime gettimeofday getpgrp getwd lstat readlink readline select setsid setpgid setpgrp siginterrupt symlink tcgetpgrp tcsetpgrp times uname waitpid)
|
||||
AC_REPLACE_FUNCS(dup2 getcwd strerror strtoul strtod memmove)
|
||||
AC_FUNC_CHECK(getpgrp, AC_COMPILE_CHECK([argument to getpgrp], [#include <unistd.h>], [getpgrp(0);], AC_DEFINE(GETPGRP_HAVE_ARG)))
|
||||
|
||||
# checks for structures
|
||||
AC_TIME_WITH_SYS_TIME
|
||||
AC_STRUCT_TM
|
||||
AC_TIMEZONE
|
||||
|
||||
# checks for compiler characteristics
|
||||
AC_CONST
|
||||
echo checking for prototypes
|
||||
AC_TEST_PROGRAM([int foo(int x){return 0;} int main(){return foo(10);}], AC_DEFINE(HAVE_PROTOTYPES) have_prototypes=1)
|
||||
if test "$have_prototypes"; then
|
||||
AC_COMPILE_CHECK(["bad exec* prototypes"], [#include <unistd.h>], [char *const*t;execve("@",t,t);], , AC_DEFINE(BAD_EXEC_PROTOTYPES))
|
||||
fi
|
||||
|
||||
# checks for system services
|
||||
# (none yet)
|
||||
|
||||
# other checks for UNIX variants
|
||||
AC_IRIX_SUN
|
||||
AC_XENIX_DIR
|
||||
|
||||
# generate output files
|
||||
AC_OUTPUT(Objects/Makefile Parser/Makefile Python/Makefile)
|
Loading…
Reference in New Issue