Skip to content
Merged
Prev Previous commit
Next Next commit
sort the directories listed in LIBSUBDIRS and TESTSUBDIRS
  • Loading branch information
pxinwr committed Dec 28, 2020
commit cd21bd6169e87db9e4790072f0334ab97206c385
105 changes: 61 additions & 44 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -1365,39 +1365,54 @@ maninstall: altmaninstall

# Install the library
XMLLIBSUBDIRS= xml xml/dom xml/etree xml/parsers xml/sax
LIBSUBDIRS= tkinter \
site-packages \
importlib \
importlib/metadata \
asyncio \
collections concurrent concurrent/futures encodings \
LIBSUBDIRS= asyncio \
collections \
concurrent concurrent/futures \
csv \
ctypes ctypes/macholib \
curses \
dbm \
distutils distutils/command \
email email/mime \
encodings \
ensurepip ensurepip/_bundled \
html json http dbm xmlrpc \
sqlite3 \
logging csv wsgiref urllib \
lib2to3 lib2to3/fixes lib2to3/pgen2 \
ctypes ctypes/macholib \
html \
http \
idlelib idlelib/Icons \
distutils distutils/command $(XMLLIBSUBDIRS) \
turtledemo \
importlib importlib/metadata \
json \
lib2to3 lib2to3/fixes lib2to3/pgen2 \
logging \
multiprocessing multiprocessing/dummy \
pydoc_data \
site-packages \
sqlite3 \
tkinter \
turtledemo \
unittest \
urllib \
venv venv/scripts venv/scripts/common venv/scripts/posix \
curses pydoc_data \
wsgiref \
$(XMLLIBSUBDIRS) \
xmlrpc \
zoneinfo
TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \
tkinter/test/test_ttk test \
test/audiodata \
test/capath test/data \
test/cjkencodings test/decimaltestdata \
test/xmltestdata test/xmltestdata/c14n-20 \
test/dtracedata \
test/eintrdata \
test/imghdrdata \
test/libregrtest \
test/subprocessdata test/sndhdrdata test/support \
test/tracedmodules test/encoded_modules \
TESTSUBDIRS= ctypes/test \
distutils/tests \
idlelib/idle_test \
lib2to3/tests \
lib2to3/tests/data \
lib2to3/tests/data/fixers \
lib2to3/tests/data/fixers/myfixes \
sqlite3/test \
test test/audiodata \
test/capath test/cjkencodings \
test/data test/decimaltestdata \
test/dtracedata test/eintrdata \
test/encoded_modules test/imghdrdata \
test/libregrtest test/sndhdrdata \
test/subprocessdata test/support \
test/test_asyncio \
test/test_email test/test_email/data \
test/test_import \
test/test_import/data \
test/test_import/data/circular_imports \
Expand Down Expand Up @@ -1443,27 +1458,19 @@ TESTSUBDIRS= tkinter/test tkinter/test/test_tkinter \
test/test_importlib/source \
test/test_importlib/zipdata01 \
test/test_importlib/zipdata02 \
test/test_zoneinfo test/test_zoneinfo/data \
test/ziptestdata \
test/test_asyncio \
test/test_email test/test_email/data \
test/test_json \
sqlite3/test \
lib2to3/tests \
lib2to3/tests/data lib2to3/tests/data/fixers \
lib2to3/tests/data/fixers/myfixes \
ctypes/test \
idlelib/idle_test \
distutils/tests \
test/test_peg_generator \
test/test_tools test/test_warnings test/test_warnings/data \
test/test_tools \
test/test_warnings test/test_warnings/data \
test/test_zoneinfo test/test_zoneinfo/data \
test/tracedmodules \
test/xmltestdata test/xmltestdata/c14n-20 \
test/ziptestdata \
tkinter/test tkinter/test/test_tkinter \
tkinter/test/test_ttk \
unittest/test unittest/test/testmock

TEST_MODULES=@TEST_MODULES@
ifeq ($(TEST_MODULES),yes)
LIBSUBDIRS += $(TESTSUBDIRS)
endif

libinstall: build_all $(srcdir)/Modules/xxmodule.c
@for i in $(SCRIPTDIR) $(LIBDEST); \
do \
Expand All @@ -1473,7 +1480,12 @@ libinstall: build_all $(srcdir)/Modules/xxmodule.c
else true; \
fi; \
done
@for d in $(LIBSUBDIRS); \
@if test "$(TEST_MODULES)" = yes; then \
subdirs="$(LIBSUBDIRS) $(TESTSUBDIRS)"; \
else \
subdirs="$(LIBSUBDIRS)"; \
fi; \
Comment thread
vstinner marked this conversation as resolved.
for d in $$subdirs; \
do \
a=$(srcdir)/Lib/$$d; \
if test ! -d $$a; then continue; else true; fi; \
Expand All @@ -1494,7 +1506,12 @@ libinstall: build_all $(srcdir)/Modules/xxmodule.c
echo $(INSTALL_DATA) $$i $(LIBDEST); \
fi; \
done
@for d in $(LIBSUBDIRS); \
@if test "$(TEST_MODULES)" = yes; then \
subdirs="$(LIBSUBDIRS) $(TESTSUBDIRS)"; \
else \
subdirs="$(LIBSUBDIRS)"; \
fi; \
for d in $$subdirs; \
do \
a=$(srcdir)/Lib/$$d; \
if test ! -d $$a; then continue; else true; fi; \
Expand Down