@@ -29,32 +29,33 @@ include Makefile.com
29
29
30
30
JOBS = 8
31
31
32
+ # These are artificial targets used to run actions against all current python
33
+ # versions (in PYVERSIONS). In rules the target python version can be picked
34
+ # up via $(@F).
32
35
PYTESTS = $(PYVERSIONS:%=runtest/% )
33
- PYMODULES = $(PYVERSIONS:%=modules /% )
36
+ EXTMODULES = $(PYVERSIONS:%=extmodules /% )
34
37
TESTRESULTS = $(PYVERSIONS:%=testresults/% )
35
38
36
39
REQUIREMENTS = requirements.txt
37
40
41
+ TARGET = all
38
42
all := TARGET = all
39
43
install := TARGET = install
44
+ install-cmd := TARGET = install
40
45
clean := TARGET = clean
41
46
clobber := TARGET = clobber
42
47
check := TARGET = check
43
48
packages := TARGET = install
49
+ test := TARGET = install
44
50
45
- SUBDIRS =brand util/mkcert man po svc web
51
+ SUBDIRS = cffi_src modules brand util man po svc web
52
+ brand : cffi_src modules util $(EXTMODULES )
46
53
47
54
all : $(SUBDIRS )
48
55
49
- build : $( PYVERSIONS )
56
+ install : install-cmd $( SUBDIRS ) $( EXTMODULES )
50
57
51
- install : $(PYVERSIONS ) .WAIT $(PYMODULES ) .WAIT $(SUBDIRS )
52
-
53
- clean : $(SUBDIRS ) $(PYVERSIONS )
54
- @cd pkg; pwd ; make clean
55
-
56
- clobber : $(SUBDIRS ) $(PYVERSONS )
57
- @cd pkg; pwd ; make clobber
58
+ clean clobber : $(SUBDIRS ) pkg
58
59
59
60
packages : install
60
61
@cd pkg; pwd ; $(MAKE ) $(TARGET ) check \
@@ -78,17 +79,17 @@ baseline: _bandit
78
79
python$(PYVER ) -m bandit -r -q -c tests/banditrc . \
79
80
-o tests/bandit-baseline.json -f json || true
80
81
81
- $(SUBDIRS ) cffi_src : FRC
82
+ $(SUBDIRS ) pkg : FRC
82
83
@cd $@ ; pwd ; $(MAKE ) $(TARGET ) CC=$(CC )
83
84
84
- $( PYVERSIONS ) : FRC
85
- python $@ setup.py $(TARGET )
85
+ install-cmd : FRC
86
+ $( MAKE ) -f Makefile.cmd $(TARGET )
86
87
87
- $(PYMODULES ) : FRC
88
+ $(EXTMODULES ) :
88
89
../tools/installmodules $(CODE_WS ) $(ROOT ) $(@F ) \
89
90
$(TARGET ) $(ROOTPKGLIB ) core $(REQUIREMENTS )
90
91
91
- $(PYTESTS ) : $(PYMODULES )
92
+ $(PYTESTS ) : $(EXTMODULES )
92
93
-pfexec python$(@F ) tests/run.py -t -j $(JOBS )
93
94
-pfexec cp tests/failures.3 tests/failures.$(@F )
94
95
-pfexec cp tests/timing_info.txt tests/timing_info.$(@F )
@@ -100,5 +101,3 @@ $(TESTRESULTS): $(PYTESTS)
100
101
101
102
FRC :
102
103
103
- .NO_PARALLEL : $(PYVERSIONS ) $(PYTESTS )
104
-
0 commit comments