1717#  limitations under the License.
1818
1919
20+ ifeq  "$(LC_CTYPE ) " ""
21+ 	LC_CTYPE="en_US.UTF-8"
22+ endif 
23+ 
24+ ifndef  SHELL 
25+ 	SHELL:=command -pv bash
26+ endif 
27+ 
28+ ifeq  "$(ERROR_LOG_PATH ) " ""
29+ 	ERROR_LOG_PATH="/dev/null"
30+ endif 
31+ 
32+ ifeq  "$(COMMAND ) " ""
33+ 	COMMAND_CMD!=`command -v xcrun || command which which || command -v which || command -v command`
34+ 	ifeq "$(COMMAND_CMD)" "*xcrun"
35+ 		COMMAND_ARGS=--find
36+ 	endif
37+ 	ifeq "$(COMMAND_CMD)" "*command"
38+ 		COMMAND_ARGS=-pv
39+ 	endif
40+ 	COMMAND=$(COMMAND_CMD) $(COMMAND_ARGS)
41+ endif 
42+ 
43+ ifeq  "$(MAKE ) " ""
44+ 	#   just no cmake please
45+ 	MAKEFLAGS=$(MAKEFLAGS) -s
46+ 	MAKE!=`$(COMMAND) make 2>$(ERROR_LOG_PATH) || $(COMMAND) gnumake 2>$(ERROR_LOG_PATH)`
47+ endif 
48+ 
2049ifeq  "$(ECHO ) " ""
21- 	ECHO=echo
50+ 	ECHO=printf "%s\n"
51+ endif 
52+ 
53+ ifdef  "$(ACTION)" 
54+ 	SET_FILE_ATTR=$(COMMAND) xattr
55+ endif 
56+ 
57+ ifdef  "$(SET_FILE_ATTR)" 
58+ 	CREATEDBYBUILDSYSTEM=-w com.apple.xcode.CreatedByBuildSystem true
59+ 	BSMARK=$(SET_FILE_ATTR) $(CREATEDBYBUILDSYSTEM)
60+ else
61+ 	BSMARK=$(COMMAND) touch -a
2262endif 
2363
2464ifeq  "$(LINK ) " ""
2565	LINK=ln -sf
2666endif 
2767
28- ifeq  "$(MAKE ) " ""
29- 	MAKE=make
68+ ifeq  "$(PYTHON ) " ""
69+ 	PY_CMD=$(COMMAND) python3
70+ 	ifneq "$(PY_CMD)" ""
71+ 		PY_ARGS=-B
72+ 	else
73+ 		PY_CMD=$(COMMAND) python
74+ 	endif
75+ 	PYTHON=$(PY_CMD) $(PY_ARGS)
76+ 	ifeq "$(COVERAGE)" ""
77+ 		COVERAGE=$(PYTHON) -m coverage
78+ 		# COV_CORE_SOURCE = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/
79+ 		COV_CORE_CONFIG = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/.coveragerc
80+ 		COV_CORE_DATAFILE = .coverage
81+ 	endif
82+ 	ifeq "$(COVERAGE)" ""
83+ 		COVERAGE!=$(COMMAND) coverage
84+ 	endif
85+ else 
86+ 	ifeq "$(COVERAGE)" ""
87+ 		COVERAGE!=$(COMMAND) coverage
88+ 		# COV_CORE_SOURCE = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/
89+ 		COV_CORE_CONFIG = $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/.coveragerc
90+ 		COV_CORE_DATAFILE = .coverage
91+ 	endif
92+ endif 
93+ 
94+ ifndef  PIP_COMMON_FLAGS 
95+ 	#  Define common pip install flags
96+ 	PIP_COMMON_FLAGS := --use-pep517 --exists-action s --upgrade --upgrade-strategy eager
97+ endif 
98+ 
99+ #  Define environment-specific pip install flags
100+ ifeq  ($(shell  uname) ,Darwin)
101+ 	PIP_ENV_FLAGS := --break-system-packages
102+ else 
103+ 	PIP_ENV_FLAGS :=
30104endif 
31105
32106ifeq  "$(WAIT ) " ""
@@ -49,95 +123,222 @@ endif
49123
50124ifeq  "$(LOG ) " "no"
51125	QUIET=@
126+ 	ifeq "$(DO_FAIL)" ""
127+ 		DO_FAIL=$(ECHO) "ok"
128+ 	endif
52129endif 
53130
54131ifeq  "$(DO_FAIL ) " ""
55- 	DO_FAIL=$(ECHO) "ok"
132+ 	DO_FAIL=$(COMMAND) :
133+ endif 
134+ 
135+ ifeq  "$(RM ) " ""
136+ 	RM=$(COMMAND) rm -f
137+ endif 
138+ 
139+ ifeq  "$(RMDIR ) " ""
140+ 	RMDIR=$(RM)Rd
56141endif 
57142
58- PHONY : must_be_root cleanup
143+ .PHONY : all clean test cleanup init help clean-docs must_be_root must_have_flake must_have_pytest uninstall cleanup-dev-backups
144+ 
59145
60- build :
61- 	$(QUIET )$(ECHO )  " No need to build. Try make -f Makefile install" 
62- 	$(QUIET )$(MAKE )  -s -C ./docs/ -f Makefile html 2> /dev/null ||  true 
146+ MANIFEST.in : init
147+ 	$(QUIET )$(ECHO )  " include requirements.txt" > " $@ " ; 
148+ 	$(QUIET )$(BSMARK )  " $@ " 2> $(ERROR_LOG_PATH )  > $(ERROR_LOG_PATH )  ||  true  ; 
149+ 	$(QUIET )$(ECHO )  " include README.md" >> " $@ " ; 
150+ 	$(QUIET )$(ECHO )  " include LICENSE.md" >> " $@ " ; 
151+ 	$(QUIET )$(ECHO )  " include CHANGES.md" >> " $@ " ; 
152+ 	$(QUIET )$(ECHO )  " include HISTORY.md" >> " $@ " ; 
153+ 	$(QUIET )$(ECHO )  " recursive-include . *.txt" >> " $@ " ; 
154+ 	$(QUIET )$(ECHO )  " exclude .gitignore" >> " $@ " ; 
155+ 	$(QUIET )$(ECHO )  " exclude .deepsource.toml" >> " $@ " ; 
156+ 	$(QUIET )$(ECHO )  " exclude .*.ini" >> " $@ " ; 
157+ 	$(QUIET )$(ECHO )  " exclude .*.yml" >> " $@ " ; 
158+ 	$(QUIET )$(ECHO )  " exclude .*.yaml" >> " $@ " ; 
159+ 	$(QUIET )$(ECHO )  " global-exclude .git" >> " $@ " ; 
160+ 	$(QUIET )$(ECHO )  " global-exclude codecov_env" >> " $@ " ; 
161+ 	$(QUIET )$(ECHO )  " global-exclude .DS_Store" >> " $@ " ; 
162+ 	$(QUIET )$(ECHO )  " prune .gitattributes" >> " $@ " ; 
163+ 	$(QUIET )$(ECHO )  " prune test-reports" >> " $@ " ; 
164+ 	$(QUIET )$(ECHO )  " prune .github" >> " $@ " ; 
165+ 	$(QUIET )$(ECHO )  " prune .circleci" >> " $@ " ; 
166+ 
167+ build : init ./setup.py MANIFEST.in
168+ 	$(QUIET )$(PYTHON )  -W ignore -m build --sdist --wheel --no-isolation ./ ||  $(QUIET )$(PYTHON )  -W ignore -m build ./ ; 
169+ 	$(QUITE )$(WAIT ) 
170+ 	$(QUIET )$(ECHO )  " build DONE." 
63171
64172init :
173+ 	$(QUIET )$(PYTHON )  -m pip install $(PIP_COMMON_FLAGS )  $(PIP_ENV_FLAGS )  " pip>=24.3.1" " setuptools>=75.0" " wheel>=0.44" " build>=1.1.1" 2> $(ERROR_LOG_PATH )  ||  : 
174+ 	$(QUIET )$(PYTHON )  -m pip install $(PIP_COMMON_FLAGS )  $(PIP_ENV_FLAGS )  -r requirements.txt 2> $(ERROR_LOG_PATH )  ||  : 
65175	$(QUIET )$(ECHO )  " $@ : Done." 
66176
67- install : must_be_root
68- 	$(QUIET ) python3  -m pip install " git+https://github.com/reactive-firewall/python-repo.git#egg=pythonrepo" 
177+ install : init build  must_be_root
178+ 	$(QUIET )$( PYTHON )   -m pip install  $( PIP_COMMON_FLAGS )   $( PIP_ENV_FLAGS )  -e  " git+https://github.com/reactive-firewall/python-repo.git#egg=pythonrepo" 
69179	$(QUITE )$(WAIT ) 
70180	$(QUIET )$(ECHO )  " $@ : Done." 
71181
72- user-install :
73- 	$(QUIET ) python3 -m pip install --user " git+https://github.com/reactive-firewall/python-repo.git#egg=pythonrepo" 
182+ user-install : build
183+ 	$(QUIET )$(PYTHON )  -m pip install $(PIP_COMMON_FLAGS )  $(PIP_ENV_FLAGS )  --user " pip>=24.3.1" " setuptools>=75.0" " wheel>=0.44" " build>=1.1.1" 2> $(ERROR_LOG_PATH )  ||  true 
184+ 	$(QUIET )$(PYTHON )  -m pip install $(PIP_COMMON_FLAGS )  $(PIP_ENV_FLAGS )  --user -r " https://raw.githubusercontent.com/reactive-firewall/python-repo/stable/requirements.txt" 2> $(ERROR_LOG_PATH )  ||  true 
185+ 	$(QUIET )$(PYTHON )  -m pip install $(PIP_COMMON_FLAGS )  $(PIP_ENV_FLAGS )  --user -e " git+https://github.com/reactive-firewall/python-repo.git#egg=pythonrepo" 
74186	$(QUITE )$(WAIT ) 
75187	$(QUIET )$(ECHO )  " $@ : Done." 
76188
77189uninstall :
78- 	$(QUITE )  python3  -m pip uninstall pythonrepo ||  true 
190+ 	$(QUIET )$( PYTHON )   -m pip uninstall --use-pep517  $( PIP_ENV_FLAGS )  --no-input -y  pythonrepo 2> $( ERROR_LOG_PATH )   ||  : 
79191	$(QUITE )$(WAIT ) 
80192	$(QUIET )$(ECHO )  " $@ : Done." 
81193
82- test-reports :
83- 	$(QUIET ) mkdir test-reports 2> /dev/null > /dev/null ||  true  ; 
194+ legacy-purge : clean uninstall
195+ 	$(QUIET )$(PYTHON )  -W ignore ./setup.py uninstall 2> $(ERROR_LOG_PATH )  ||  : 
196+ 	$(QUIET )$(PYTHON )  -W ignore ./setup.py clean 2> $(ERROR_LOG_PATH )  ||  : 
197+ 	$(QUIET )$(RMDIR )  ./build/ 2> $(ERROR_LOG_PATH )  ||  : 
198+ 	$(QUIET )$(RMDIR )  ./dist/ 2> $(ERROR_LOG_PATH )  ||  : 
199+ 	$(QUIET )$(RMDIR )  ./.eggs/ 2> $(ERROR_LOG_PATH )  ||  : 
200+ 
201+ purge : legacy-purge
202+ 	$(QUIET )$(RM )  ./cc-test-reporter 2> $(ERROR_LOG_PATH )  ||  : 
203+ 	$(QUIET )$(RM )  ./test-reports/* .xml 2> $(ERROR_LOG_PATH )  ||  : 
204+ 	$(QUIET )$(RMDIR )  ./test-reports/ 2> $(ERROR_LOG_PATH )  ||  : 
84205	$(QUIET )$(ECHO )  " $@ : Done." 
85206
86- purge : clean uninstall
87- 	$(QUIET ) python3 -m pip uninstall pythonrepo &&  python -m pip uninstall pythonrepo ||  true 
207+ test-reports :
208+ 	$(QUIET ) mkdir $(INST_OPTS )  ./test-reports 2> $(ERROR_LOG_PATH )  > $(ERROR_LOG_PATH )  ||  true  ; 
209+ 	$(QUIET )$(BSMARK )  ./test-reports 2> $(ERROR_LOG_PATH )  > $(ERROR_LOG_PATH )  ||  true  ; 
88210	$(QUIET )$(ECHO )  " $@ : Done." 
89211
90- test : cleanup
91- 	$(QUIET ) coverage run -p --source=pythonrepo -m unittest discover --verbose -s ./tests -t ./ ||  python3 -m unittest discover --verbose -s ./tests -t ./ ||  python -m unittest discover --verbose -s ./tests -t ./ ||  DO_FAIL=exit 2 ; 
92- 	$(QUIET ) coverage combine 2> /dev/null ||  true 
93- 	$(QUIET ) coverage report -m --include=pythonrepo*  2> /dev/null ||  true 
94- 	$(QUIET )$(DO_FAIL ) ; 
212+ test-reqs : test-reports init
213+ 	$(QUIET )$(PYTHON )  -m pip install $(PIP_COMMON_FLAGS )  $(PIP_ENV_FLAGS )  -r tests/requirements.txt 2> $(ERROR_LOG_PATH )  ||  true 
214+ 
215+ just-test : cleanup
216+ 	$(QUIET )$(COVERAGE )  run -p --source=pythonrepo -m unittest discover --verbose --buffer -s ./tests -t $(dir  $(abspath  $(lastword  $(MAKEFILE_LIST ) ) ) )  ||  $(PYTHON )  -m unittest discover --verbose --buffer -s ./tests -t ./ ||  DO_FAIL=" exit 2" ; 
217+ 	$(QUITE )$(WAIT )  ; 
218+ 	$(QUIET )$(DO_FAIL )  ; 
219+ 
220+ test : just-test
221+ 	$(QUIET )$(DO_FAIL )  ; 
222+ 	$(QUIET )$(COVERAGE )  combine 2> $(ERROR_LOG_PATH )  ||  :  ; 
223+ 	$(QUIET )$(COVERAGE )  report -m --include=*  2> $(ERROR_LOG_PATH )  ||  :  ; 
95224	$(QUIET )$(ECHO )  " $@ : Done." 
96225
97226test-tox : cleanup
98227	$(QUIET ) tox -v -- ||  tail -n 500 .tox/py* /log/py* .log 2> /dev/null
99228	$(QUIET )$(ECHO )  " $@ : Done." 
100229
101- test-pytest : cleanup test-reports
102- 	$(QUIET ) python3 -m pytest --junitxml=test-reports/junit.xml -v tests ||  python -m pytest --junitxml=test-reports/junit.xml -v tests
230+ test-pytest : cleanup MANIFEST.in must_have_pytest test-reports
231+ 	$(QUIET )$(PYTHON )  -m pytest --cache-clear --doctest-glob=pythonrepo/* .py --doctest-modules --cov=. --cov-append --cov-report=xml --junitxml=test-reports/junit.xml -v --rootdir=. ||  DO_FAIL=" exit 2" ; 
232+ 	$(QUITE )$(WAIT )  ; 
233+ 	$(QUIET )$(DO_FAIL )  ; 
103234	$(QUIET )$(ECHO )  " $@ : Done." 
104235
105236test-style : cleanup
106- 	$(QUIET ) python3 -m flake8 --ignore=W191,W391 --max-line-length=100 --verbose --count --config=.flake8.ini --show-source ||  DO_FAIL=" exit 2" ; 
237+ 	$(QUIET )$(PYTHON )  -m flake8 --ignore=W191,W391 --max-line-length=100 --verbose --count --config=.flake8.ini --show-source ||  DO_FAIL=" exit 2" ; 
238+ 	$(QUIET ) tests/check_cc_lines 2> /dev/null ||  true 
107239	$(QUIET ) tests/check_spelling 2> /dev/null ||  true 
108240	$(QUIET )$(ECHO )  " $@ : Done." 
109241
110- cleanup :
111- 	$(QUIET ) rm -f tests/* .pyc 2> /dev/null ||  true 
112- 	$(QUIET ) rm -f tests/* ~ 2> /dev/null ||  true 
113- 	$(QUIET ) rm -Rf tests/__pycache__ 2> /dev/null ||  true 
114- 	$(QUIET ) rm -f pythonrepo/* .pyc 2> /dev/null ||  true 
115- 	$(QUIET ) rm -Rf pythonrepo/__pycache__ 2> /dev/null ||  true 
116- 	$(QUIET ) rm -Rf pythonrepo/* /__pycache__ 2> /dev/null ||  true 
117- 	$(QUIET ) rm -f pythonrepo/* ~ 2> /dev/null ||  true 
118- 	$(QUIET ) rm -f * .pyc 2> /dev/null ||  true 
119- 	$(QUIET ) rm -f pythonrepo/* /* .pyc 2> /dev/null ||  true 
120- 	$(QUIET ) rm -f pythonrepo/* /* ~ 2> /dev/null ||  true 
121- 	$(QUIET ) rm -f * .DS_Store 2> /dev/null ||  true 
122- 	$(QUIET ) rm -Rf .pytest_cache/ 2> /dev/null ||  true 
123- 	$(QUIET ) rmdir ./test-reports/ 2> /dev/null ||  true 
124- 	$(QUIET ) rm -f pythonrepo/* .DS_Store 2> /dev/null ||  true 
125- 	$(QUIET ) rm -f pythonrepo/* /* .DS_Store 2> /dev/null ||  true 
126- 	$(QUIET ) rm -f pythonrepo.egg-info/*  2> /dev/null ||  true 
127- 	$(QUIET ) rmdir pythonrepo.egg-info 2> /dev/null ||  true 
128- 	$(QUIET ) rm -f ./* /* ~ 2> /dev/null ||  true 
129- 	$(QUIET ) rm -f ./* ~ 2> /dev/null ||  true 
130- 	$(QUIET ) coverage erase 2> /dev/null ||  true 
131- 	$(QUIET ) rm -f ./.coverage 2> /dev/null ||  true 
132- 	$(QUIET ) rm -f ./coverage* .xml 2> /dev/null ||  true 
133- 	$(QUIET ) rm -f ./sitecustomize.py 2> /dev/null ||  true 
134- 	$(QUIET ) rm -f ./.* ~ 2> /dev/null ||  true 
135- 	$(QUIET ) rm -Rf ./.tox/ 2> /dev/null ||  true 
136- 
137- clean : cleanup
138- 	$(QUIET ) rm -f test-results/junit.xml 2> /dev/null ||  true 
139- 	$(QUIET )$(MAKE )  -s -C ./docs/ -f Makefile clean ||  true 
140- 	$(QUIET )$(ECHO )  " $@ : Done." 
242+ must_have_flake :
243+ 	$(QUIET ) runner=` $( PYTHON) |  grep --count -oF flake` ;  \ 
244+ 	if  test  $$ runner -le 0 ;  then  $( ECHO) " No Linter found for test." ;  exit  126 ;  fi 
245+ 
246+ must_have_pytest : init
247+ 	$(QUIET ) runner=` $( PYTHON) |  grep --count -oF pytest` ;  \ 
248+ 	if  test  $$ runner -le 0 ;  then  $( ECHO) " No python framework (pytest) found for test." ;  exit  126 ;  fi 
249+ 
250+ cleanup-dev-backups ::
251+ 	$(QUIET )$(RM )  ./* /* ~ 2> $(ERROR_LOG_PATH )  ||  : 
252+ 	$(QUIET )$(RM )  ./.* /* ~ 2> $(ERROR_LOG_PATH )  ||  : 
253+ 	$(QUIET )$(RM )  ./** /* ~ 2> $(ERROR_LOG_PATH )  ||  : 
254+ 	$(QUIET )$(RM )  ./* ~ 2> $(ERROR_LOG_PATH )  ||  : 
255+ 	$(QUIET )$(RM )  ./.* ~ 2> $(ERROR_LOG_PATH )  ||  : 
256+ 
257+ cleanup-mac-dir-store ::
258+ 	$(QUIET )$(RM )  ./.DS_Store 2> $(ERROR_LOG_PATH )  ||  : 
259+ 	$(QUIET )$(RM )  ./* /.DS_Store 2> $(ERROR_LOG_PATH )  ||  : 
260+ 	$(QUIET )$(RM )  ./* /.DS_Store 2> $(ERROR_LOG_PATH )  ||  : 
261+ 	$(QUIET )$(RM )  ./* /** /.DS_Store 2> $(ERROR_LOG_PATH )  ||  : 
262+ 
263+ cleanup-py-caches : cleanup-dev-backups cleanup-mac-dir-store
264+ 	$(QUIET )$(RM )  ./* .pyc 2> $(ERROR_LOG_PATH )  ||  : 
265+ 	$(QUIET )$(RM )  ./* /* .pyc 2> $(ERROR_LOG_PATH )  ||  : 
266+ 	$(QUIET )$(RM )  ./* /__pycache__/*  2> $(ERROR_LOG_PATH )  ||  : 
267+ 	$(QUIET )$(RM )  ./* /* /* .pyc 2> $(ERROR_LOG_PATH )  ||  : 
268+ 
269+ cleanup-py-cache-dirs : cleanup-py-caches
270+ 	$(QUIET )$(RMDIR )  ./tests/__pycache__ 2> $(ERROR_LOG_PATH )  ||  : 
271+ 	$(QUIET )$(RMDIR )  ./* /__pycache__ 2> $(ERROR_LOG_PATH )  ||  : 
272+ 	$(QUIET )$(RMDIR )  ./* /* /__pycache__ 2> $(ERROR_LOG_PATH )  ||  : 
273+ 	$(QUIET )$(RMDIR )  ./__pycache__ 2> $(ERROR_LOG_PATH )  ||  : 
274+ 
275+ cleanup-hypothesis ::
276+ 	$(QUIET )$(RM )  ./.hypothesis/** /*  2> $(ERROR_LOG_PATH )  ||  true 
277+ 	$(QUIET )$(RM )  ./.hypothesis/*  2> $(ERROR_LOG_PATH )  ||  true 
278+ 	$(QUIET )$(RMDIR )  ./.hypothesis/ 2> $(ERROR_LOG_PATH )  ||  true 
279+ 
280+ cleanup-tests : cleanup-hypothesis cleanup-py-cache-dirs cleanup-py-caches
281+ 	$(QUIET )$(RM )  ./test_env/** /*  2> $(ERROR_LOG_PATH )  ||  true 
282+ 	$(QUIET )$(RM )  ./test_env/*  2> $(ERROR_LOG_PATH )  ||  true 
283+ 	$(QUIET )$(RMDIR )  ./test_env/ 2> $(ERROR_LOG_PATH )  ||  true 
284+ 	$(QUIET )$(RMDIR )  .pytest_cache/ 2> $(ERROR_LOG_PATH )  ||  true 
285+ 	$(QUIET )$(RMDIR )  ./.tox/ 2> $(ERROR_LOG_PATH )  ||  true 
286+ 
287+ cleanup-pythonrepo : cleanup-py-cache-dirs cleanup-py-caches
288+ 	$(QUIET )$(RM )  pythonrepo/* .pyc 2> $(ERROR_LOG_PATH )  ||  true 
289+ 	$(QUIET )$(RM )  pythonrepo/* ~ 2> $(ERROR_LOG_PATH )  ||  true 
290+ 	$(QUIET )$(RM )  pythonrepo/__pycache__/*  2> $(ERROR_LOG_PATH )  ||  true 
291+ 	$(QUIET )$(RM )  pythonrepo/* /* .pyc 2> $(ERROR_LOG_PATH )  ||  true 
292+ 
293+ cleanup-pythonrepo-eggs : cleanup-dev-backups cleanup-mac-dir-store
294+ 	$(QUIET )$(RM )  ./* .egg-info/*  2> $(ERROR_LOG_PATH )  ||  true 
295+ 	$(QUIET )$(RMDIR )  ./* .egg-info 2> $(ERROR_LOG_PATH )  ||  true 
296+ 	$(QUIET )$(RMDIR )  .eggs 2> $(ERROR_LOG_PATH )  ||  true 
297+ 	$(QUIET )$(RMDIR )  ./.eggs/ 2> $(ERROR_LOG_PATH )  ||  true 
298+ 
299+ cleanup-src-dir : cleanup-dev-backups cleanup-mac-dir-store
300+ 	$(QUIET )$(RM )  ./src/** /*  2> $(ERROR_LOG_PATH )  ||  true 
301+ 	$(QUIET )$(RM )  ./src/*  2> $(ERROR_LOG_PATH )  ||  true 
302+ 	$(QUIET )$(RMDIR )  ./src/ 2> $(ERROR_LOG_PATH )  ||  true 
303+ 
304+ cleanup : cleanup-tests cleanup-pythonrepo cleanup-pythonrepo-eggs cleanup-src-dir
305+ 	$(QUIET )$(RM )  ./.coverage 2> $(ERROR_LOG_PATH )  ||  true 
306+ 	$(QUIET )$(RM )  ./coverage* .xml 2> $(ERROR_LOG_PATH )  ||  true 
307+ 	$(QUIET )$(RM )  ./sitecustomize.py 2> $(ERROR_LOG_PATH )  ||  true 
308+ 	$(QUIET )$(RMDIR )  ./test-reports/ 2> $(ERROR_LOG_PATH )  ||  true 
309+ 	$(QUIET )$(WAIT )  ; 
310+ 
311+ build-docs : ./docs/ ./docs/Makefile docs-reqs
312+ 	$(QUIET )$(MAKE )  -s -C ./docs/ -f Makefile html 2> $(ERROR_LOG_PATH )  ||  DO_FAIL=" exit 2" ; 
313+ 	$(QUIET )$(WAIT )  ; 
314+ 	$(QUIET ) mkdir $(INST_OPTS )  ./docs/www 2> $(ERROR_LOG_PATH )  > $(ERROR_LOG_PATH )  ||  :  ; 
315+ 	$(QUIET )$(BSMARK )  ./docs/www 2> $(ERROR_LOG_PATH )  > $(ERROR_LOG_PATH )  ||  :  ; 
316+ 	$(QUIET )$(WAIT )  ; 
317+ 	$(QUIET ) cp -fRp ./docs/_build/ ./docs/www/ 2> $(ERROR_LOG_PATH )  ||  DO_FAIL=" exit 35" ; 
318+ 	$(QUIET )$(WAIT )  ; 
319+ 	$(QUIET )$(MAKE )  -s -C ./docs/ -f Makefile clean 2> $(ERROR_LOG_PATH )  ||  :  ; 
320+ 	$(QUIET )$(WAIT )  ; 
321+ 	$(QUIET )$(ECHO )  " Documentation should be in docs/www/html/" 
322+ 	$(QUIET )$(DO_FAIL )  ; 
323+ 
324+ clean-docs : ./docs/ ./docs/Makefile
325+ 	$(QUIET )$(RM )  ./docs/www/*  2> $(ERROR_LOG_PATH )  ||  :  ; 
326+ 	$(QUIET )$(RMDIR )  ./docs/www/ 2> $(ERROR_LOG_PATH )  ||  :  ; 
327+ 	$(QUIET )$(MAKE )  -s -C ./docs/ -f Makefile clean 2> $(ERROR_LOG_PATH )  ||  :  ; 
328+ 	$(QUIET )$(WAIT )  ; 
329+ 
330+ ./docs/ :
331+ 	$(QUIET )  :  ; 
332+ 
333+ ./docs/Makefile : ./docs/
334+ 	$(QUIET )$(WAIT )  ; 
335+ 
336+ clean : clean-docs cleanup
337+ 	$(QUIET )$(ECHO )  " Cleaning Up." 
338+ 	$(QUIET )$(COVERAGE )  erase 2> $(ERROR_LOG_PATH )  ||  true 
339+ 	$(QUIET )$(RM )  ./test-results/junit.xml 2> $(ERROR_LOG_PATH )  ||  true 
340+ 	$(QUIET )$(RM )  ./MANIFEST.in 2> $(ERROR_LOG_PATH )  ||  true 
341+ 	$(QUIET )$(ECHO )  " All clean." 
141342
142343must_be_root :
143344	$(QUIET ) runner=` whoami` ;  \ 
0 commit comments