@@ -152,6 +152,7 @@ subroutine get_command_line_settings(cmd_settings)
152
152
call set_args(' &
153
153
& --target " " &
154
154
& --list F &
155
+ & --all F &
155
156
& --release F&
156
157
& --example F&
157
158
& --runner " " &
@@ -167,11 +168,17 @@ subroutine get_command_line_settings(cmd_settings)
167
168
names= [character (len= len (names)) :: ]
168
169
endif
169
170
171
+
170
172
if (specified(' target' ) )then
171
173
call split(sget(' target' ),tnames,delimiters= ' ,:' )
172
174
names= [character (len= max (len (names),len (tnames))) :: names,tnames]
173
175
endif
174
176
177
+ ! convert --all to '*'
178
+ if (lget(' all' ))then
179
+ names= [character (len= max (len (names),1 )) :: names,' *' ]
180
+ endif
181
+
175
182
! convert special string '..' to equivalent (shorter) '*'
176
183
! to allow for a string that does not require shift-key and quoting
177
184
do i= 1 ,size (names)
@@ -180,6 +187,7 @@ subroutine get_command_line_settings(cmd_settings)
180
187
181
188
allocate (fpm_run_settings :: cmd_settings)
182
189
val_runner= sget(' runner' )
190
+ if (specified(' runner' ) .and. val_runner.eq. ' ' )val_runner= ' echo'
183
191
cmd_settings= fpm_run_settings(&
184
192
& args= remaining,&
185
193
& build_name= val_build,&
@@ -389,6 +397,7 @@ subroutine get_command_line_settings(cmd_settings)
389
397
390
398
allocate (fpm_test_settings :: cmd_settings)
391
399
val_runner= sget(' runner' )
400
+ if (specified(' runner' ) .and. val_runner.eq. ' ' )val_runner= ' echo'
392
401
cmd_settings= fpm_test_settings(&
393
402
& args= remaining, &
394
403
& build_name= val_build, &
@@ -513,7 +522,7 @@ subroutine set_help()
513
522
' [--full|--bare][--backfill] ' , &
514
523
' update [NAME(s)] [--fetch-only] [--clean] [--verbose] ' , &
515
524
' list [--list] ' , &
516
- ' run [[--target] NAME(s) [--example] [--release] [-- runner "CMD"] ' , &
525
+ ' run [[--target] NAME(s) [--example] [--release] [-all] [-- runner "CMD"] ' , &
517
526
' [--compiler COMPILER_NAME] [--list] [-- ARGS] ' , &
518
527
' test [[--target] NAME(s)] [--release] [--runner "CMD"] [--list] ' , &
519
528
' [--compiler COMPILER_NAME] [-- ARGS] ' , &
@@ -541,7 +550,8 @@ subroutine set_help()
541
550
' OPTION ' , &
542
551
' --runner '' CMD'' quoted command used to launch the fpm(1) executables. ' , &
543
552
' Available for both the "run" and "test" subcommands. ' , &
544
- ' ' , &
553
+ ' If the keyword is specified without a value the default command ' , &
554
+ ' is "echo". ' , &
545
555
' -- SUFFIX_OPTIONS additional options to suffix the command CMD and executable ' , &
546
556
' file names with. ' , &
547
557
' EXAMPLES ' , &
@@ -626,7 +636,7 @@ subroutine set_help()
626
636
' new NAME [[--lib|--src] [--app] [--test] [--example]]| ' , &
627
637
' [--full|--bare][--backfill] ' , &
628
638
' update [NAME(s)] [--fetch-only] [--clean] ' , &
629
- ' run [[--target] NAME(s)] [--release] [--list] [--example] ' , &
639
+ ' run [[--target] NAME(s)] [--release] [--list] [--example] [-all] ' , &
630
640
' [--runner "CMD"] [--compiler COMPILER_NAME] [-- ARGS] ' , &
631
641
' test [[--target] NAME(s)] [--release] [--list] ' , &
632
642
' [--runner "CMD"] [--compiler COMPILER_NAME] [-- ARGS] ' , &
@@ -699,7 +709,7 @@ subroutine set_help()
699
709
' ' , &
700
710
' SYNOPSIS ' , &
701
711
' fpm run [[--target] NAME(s)[--release][--compiler COMPILER_NAME] ' , &
702
- ' [--runner "CMD"] [--example] [--list][-- ARGS] ' , &
712
+ ' [--runner "CMD"] [--example] [--list] [--all] [-- ARGS] ' , &
703
713
' ' , &
704
714
' fpm run --help|--version ' , &
705
715
' ' , &
@@ -711,17 +721,17 @@ subroutine set_help()
711
721
' are automatically rebuilt before being run if they are out of date. ' , &
712
722
' ' , &
713
723
' OPTIONS ' , &
714
- ' --target NAME(s) list of specific application names to execute. ' , &
715
- ' No name is required if only one target exists. ' , &
716
- ' If no name is supplied and more than one candidate ' , &
717
- ' exists or a name has no match a list is produced ' , &
718
- ' and fpm(1) exits. ' , &
719
- ' Basic "globbing" is supported where "?" represents' , &
724
+ ' --target NAME(s) list of application names to execute. No name is ' , &
725
+ ' required if only one target exists. If no name is ' , &
726
+ ' supplied and more than one candidate exists or a ' , &
727
+ ' name has no match a list is produced and fpm(1) ' , &
728
+ ' exits. ' , &
729
+ ' ' , &
730
+ ' Basic "globbing" is supported where "?" represents ' , &
720
731
' any single character and "*" represents any string. ' , &
721
- ' The special string "." causes all targets to ' , &
722
- ' be listed, even if only a single target exists. ' , &
723
- ' The special string ".." causes all targets to ' , &
724
- ' be executed. ' , &
732
+ ' Note The glob string normally needs quoted to ' , &
733
+ ' the special characters from shell expansion. ' , &
734
+ ' --all Run all examples or applications. An alias for --target '' *'' . ' , &
725
735
' --example Run example programs instead of applications. ' , &
726
736
' --release selects the optimized build instead of the debug build. ' , &
727
737
' --compiler COMPILER_NAME Specify a compiler name. The default is ' , &
@@ -738,9 +748,9 @@ subroutine set_help()
738
748
' EXAMPLES ' , &
739
749
' fpm(1) - run or display project applications: ' , &
740
750
' ' , &
741
- ' fpm run # run a target when only one exists or list targets ' , &
742
- ' fpm run . # list all targets, running nothing ' , &
743
- ' fpm run .. # run all targets, no matter how many there are ' , &
751
+ ' fpm run # run a target when only one exists or list targets ' , &
752
+ ' fpm run --list # list all targets, running nothing. ' , &
753
+ ' fpm run --all # run all targets, no matter how many there are. ' , &
744
754
' ' , &
745
755
' # run default program built or to be built with the compiler command ' , &
746
756
' # "f90". If more than one app exists a list displays and target names' , &
@@ -930,9 +940,9 @@ subroutine set_help()
930
940
' cd myproject # Enter the new directory ' , &
931
941
' # and run commands such as ' , &
932
942
' fpm build ' , &
933
- ' fpm run # run example application program(s) ' , &
943
+ ' fpm run # run lone example application program ' , &
934
944
' fpm test # run example test program(s) ' , &
935
- ' fpm run --example # run example program(s) ' , &
945
+ ' fpm run --example # run lone example program ' , &
936
946
' ' , &
937
947
' fpm new A --full # create example/ and an annotated fpm.toml as well' , &
938
948
' fpm new A --bare # create no directories ' , &
@@ -956,6 +966,11 @@ subroutine set_help()
956
966
' --target NAME(s) optional list of specific test names to execute. ' , &
957
967
' The default is to run all the tests in test/ ' , &
958
968
' or the tests listed in the "fpm.toml" file. ' , &
969
+ ' ' , &
970
+ ' Basic "globbing" is supported where "?" represents ' , &
971
+ ' any single character and "*" represents any string. ' , &
972
+ ' Note The glob string normally needs quoted to ' , &
973
+ ' protect the special characters from shell expansion.' , &
959
974
' --release selects the optimized build instead of the debug ' , &
960
975
' build. ' , &
961
976
' --compiler COMPILER_NAME Specify a compiler name. The default is ' , &
0 commit comments