Commit bfc1bbe5 authored by Guido van Rossum's avatar Guido van Rossum

Some cleanup; make for loops over subdirs less noisy, more informative.

parent 0e41c8c8
...@@ -112,8 +112,8 @@ all: python ...@@ -112,8 +112,8 @@ all: python
# Build the interpreter # Build the interpreter
python: Makefiles python: Makefiles
for i in $(SUBDIRS); do \ @for i in $(SUBDIRS); do \
(echo $$i; cd $$i; \ (echo Making in subdirectory $$i; cd $$i; \
$(MAKE) OPT="$(OPT)" \ $(MAKE) OPT="$(OPT)" \
prefix="$(prefix)" \ prefix="$(prefix)" \
exec_prefix="$(exec_prefix)" \ exec_prefix="$(exec_prefix)" \
...@@ -133,7 +133,7 @@ install: bininstall libinstall maninstall inclinstall \ ...@@ -133,7 +133,7 @@ install: bininstall libinstall maninstall inclinstall \
# Install the interpreter # Install the interpreter
bininstall: python bininstall: python
for i in $(BINDIR); \ @for i in $(BINDIR); \
do \ do \
if test ! -d $$i; then \ if test ! -d $$i; then \
echo "Creating directory $$i"; \ echo "Creating directory $$i"; \
...@@ -149,7 +149,7 @@ bininstall: python ...@@ -149,7 +149,7 @@ bininstall: python
# something like find Lib -print | cpio -pacvdmu $(LIBDEST) # something like find Lib -print | cpio -pacvdmu $(LIBDEST)
LIBDEST= $(SCRIPTDIR)/python LIBDEST= $(SCRIPTDIR)/python
libinstall: python libinstall: python
for i in $(SCRIPTDIR) $(LIBDEST); \ @for i in $(SCRIPTDIR) $(LIBDEST); \
do \ do \
if test ! -d $$i; then \ if test ! -d $$i; then \
echo "Creating directory $$i"; \ echo "Creating directory $$i"; \
...@@ -172,7 +172,7 @@ libinstall: python ...@@ -172,7 +172,7 @@ libinstall: python
# Install the manual page # Install the manual page
maninstall: maninstall:
for i in $(MANDIR) $(MANDIR)/man1; \ @for i in $(MANDIR) $(MANDIR)/man1; \
do \ do \
if test ! -d $$i; then \ if test ! -d $$i; then \
echo "Creating directory $$i"; \ echo "Creating directory $$i"; \
...@@ -187,7 +187,7 @@ maninstall: ...@@ -187,7 +187,7 @@ maninstall:
# Install the include files # Install the include files
INCLUDEPY= $(INCLUDEDIR)/Py INCLUDEPY= $(INCLUDEDIR)/Py
inclinstall: inclinstall:
for i in $(INCLUDEDIR) $(INCLUDEPY); \ @for i in $(INCLUDEDIR) $(INCLUDEPY); \
do \ do \
if test ! -d $$i; then \ if test ! -d $$i; then \
echo "Creating directory $$i"; \ echo "Creating directory $$i"; \
...@@ -196,13 +196,17 @@ inclinstall: ...@@ -196,13 +196,17 @@ inclinstall:
else true; \ else true; \
fi; \ fi; \
done done
$(INSTALL_DATA) $(srcdir)/Include/*.h $(INCLUDEPY) @for i in $(srcdir)/Include/*.h; \
do \
echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
$(INSTALL_DATA) $$i $(INCLUDEPY); \
done
# Install the lib*.a files and miscellaneous stuff needed by extensions # Install the lib*.a files and miscellaneous stuff needed by extensions
LIBP= $(LIBDIR)/python LIBP= $(LIBDIR)/python
LIBPL= $(LIBP)/lib LIBPL= $(LIBP)/lib
libainstall: all libainstall: all
for i in $(LIBDIR) $(LIBP) $(LIBPL); \ @for i in $(LIBDIR) $(LIBP) $(LIBPL); \
do \ do \
if test ! -d $$i; then \ if test ! -d $$i; then \
echo "Creating directory $$i"; \ echo "Creating directory $$i"; \
...@@ -211,8 +215,8 @@ libainstall: all ...@@ -211,8 +215,8 @@ libainstall: all
else true; \ else true; \
fi; \ fi; \
done done
for i in $(SUBDIRS); do \ @for i in $(SUBDIRS); do \
echo $$i; \ echo Installing in subdirectory $$i; \
$(INSTALL_DATA) $$i/lib$$i.a $(LIBPL)/lib$$i.a; \ $(INSTALL_DATA) $$i/lib$$i.a $(LIBPL)/lib$$i.a; \
$(RANLIB) $(LIBPL)/lib$$i.a; \ $(RANLIB) $(LIBPL)/lib$$i.a; \
done done
...@@ -240,8 +244,9 @@ sharedinstall: ...@@ -240,8 +244,9 @@ sharedinstall:
# Build the sub-Makefiles # Build the sub-Makefiles
Makefiles: config.status Modules/Makefile.pre Makefiles: config.status Modules/Makefile.pre
(cd Modules; $(MAKE) -f Makefile.pre Makefile) (cd Modules; $(MAKE) -f Makefile.pre Makefile)
for i in . $(SUBDIRS); do \ @for i in . $(SUBDIRS); do \
(echo $$i; cd $$i; $(MAKE) Makefile); \ (echo making Makefile in subdirectory $$i; cd $$i; \
$(MAKE) Makefile); \
done done
# Build the intermediate Makefile in Modules # Build the intermediate Makefile in Modules
...@@ -288,8 +293,9 @@ TAGS:: ...@@ -288,8 +293,9 @@ TAGS::
# Add dependencies to sub-Makefiles # Add dependencies to sub-Makefiles
depend: depend:
for i in $(SUBDIRS); do \ @for i in $(SUBDIRS); do \
(echo $$i; cd $$i; $(MAKE) depend); \ (echo making depend in subdirectory $$i; cd $$i; \
$(MAKE) depend); \
done done
# Sanitation targets -- clean leaves libraries, executables and tags # Sanitation targets -- clean leaves libraries, executables and tags
...@@ -300,7 +306,7 @@ localclean: ...@@ -300,7 +306,7 @@ localclean:
clean: localclean clean: localclean
-for i in $(SUBDIRS); do \ -for i in $(SUBDIRS); do \
(echo $$i; cd $$i; \ (echo making clean in subdirectory $$i; cd $$i; \
if test -f Makefile; \ if test -f Makefile; \
then $(MAKE) clean; \ then $(MAKE) clean; \
else $(MAKE) -f Makefile.*in clean; \ else $(MAKE) -f Makefile.*in clean; \
...@@ -309,18 +315,19 @@ clean: localclean ...@@ -309,18 +315,19 @@ clean: localclean
localclobber: localclean localclobber: localclean
-rm -f tags TAGS python -rm -f tags TAGS python
-rm -f config.log config.cache config.h Makefile -rm -f config.log config.cache config.h
clobber: localclobber clobber: localclobber
-for i in $(SUBDIRS); do \ -for i in $(SUBDIRS); do \
(echo $$i; cd $$i; \ (echo clobbering subdirectory $$i; cd $$i; \
if test -f Makefile; \ if test -f Makefile; \
then $(MAKE) clobber; \ then $(MAKE) clobber; \
else $(MAKE) -f $(srcdir)/Makefile.in clobber; \ else $(MAKE) -f $(srcdir)/Makefile.in clobber; \
fi); \ fi); \
done done
# Make things extra clean, before making a distribution # Make things extra clean, before making a distribution:
# remove all generated files, even Makefile[.pre]
distclean: clobber distclean: clobber
-$(MAKE) -f $(srcdir)/Makefile.in \ -$(MAKE) -f $(srcdir)/Makefile.in \
SUBDIRS="$(SUBDIRSTOO)" clobber SUBDIRS="$(SUBDIRSTOO)" clobber
...@@ -345,7 +352,7 @@ smelly: all ...@@ -345,7 +352,7 @@ smelly: all
done done
# Find files with funny names # Find files with funny names
find: funny:
find $(DISTDIRS) -type d \ find $(DISTDIRS) -type d \
-o -name '*.[chs]' \ -o -name '*.[chs]' \
-o -name '*.py' \ -o -name '*.py' \
...@@ -363,8 +370,8 @@ find: ...@@ -363,8 +370,8 @@ find:
-o -name README \ -o -name README \
-o -name Makefile \ -o -name Makefile \
-o -name ChangeLog \ -o -name ChangeLog \
-o -name RCS \
-o -name Repository \ -o -name Repository \
-o -name Root \
-o -name Entries \ -o -name Entries \
-o -name Tag \ -o -name Tag \
-o -name tags \ -o -name tags \
...@@ -372,8 +379,3 @@ find: ...@@ -372,8 +379,3 @@ find:
-o -name .cvsignore \ -o -name .cvsignore \
-o -name MANIFEST \ -o -name MANIFEST \
-o -print -o -print
# Build a distribution tar file (run make distclean first)
# (This leaves the RCS and CVS directories in :-( )
tar:
tar cf - $(DIST) | gzip --best >dist.tar.gz
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment