Skip to content

Commit b3e3d83

Browse files
committed
for "new" subcommand example/ is only created explicitly by --example or --full
1 parent 77c27e7 commit b3e3d83

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

fpm/src/fpm_command_line.f90

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -263,15 +263,14 @@ subroutine get_command_line_settings(cmd_settings)
263263
& with_test=lget('test'), &
264264
& with_example=lget('example'), &
265265
& verbose=lget('verbose') )
266-
else
266+
else ! default if no specific directories are requested
267267
cmd_settings=fpm_new_settings(&
268268
& backfill=lget('backfill') , &
269269
& name=name, &
270270
& with_executable=.true., &
271271
& with_lib=.true., &
272272
& with_test=.true., &
273-
& with_example=.true., &
274-
!*!& with_example=lget('full'), &
273+
& with_example=lget('full'), &
275274
& with_full=lget('full'), &
276275
& with_bare=lget('bare'), &
277276
& verbose=lget('verbose') )
@@ -834,7 +833,7 @@ subroutine set_help()
834833
' o adds a ".gitignore" file for ignoring the build/ directory ', &
835834
' (where fpm-generated output will be placed) ', &
836835
' ', &
837-
' The basic default file structure is ', &
836+
' The default file structure (that will be automatically scanned) is ', &
838837
' ', &
839838
' NAME/ ', &
840839
' fpm.toml ', &
@@ -865,9 +864,9 @@ subroutine set_help()
865864
' ASCII alphanumeric characters and underscores, ', &
866865
' starting with a letter. ', &
867866
' ', &
868-
' The default is to create the src/, app/, example/ and test/ ', &
869-
' directories. If any of the following options are specified ', &
870-
' then only selected subdirectories are generated: ', &
867+
' The default is to create the src/, app/, and test/ directories. ', &
868+
' If any of the following options are specified then only the ', &
869+
' selected subdirectories are generated: ', &
871870
' ', &
872871
' --lib,--src create directory src/ and a placeholder module ', &
873872
' named "NAME.f90" for use with subcommand "build". ', &
@@ -878,22 +877,24 @@ subroutine set_help()
878877
' "--lib" it really does not have anything to test. ', &
879878
' --example create directory example/ and a placeholder program ', &
880879
' for use with the subcommand "run --example". ', &
880+
' It is only created by default if "--full is" specified. ', &
881881
' ', &
882882
' So the default is equivalent to ',&
883883
' ', &
884-
' fpm NAME --lib --app --test --example ', &
884+
' fpm NAME --lib --app --test ', &
885885
' ', &
886886
' --backfill By default the directory must not exist. If this ', &
887887
' option is present the directory may pre-exist and ', &
888888
' only subdirectories and files that do not ', &
889889
' already exist will be created. For example, if you ', &
890890
' previously entered "fpm new myname --lib" entering ', &
891-
' "fpm new myname --backfill" will create any missing ', &
892-
' app/, example/ and test/ directories and programs. ', &
891+
' "fpm new myname -full --backfill" will create any missing', &
892+
' app/, example/, and test/ directories and programs. ', &
893893
' ', &
894894
' --full By default a minimal manifest file ("fpm.toml") is ', &
895895
' created that depends on auto-discovery. With this ', &
896-
' option a much more extensive manifest sample is written. ', &
896+
' option a much more extensive manifest sample is written ', &
897+
' and the example/ directory is created and populated. ', &
897898
' It is designed to facilitate creating projects that ', &
898899
' depend extensively on non-default build options. ', &
899900
' ', &
@@ -914,6 +915,11 @@ subroutine set_help()
914915
' fpm run # run example application program(s) ', &
915916
' fpm test # run example test program(s) ', &
916917
' fpm run --example # run example program(s) ', &
918+
' ', &
919+
' fpm new A --full # create example/ and an annotated fpm.toml as well', &
920+
' fpm new A --bare # create no directories ', &
921+
' create any missing files in current directory ', &
922+
' fpm new `pwd` --full --backfill ', &
917923
'' ]
918924
help_test=[character(len=80) :: &
919925
'NAME ', &

0 commit comments

Comments
 (0)