diff --git a/src/.gitignore b/src/.gitignore index 89dc852b1a..ca9558cabb 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -6,6 +6,7 @@ /style_*.h /lmpcompiledate.h +/lmpinstalledpkgs.h /*_gpu.h /*_gpu.cpp diff --git a/src/Makefile b/src/Makefile index eb7382989d..7e19070c90 100644 --- a/src/Makefile +++ b/src/Makefile @@ -164,6 +164,13 @@ help: @if [ ! -d $(objdir) ]; then mkdir $(objdir); fi @$(SHELL) Make.sh style @$(SHELL) Make.sh date + @echo 'Gathering installed package information' + @echo 'static const char lammps_installed_packages[] = ' > lmpinstalledpkgs.tmp + @for p in $(PACKAGEUC) $(PACKUSERUC); do info=$$($(SHELL) Package.sh $$p installed); \ + [ -n "$$info" ] && echo "\"$$info\"" | sed -e 's/".*package/"/' >> lmpinstalledpkgs.tmp || :; done + @echo ';' >> lmpinstalledpkgs.tmp + @test "`diff --brief lmpinstalledpkgs.tmp lmpinstalledpkgs.h`" != "" && \ + mv lmpinstalledpkgs.tmp lmpinstalledpkgs.h || rm lmpinstalledpkgs.tmp @if [ -f MAKE/MACHINES/Makefile.$@ ]; \ then cp MAKE/MACHINES/Makefile.$@ $(objdir)/Makefile; fi @if [ -f MAKE/OPTIONS/Makefile.$@ ]; \ diff --git a/src/lammps.cpp b/src/lammps.cpp index 53a17c717d..eedf7bc6fa 100644 --- a/src/lammps.cpp +++ b/src/lammps.cpp @@ -1035,9 +1035,11 @@ static const char lammps_config_options[] "\n"; #include "lmpcompiledate.h" +#include "lmpinstalledpkgs.h" void LAMMPS::print_config(FILE *fp) { fprintf(fp,"LAMMPS compiled on: %s\n\n",lammps_compile_date); fputs(lammps_config_options,fp); + fprintf(fp,"Installed packages:%s\n\n",lammps_installed_packages); }