We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8c4fdae commit 613da74Copy full SHA for 613da74
src/fpm.f90
@@ -5,7 +5,7 @@ module fpm
5
fpm_run_settings, fpm_install_settings, fpm_test_settings
6
use fpm_dependency, only : new_dependency_tree
7
use fpm_environment, only: run, get_env
8
-use fpm_filesystem, only: is_dir, join_path, number_of_rows, list_files, exists, basename
+use fpm_filesystem, only: is_dir, join_path, number_of_rows, list_files, exists, basename, filewrite, mkdir
9
use fpm_model, only: fpm_model_t, srcfile_t, show_model, &
10
FPM_SCOPE_UNKNOWN, FPM_SCOPE_LIB, FPM_SCOPE_DEP, &
11
FPM_SCOPE_APP, FPM_SCOPE_EXAMPLE, FPM_SCOPE_TEST
@@ -58,6 +58,11 @@ subroutine build_model(model, settings, package, error)
58
call model%deps%add(package, error)
59
if (allocated(error)) return
60
61
+ ! build/ directory should now exist
62
+ if (.not.exists("build/.gitignore")) then
63
+ call filewrite(join_path("build", ".gitignore"),["*"])
64
+ end if
65
+
66
if(settings%compiler.eq.'')then
67
model%fortran_compiler = 'gfortran'
68
else
src/fpm/cmd/new.f90
@@ -98,9 +98,6 @@ subroutine cmd_new(settings)
98
! like realpath() or getcwd().
99
bname=basename(settings%name)
100
101
- ! create NAME/.gitignore file
102
- call warnwrite(join_path(settings%name, '.gitignore'), ['build/*'])
103
-
104
littlefile=[character(len=80) :: '# '//bname, 'My cool new project!']
105
106
! create NAME/README.md
src/fpm/cmd/update.f90
@@ -2,7 +2,7 @@ module fpm_cmd_update
2
use fpm_command_line, only : fpm_update_settings
3
use fpm_dependency, only : dependency_tree_t, new_dependency_tree
4
use fpm_error, only : error_t, fpm_stop
- use fpm_filesystem, only : exists, mkdir, join_path, delete_file
+ use fpm_filesystem, only : exists, mkdir, join_path, delete_file, filewrite
use fpm_manifest, only : package_config_t, get_package_data
implicit none
private
@@ -26,6 +26,7 @@ subroutine cmd_update(settings)
26
27
if (.not.exists("build")) then
28
call mkdir("build")
29
30
end if
31
32
cache = join_path("build", "cache.toml")
src/fpm_command_line.f90
@@ -938,14 +938,11 @@ subroutine set_help()
938
' o runs the command "git init" in that directory ', &
939
' o populates the directory with the default project directories ', &
940
' o adds sample Fortran source files ', &
941
- ' o adds a ".gitignore" file for ignoring the build/ directory ', &
942
- ' (where fpm-generated output will be placed) ', &
943
' ', &
944
' The default file structure (that will be automatically scanned) is ', &
945
946
' NAME/ ', &
947
' fpm.toml ', &
948
- ' .gitignore ', &
949
' src/ ', &
950
' NAME.f90 ', &
951
' app/ ', &
@@ -1006,8 +1003,8 @@ subroutine set_help()
1006
1003
' depend extensively on non-default build options. ', &
1007
1004
1008
1005
' --bare A minimal manifest file ("fpm.toml") is created and ', &
1009
- ' a ".gitignore" and "README.md" file is created but no ', &
1010
- ' directories or sample Fortran is generated. ', &
+ ' "README.md" file is created but no directories or ', &
+ ' sample Fortran are generated. ', &
1011
1012
' --help print this help and exit ', &
1013
' --version print program version information and exit ', &
0 commit comments