Skip to content

Commit 6357682

Browse files
authored
Minor Makefile tweaks (#699)
1 parent 96ea560 commit 6357682

File tree

1 file changed

+40
-19
lines changed

1 file changed

+40
-19
lines changed

Makefile

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -497,11 +497,14 @@ vendor: composer.lock .composer-root-version
497497
.PHONY: vendor_install
498498
vendor_install:
499499
/bin/bash -c 'source .composer-root-version && composer install'
500-
touch -c $@
500+
touch -c vendor
501+
touch -c $(COMPOSER_BIN_PLUGIN_VENDOR)
502+
touch -c $(PHPUNIT_BIN)
503+
touch -c $(BOX_BIN)
501504

502505
composer.lock: composer.json
503-
@echo composer.lock is not up to date.
504-
touch -c $@ # We likely do not want that message repeated over and over
506+
@echo "$(@) is not up to date. You may want to run the following command:"
507+
@echo "$$ composer update --lock && touch -c $(@)"
505508

506509
vendor-hotfix: vendor
507510
composer dump-autoload
@@ -524,21 +527,26 @@ vendor-bin/covers-validator/vendor: vendor-bin/covers-validator/composer.lock $(
524527
composer bin covers-validator install
525528
touch -c $@
526529
vendor-bin/covers-validator/composer.lock: vendor-bin/covers-validator/composer.json
527-
@echo covers-validator composer.lock is not up to date
530+
@echo "$(@) is not up to date. You may want to run the following command:"
531+
@echo "$$ composer bin covers-validator update --lock && touch -c $(@)"
528532

529533
$(PHP_CS_FIXER_BIN): vendor-bin/php-cs-fixer/vendor
534+
touch -c $@
530535
vendor-bin/php-cs-fixer/vendor: vendor-bin/php-cs-fixer/composer.lock $(COMPOSER_BIN_PLUGIN_VENDOR)
531536
composer bin php-cs-fixer install
532537
touch -c $@
533538
vendor-bin/php-cs-fixer/composer.lock: vendor-bin/php-cs-fixer/composer.json
534-
@echo php-cs-fixer composer.lock is not up to date
539+
@echo "$(@) is not up to date. You may want to run the following command:"
540+
@echo "$$ composer bin php-cs-fixer update --lock && touch -c $(@)"
535541

536542
$(PHPSTAN_BIN): vendor-bin/phpstan/vendor
543+
touch -c $@
537544
vendor-bin/phpstan/vendor: vendor-bin/phpstan/composer.lock $(COMPOSER_BIN_PLUGIN_VENDOR)
538545
composer bin phpstan install
539546
touch -c $@
540547
vendor-bin/phpstan/composer.lock: vendor-bin/phpstan/composer.json
541-
@echo phpstan composer.lock is not up to date
548+
@echo "$(@) is not up to date. You may want to run the following command:"
549+
@echo "$$ composer bin phpstan update --lock && touch -c $(@)"
542550

543551
$(PHP_SCOPER_PHAR_BIN): $(BOX) bin/php-scoper $(SRC_FILES) vendor-hotfix vendor scoper.inc.php box.json.dist
544552
$(BOX) compile
@@ -552,7 +560,8 @@ fixtures/set005/vendor: fixtures/set005/composer.lock
552560
composer --working-dir=fixtures/set005 install
553561
touch -c $@
554562
fixtures/set005/composer.lock: fixtures/set005/composer.json
555-
@echo fixtures/set005/composer.lock is not up to date.
563+
@echo "$(@) is not up to date. You may want to run the following command:"
564+
@echo "$$ composer --working-dir=fixtures/set005 update --lock && touch -c $(@)"
556565

557566
fixtures/set011/vendor:
558567
composer --working-dir=fixtures/set011 install
@@ -572,37 +581,43 @@ fixtures/set015/vendor: fixtures/set015/composer.lock
572581
composer --working-dir=fixtures/set015 install
573582
touch -c $@
574583
fixtures/set015/composer.lock: fixtures/set015/composer.json
575-
@echo fixtures/set015/composer.lock is not up to date.
584+
@echo "$(@) is not up to date. You may want to run the following command:"
585+
@echo "$$ composer --working-dir=fixtures/set015 update --lock && touch -c $(@)"
576586

577587
fixtures/set016-symfony-finder/vendor: fixtures/set016-symfony-finder/composer.lock
578588
composer --working-dir=fixtures/set016-symfony-finder install
579589
touch -c $@
580590
fixtures/set016-symfony-finder/composer.lock: fixtures/set016-symfony-finder/composer.json
581-
@echo fixtures/set016-symfony-finder/composer.lock is not up to date.
591+
@echo "$(@) is not up to date. You may want to run the following command:"
592+
@echo "$$ composer --working-dir=fixtures/set016-symfony-finder update --lock && touch -c $(@)"
582593

583594
fixtures/set017-symfony-di/vendor: fixtures/set017-symfony-di/composer.lock
584595
composer --working-dir=fixtures/set017-symfony-di install
585596
touch -c $@
586597
fixtures/set017-symfony-di/composer.lock: fixtures/set017-symfony-di/composer.json
587-
@echo fixtures/set017-symfony-di/composer.lock is not up to date.
598+
@echo "$(@) is not up to date. You may want to run the following command:"
599+
@echo "$$ composer --working-dir=fixtures/set017-symfony-di update --lock && touch -c $(@)"
588600

589601
fixtures/set018-nikic-parser/vendor: fixtures/set018-nikic-parser/composer.lock
590602
composer --working-dir=fixtures/set018-nikic-parser install
591603
touch -c $@
592604
fixtures/set018-nikic-parser/composer.lock: fixtures/set018-nikic-parser/composer.json
593-
@echo fixtures/set018-nikic-parser/composer.lock is not up to date.
605+
@echo "$(@) is not up to date. You may want to run the following command:"
606+
@echo "$$ composer --working-dir=fixtures/set018-nikic-parser update --lock && touch -c $(@)"
594607

595608
fixtures/set019-symfony-console/vendor: fixtures/set019-symfony-console/composer.lock
596609
composer --working-dir=fixtures/set019-symfony-console install
597610
touch -c $@
598611
fixtures/set019-symfony-console/composer.lock: fixtures/set019-symfony-console/composer.json
599-
@echo fixtures/set019-symfony-console/composer.lock is not up to date.
612+
@echo "$(@) is not up to date. You may want to run the following command:"
613+
@echo "$$ composer --working-dir=fixtures/set019-symfony-console update --lock && touch -c $(@)"
600614

601615
fixtures/set020-infection/vendor: fixtures/set020-infection/composer.lock
602616
composer --working-dir=fixtures/set020-infection install
603617
touch -c $@
604618
fixtures/set020-infection/composer.lock: fixtures/set020-infection/composer.json
605-
@echo fixtures/set020-infection/composer.lock is not up to date.
619+
@echo "$(@) is not up to date. You may want to run the following command:"
620+
@echo "$$ composer --working-dir=fixtures/set020-infection update --lock && touch -c $(@)"
606621

607622
fixtures/set022/vendor: fixtures/set022/composer.json
608623
composer --working-dir=fixtures/set022 update
@@ -612,19 +627,22 @@ fixtures/set023/vendor: fixtures/set023/composer.lock
612627
composer --working-dir=fixtures/set023 install
613628
touch -c $@
614629
fixtures/set023/composer.lock: fixtures/set023/composer.json
615-
@echo fixtures/set023/composer.lock is not up to date.
630+
@echo "$(@) is not up to date. You may want to run the following command:"
631+
@echo "$$ composer --working-dir=fixtures/set023 update --lock && touch -c $(@)"
616632

617633
fixtures/set024/vendor: fixtures/set024/composer.lock
618634
composer --working-dir=fixtures/set024 install
619635
touch -c $@
620636
fixtures/set024/composer.lock: fixtures/set024/composer.json
621-
@echo fixtures/set024/composer.lock is not up to date.
637+
@echo "$(@) is not up to date. You may want to run the following command:"
638+
@echo "$$ composer --working-dir=fixtures/set024 update --lock && touch -c $(@)"
622639

623640
fixtures/set025/vendor: fixtures/set025/composer.lock
624641
composer --working-dir=fixtures/set025 install
625642
touch -c $@
626643
fixtures/set025/composer.lock: fixtures/set025/composer.json
627-
@echo fixtures/set025/composer.lock is not up to date.
644+
@echo "$(@) is not up to date. You may want to run the following command:"
645+
@echo "$$ composer --working-dir=fixtures/set025 update --lock && touch -c $(@)"
628646

629647
fixtures/set026/vendor:
630648
composer --working-dir=fixtures/set026 update
@@ -634,19 +652,22 @@ fixtures/set027-laravel/vendor: fixtures/set027-laravel/composer.lock
634652
composer --working-dir=fixtures/set027-laravel install --no-dev
635653
touch -c $@
636654
fixtures/set027-laravel/composer.lock: fixtures/set027-laravel/composer.json
637-
@echo fixtures/set027-laravel/composer.lock is not up to date.
655+
@echo "$(@) is not up to date. You may want to run the following command:"
656+
@echo "$$ composer --working-dir=fixtures/set027-laravel update --lock && touch -c $(@)"
638657

639658
fixtures/set028-symfony/vendor: fixtures/set028-symfony/composer.lock
640659
composer --working-dir=fixtures/set028-symfony install --no-dev --no-scripts
641660
touch -c $@
642661
fixtures/set028-symfony/composer.lock: fixtures/set028-symfony/composer.json
643-
@echo fixtures/set028-symfony/composer.lock is not up to date.
662+
@echo "$(@) is not up to date. You may want to run the following command:"
663+
@echo "$$ composer --working-dir=fixtures/set028-symfony update --lock && touch -c $(@)"
644664

645665
fixtures/set029-easy-rdf/vendor: fixtures/set029-easy-rdf/composer.lock
646666
composer --working-dir=fixtures/set029-easy-rdf install --no-dev
647667
touch -c $@
648668
fixtures/set029-easy-rdf/composer.lock: fixtures/set029-easy-rdf/composer.json
649-
@echo fixtures/set029-easy-rdf/composer.lock is not up to date.
669+
@echo "$(@) is not up to date. You may want to run the following command:"
670+
@echo "$$ composer --working-dir=fixtures/set029-easy-rdf update --lock && touch -c $(@)"
650671

651672
fixtures/set030/vendor: fixtures/set030/composer.json
652673
composer --working-dir=fixtures/set030 install --no-dev

0 commit comments

Comments
 (0)