diff --git a/doc/src/Build_package.rst b/doc/src/Build_package.rst index 67639a46b9..4a96eacc69 100644 --- a/doc/src/Build_package.rst +++ b/doc/src/Build_package.rst @@ -220,7 +220,8 @@ These commands install/un-install sets of packages: .. code-block:: bash make yes-all # install all packages - make no-all # uninstall all packages + make no-all # check for changes and uninstall all packages + make no-installed # only check and uninstall installed packages make yes-basic # install a few commonly used packages' make no-basic # remove a few commonly used packages' make yes-most # install most packages w/o libs' diff --git a/src/Makefile b/src/Makefile index bedce0c2c4..10b4029278 100644 --- a/src/Makefile +++ b/src/Makefile @@ -547,6 +547,9 @@ yes-all: no-all: @for p in $(PACKAGE); do $(MAKE) no-$$p; done +no-installed: + @for p in $(PACKAGESORTED); do $(SHELL) Package.sh $$p info && $(MAKE) no-$$p || : ; done + yes-standard yes-std: @echo 'There are no more "standard" or "user" packages in LAMMPS' diff --git a/src/Package.sh b/src/Package.sh index aa217fb555..1586f888cc 100755 --- a/src/Package.sh +++ b/src/Package.sh @@ -41,6 +41,15 @@ elif (test $2 = "installed") then echo "Installed YES: package $1" fi +# info, exit with true/false status depending on whether a package is installed + +elif (test $2 = "info") then + if (test $installed = 1) then + exit 0 + else + exit 1 + fi + # update, only if installed # perform a re-install, but only if the package is already installed