You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NAME
activate(1) - start a subshell with all newly compiled programs in the
shell command search path.
SYNOPSIS
fpm activate [--bindir [DIRECTORY_NAME]] [--list]
DESCRIPTION
Start a subshell with the designated directory added to the search path.
Subsequently any application built by fpm(1) will be placed in the directory
so that it is immediately available for execution. In csh(1) and tcsh(1) a
rehash(1) command may be required for newly created executables to be located.
Enter "exit" to return to the environment that existed before the activate
command was executed.
While in the subshell the environment variable FPM_BINDIR indicates where
the latest executables will be stored.
OPTIONS
--bindir
by default executables will be placed in the build/latest
subdirectory under the top directory of the current fpm(1) project.
If this option is present a full pathname must be specified to an
existing directory.
--list If present, the contents of the current "activate" directory, if any,
are displayed.
EXAMPLES
sample commands:
fpm activate
fpm activate --bindir $HOME/.local/testbin
Possible Solution
Per some recent discussions on how to improve running programs as you build them,
proposing the above command, which I have working in a basic format in the "shell" branch on a
fork of fpm for anyone that wants to try it, but it currently only is complete enough to try it using the bash shell
suggestions are welcome. Is build/latest a better name than build/bin? Should build/bin be deleted on exit or left so it can be resumed? Should a --list that shows the executables in the "activate" directory show fullpathnames? Would a remove using globbing be useful? In verbose mode should it show the name of the "activate" directory? These are just a few things that come to mind, but I want to at least make sure it works with cmd.exe first.
What shells, especially on MSWindows, need supported?
There is no thumbs-down button on github, so how many down votes or alternative proposals are there? We discussed some others on Fortran Discourse.
"run cmd -- options" is not too bad in the current version when using the default compiler and default options unless you want to run in another directory,
but when you start using options, especially different ones I have found this, even in a prototype state, preferable myself so far.
But by using the recently introduced environment variables or (coming soon?) options in the fpm.toml file that could be kept relatively simple, in which case using -W run_directory would also work for most cases without requiring a subshell and altering the environment. Obviously, I prefer this approach but curious about other voices and/or even how many people might find this useful.
Description
Possible Solution
Per some recent discussions on how to improve running programs as you build them,
proposing the above command, which I have working in a basic format in the "shell" branch on a
fork of fpm for anyone that wants to try it, but it currently only is complete enough to try it using the bash shell
https://github.com/urbanjost/fpm
Additional Information
The is a single-file version for the
bash
shell that can be pulled with curl(1) or wget(1) at https://raw.githubusercontent.com/urbanjost/fpm-tools/main/tools/bootstrap/fpm-activate.F90Any testing would be appreciated.
The text was updated successfully, but these errors were encountered: