11.DEFAULT_GOAL := help
22
3- PHPNOGC =php -d zend.enable_gc=0
3+ PHPBIN =php
44
55.PHONY : help
66help :
@@ -35,7 +35,7 @@ test: tc e2e
3535PHPUNIT =bin/phpunit
3636tu : # # Run PHPUnit tests
3737tu : bin/phpunit
38- $(PHPNOGC ) $(PHPUNIT )
38+ $(PHPBIN ) $(PHPUNIT )
3939
4040.PHONY : tc
4141tc : # # Run PHPUnit tests with test coverage
@@ -55,23 +55,23 @@ PHPSCOPER=bin/php-scoper.phar
5555.PHONY : e2e_004
5656e2e_004 : # # Run end-to-end tests for the fixture set 004 — Source code case
5757e2e_004 : bin/php-scoper.phar
58- $(PHPNOGC ) $(BOX ) compile --working-dir fixtures/set004
58+ $(PHPBIN ) $(BOX ) compile --working-dir fixtures/set004
5959
6060 php build/set004/bin/greet.phar > build/set004/output
6161 diff fixtures/set004/expected-output build/set004/output
6262
6363.PHONY : e2e_005
6464e2e_005 : # # Run end-to-end tests for the fixture set 005 — Third-party code case
6565e2e_005 : bin/php-scoper.phar fixtures/set005/vendor
66- $(PHPNOGC ) $(BOX ) compile --working-dir fixtures/set005
66+ $(PHPBIN ) $(BOX ) compile --working-dir fixtures/set005
6767
6868 php build/set005/bin/greet.phar > build/set005/output
6969 diff fixtures/set005/expected-output build/set005/output
7070
7171.PHONY : e2e_011
7272e2e_011 : # # Run end-to-end tests for the fixture set 011 — Whitelist case
7373e2e_011 : bin/php-scoper.phar fixtures/set011/vendor
74- $(PHPNOGC ) $(BOX ) compile --working-dir fixtures/set011
74+ $(PHPBIN ) $(BOX ) compile --working-dir fixtures/set011
7575 cp -R fixtures/set011/tests/ build/set011/tests/
7676
7777 php build/set011/bin/greet.phar > build/set011/output
@@ -88,23 +88,23 @@ e2e_013: bin/php-scoper.phar
8888.PHONY : e2e_014
8989e2e_014 : # # Run end-to-end tests for the fixture set 014 — Source code case with PSR-0
9090e2e_014 : bin/php-scoper.phar
91- $(PHPNOGC ) $(BOX ) compile --working-dir fixtures/set014
91+ $(PHPBIN ) $(BOX ) compile --working-dir fixtures/set014
9292
9393 php build/set014/bin/greet.phar > build/set014/output
9494 diff fixtures/set014/expected-output build/set014/output
9595
9696.PHONY : e2e_015
9797e2e_015 : # # Run end-to-end tests for the fixture set 015 — Third-party code case with PSR-0
9898e2e_015 : bin/php-scoper.phar fixtures/set015/vendor
99- $(PHPNOGC ) $(BOX ) compile --working-dir fixtures/set015
99+ $(PHPBIN ) $(BOX ) compile --working-dir fixtures/set015
100100
101101 php build/set015/bin/greet.phar > build/set015/output
102102 diff fixtures/set015/expected-output build/set015/output
103103
104104.PHONY : e2e_016
105105e2e_016 : # # Run end-to-end tests for the fixture set 016 — Symfony Finder
106106e2e_016 : bin/php-scoper.phar fixtures/set016-symfony-finder/vendor
107- $(PHPNOGC ) $(PHPSCOPER ) add-prefix \
107+ $(PHPBIN ) $(PHPSCOPER ) add-prefix \
108108 --working-dir=fixtures/set016-symfony-finder \
109109 --output-dir=../../build/set016-symfony-finder \
110110 --force \
@@ -119,7 +119,7 @@ e2e_016: bin/php-scoper.phar fixtures/set016-symfony-finder/vendor
119119.PHONY : e2e_017
120120e2e_017 : # # Run end-to-end tests for the fixture set 017 — Symfony DependencyInjection
121121e2e_017 : bin/php-scoper.phar fixtures/set017-symfony-di/vendor
122- $(PHPNOGC ) $(PHPSCOPER ) add-prefix \
122+ $(PHPBIN ) $(PHPSCOPER ) add-prefix \
123123 --working-dir=fixtures/set017-symfony-di \
124124 --output-dir=../../build/set017-symfony-di \
125125 --force \
@@ -134,7 +134,7 @@ e2e_017: bin/php-scoper.phar fixtures/set017-symfony-di/vendor
134134.PHONY : e2e_018
135135e2e_018 : # # Run end-to-end tests for the fixture set 018 — Nikic PHP-Parser
136136e2e_018 : bin/php-scoper.phar fixtures/set018-nikic-parser/vendor
137- $(PHPNOGC ) $(PHPSCOPER ) add-prefix \
137+ $(PHPBIN ) $(PHPSCOPER ) add-prefix \
138138 --working-dir=fixtures/set018-nikic-parser \
139139 --prefix=_Prefixed \
140140 --output-dir=../../build/set018-nikic-parser \
@@ -149,7 +149,7 @@ e2e_018: bin/php-scoper.phar fixtures/set018-nikic-parser/vendor
149149.PHONY : e2e_019
150150e2e_019 : # # Run end-to-end tests for the fixture set 019 — Symfony Console
151151e2e_019 : bin/php-scoper.phar fixtures/set019-symfony-console/vendor
152- $(PHPNOGC ) $(PHPSCOPER ) add-prefix --working-dir=fixtures/set019-symfony-console \
152+ $(PHPBIN ) $(PHPSCOPER ) add-prefix --working-dir=fixtures/set019-symfony-console \
153153 --prefix=_Prefixed \
154154 --output-dir=../../build/set019-symfony-console \
155155 --force \
@@ -164,7 +164,7 @@ e2e_019: bin/php-scoper.phar fixtures/set019-symfony-console/vendor
164164.PHONY : e2e_020
165165e2e_020 : # # Run end-to-end tests for the fixture set 020 — Infection
166166e2e_020 : bin/php-scoper.phar fixtures/set020-infection/vendor clover.xml
167- $(PHPNOGC ) $(PHPSCOPER ) add-prefix --working-dir=fixtures/set020-infection \
167+ $(PHPBIN ) $(PHPSCOPER ) add-prefix --working-dir=fixtures/set020-infection \
168168 --output-dir=../../build/set020-infection \
169169 --force \
170170 --no-interaction \
@@ -182,8 +182,8 @@ e2e_020: bin/php-scoper.phar fixtures/set020-infection/vendor clover.xml
182182
183183.PHONY : e2e_021
184184e2e_021 : # # Run end-to-end tests for the fixture set 020 — Composer
185- e2e_021 : bin/php-scoper.phar fixtures/set021-composer/vendor clover.xml
186- $(PHPNOGC ) $(PHPSCOPER ) add-prefix --working-dir=fixtures/set021-composer \
185+ e2e_021 : bin/php-scoper.phar fixtures/set021-composer/vendor
186+ $(PHPBIN ) $(PHPSCOPER ) add-prefix --working-dir=fixtures/set021-composer \
187187 --output-dir=../../build/set021-composer \
188188 --force \
189189 --no-interaction \
@@ -203,7 +203,7 @@ e2e_021: bin/php-scoper.phar fixtures/set021-composer/vendor clover.xml
203203.PHONY : e2e_022
204204e2e_022 : # # Run end-to-end tests for the fixture set 022 — Whitelist the project code with namespace whitelisting
205205e2e_022 : bin/php-scoper.phar fixtures/set022/vendor
206- $(PHPNOGC ) $(BOX ) compile --working-dir fixtures/set022
206+ $(PHPBIN ) $(BOX ) compile --working-dir fixtures/set022
207207 cp -R fixtures/set022/tests/ build/set022/tests/
208208
209209 php build/set022/bin/greet.phar > build/set022/output
@@ -213,7 +213,7 @@ e2e_022: bin/php-scoper.phar fixtures/set022/vendor
213213.PHONY : e2e_023
214214e2e_023 : # # Run end-to-end tests for the fixture set 023 — Whitelisting a whole third-party component with namespace whitelisting
215215e2e_023 : bin/php-scoper.phar fixtures/set023/vendor
216- $(PHPNOGC ) $(PHPSCOPER ) add-prefix --working-dir=fixtures/set023 \
216+ $(PHPBIN ) $(PHPSCOPER ) add-prefix --working-dir=fixtures/set023 \
217217 --output-dir=../../build/set023 \
218218 --force \
219219 --no-interaction \
@@ -226,7 +226,7 @@ e2e_023: bin/php-scoper.phar fixtures/set023/vendor
226226.PHONY : e2e_024
227227e2e_024 : # # Run end-to-end tests for the fixture set 024 — Whitelisting user functions registered in the global namespace
228228e2e_024 : bin/php-scoper.phar fixtures/set024/vendor
229- $(PHPNOGC ) $(PHPSCOPER ) add-prefix \
229+ $(PHPBIN ) $(PHPSCOPER ) add-prefix \
230230 --working-dir=fixtures/set024 \
231231 --output-dir=../../build/set024 \
232232 --force \
@@ -241,7 +241,7 @@ e2e_024: bin/php-scoper.phar fixtures/set024/vendor
241241.PHONY : e2e_025
242242e2e_025 : # # Run end-to-end tests for the fixture set 025 — Whitelisting a vendor function
243243e2e_025 : bin/php-scoper.phar fixtures/set025/vendor
244- $(PHPNOGC ) $(PHPSCOPER ) add-prefix \
244+ $(PHPBIN ) $(PHPSCOPER ) add-prefix \
245245 --working-dir=fixtures/set025 \
246246 --output-dir=../../build/set025 \
247247 --force \
@@ -255,7 +255,7 @@ e2e_025: bin/php-scoper.phar fixtures/set025/vendor
255255.PHONY : e2e_026
256256e2e_026 : # # Run end-to-end tests for the fixture set 026 — Whitelisting classes and functions with pattern matching
257257e2e_026 : bin/php-scoper.phar fixtures/set026/vendor
258- $(PHPNOGC ) $(PHPSCOPER ) add-prefix \
258+ $(PHPBIN ) $(PHPSCOPER ) add-prefix \
259259 --working-dir=fixtures/set026 \
260260 --output-dir=../../build/set026 \
261261 --force \
@@ -270,32 +270,26 @@ e2e_026: bin/php-scoper.phar fixtures/set026/vendor
270270.PHONY : tb
271271BLACKFIRE =blackfire
272272tb : # # Run Blackfire profiling
273- tb : vendor
274- rm -rf build
275- rm -rf vendor-bin/* /vendor
276-
277- mv -f vendor tmp-back
278- composer install --no-dev --prefer-dist --classmap-authoritative
279-
280- $(BLACKFIRE) --new-reference run $(PHPNOGC) bin/php-scoper add-prefix --output-dir=build/php-scoper --force --quiet
281-
282- rm -rf vendor
283- mv -f tmp-back vendor
273+ tb : bin/php-scoper.phar vendor
274+ $(BLACKFIRE ) --new-reference run $(PHPBIN ) bin/php-scoper.phar add-prefix --output-dir=build/php-scoper --force --quiet
284275
285276#
286277# Rules from files
287278# ---------------------------------------------------------------------------
288279
289280vendor : composer.lock
290- composer install
281+ export COMPOSER_ROOT_VERSION=' 0.8.99' ; composer install
282+ unset " COMPOSER_ROOT_VERSION"
291283 touch $@
292284
293285vendor/bamarni : composer.lock
294- composer install
286+ export COMPOSER_ROOT_VERSION=' 0.8.99' ; composer install
287+ unset " COMPOSER_ROOT_VERSION"
295288 touch $@
296289
297290bin/phpunit : composer.lock
298- composer install
291+ export COMPOSER_ROOT_VERSION=' 0.8.99' ; composer install
292+ unset " COMPOSER_ROOT_VERSION"
299293 touch $@
300294
301295vendor-bin/covers-validator/vendor : vendor-bin/covers-validator/composer.lock vendor/bamarni
@@ -404,7 +398,7 @@ bin/php-scoper.phar: bin/php-scoper src vendor scoper.inc.php box.json
404398box.json : box.json.dist
405399 cat box.json.dist | sed -E ' s/\"key\": \".+\",//g' | sed -E ' s/\"algorithm\": \".+\",//g' > box.json
406400
407- COVERS_VALIDATOR =$(PHPNOGC ) vendor-bin/covers-validator/bin/covers-validator
401+ COVERS_VALIDATOR =$(PHPBIN ) vendor-bin/covers-validator/bin/covers-validator
408402clover.xml : src
409403 $(COVERS_VALIDATOR )
410404 phpdbg -qrr -d zend.enable_gc=0 $(PHPUNIT ) \
0 commit comments