From 2dbf59efa9fb4f30456a7cbb00f5a2b8eaeaecbe Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 30 Mar 2021 11:43:56 -0400 Subject: [PATCH] update install instructions for updates via patch and git for CMake/GNU make --- doc/src/Install_git.rst | 70 +++++++++++++++++++++++++++------------ doc/src/Install_patch.rst | 62 +++++++++++++++++++++++++--------- 2 files changed, 94 insertions(+), 38 deletions(-) diff --git a/doc/src/Install_git.rst b/doc/src/Install_git.rst index a84f31a80d..3c10171ea3 100644 --- a/doc/src/Install_git.rst +++ b/doc/src/Install_git.rst @@ -86,33 +86,59 @@ check out any other desired branch) first. Once you have updated your local files with a ``git pull`` (or ``git checkout``), you still need to re-build LAMMPS if any source files have -changed. To do this, you should cd to the src directory and type: +changed. How to do this depends on the build system you are using. -.. code-block:: bash +.. tabs:: - $ make purge # remove any deprecated src files - $ make package-update # sync package files with src files - $ make foo # re-build for your machine (mpi, serial, etc) + .. tab:: CMake build -just as described on the :doc:`Apply patch ` page, -after a patch has been installed. + Change to your build folder and type: -.. warning:: + .. code-block:: bash - If you wish to edit/change a src file that is from a - package, you should edit the version of the file inside the package - sub-directory with src, then re-install the package. The version in - the source directory is merely a copy and will be wiped out if you type "make - package-update". + cmake . --build -.. warning:: + CMake should auto-detect whether it needs to re-run the CMake + configuration step and otherwise redo the build for all files + that have been changed or files that depend on changed files. + In case some build options have been changed or renamed, you + may have to update those by running: - The GitHub servers support both the "git://" and - "https://" access protocols for anonymous read-only access. If you - have a correspondingly configured GitHub account, you may also use - SSH access with the URL "git@github.com:lammps/lammps.git". + .. code-block:: bash -The LAMMPS GitHub project is managed by Christoph Junghans (LANL, -junghans at lanl.gov), Axel Kohlmeyer (Temple U, akohlmey at -gmail.com) and Richard Berger (Temple U, richard.berger at -temple.edu). + cmake . + + and then rebuild. + + .. tab:: Traditional make + + Switch to the src directory and type: + + .. code-block:: bash + + $ make purge # remove any deprecated src files + $ make package-update # sync package files with src files + $ make foo # re-build for your machine (mpi, serial, etc) + + Just as described on the :doc:`Apply patch ` page, + after a patch has been installed. + + .. warning:: + + If you wish to edit/change a src file that is from a package, + you should edit the version of the file inside the package + sub-directory with src, then re-install the package. The + version in the source directory is merely a copy and will be + wiped out if you type "make package-update". + +.. admonition:: Git protocols + :class: note + + The servers at github.com support the "git://" and "https://" access + protocols for anonymous, read-only access. If you have a suitably + configured GitHub account, you may also use SSH protocol with the + URL "git@github.com:lammps/lammps.git". + +The LAMMPS GitHub project is currently managed by Axel Kohlmeyer +(Temple U, akohlmey at gmail.com) and Richard Berger (Temple U, +richard.berger at temple.edu). diff --git a/doc/src/Install_patch.rst b/doc/src/Install_patch.rst index 39e007bb67..b1f36b19e0 100644 --- a/doc/src/Install_patch.rst +++ b/doc/src/Install_patch.rst @@ -43,24 +43,54 @@ up to date. * A list of updated files print out to the screen. The -b switch creates backup files of your originals (e.g. src/force.cpp.orig), so you can manually undo the patch if something goes wrong. -* Type the following from the src directory, to enforce consistency - between the src and package directories. This is OK to do even if you - don't use one or more packages. If you are applying several patches - successively, you only need to type this once at the end. The purge - command removes deprecated src files if any were removed by the patch - from package sub-directories. - .. code-block:: bash +* Once you have updated your local files you need to re-build LAMMPS. + If you are applying several patches successively, you only need to + do the rebuild once at the end. How to do it depends on the build + system you are using. - $ make purge - $ make package-update + .. tabs:: -* Re-build LAMMPS via the "make" command. + .. tab:: CMake build -.. warning:: + Change to your build folder and type: - If you wish to edit/change a source file that is part of a package, - you should edit the version of the file inside the package folder in - src, and then re-install or update the package. The version in the - src directory is merely a copy and will be wiped out when you type - "make package-update". + .. code-block:: bash + + cmake . --build + + CMake should auto-detect whether it needs to re-run the CMake + configuration step and otherwise redo the build for all files + that have been changed or files that depend on changed files. + In case some build options have been changed or renamed, you + may have to update those by running: + + .. code-block:: bash + + cmake . + + and then rebuild. + + .. tab:: Traditional make + + Switch to the src directory and type: + + .. code-block:: bash + + $ make purge # remove any deprecated src files + $ make package-update # sync package files with src files + $ make foo # re-build for your machine (mpi, serial, etc) + + to enforce consistency of the source between the src folder + and package directories. This is OK to do even if you don't + use any packages. The "make purge" command removes any deprecated + src files if they were removed by the patch from a package + sub-directory. + + .. warning:: + + If you wish to edit/change a src file that is from a package, + you should edit the version of the file inside the package + sub-directory with src, then re-install the package. The + version in the source directory is merely a copy and will be + wiped out if you type "make package-update".