record installed packages
This commit is contained in:
1
src/.gitignore
vendored
1
src/.gitignore
vendored
@ -6,6 +6,7 @@
|
||||
|
||||
/style_*.h
|
||||
/lmpcompiledate.h
|
||||
/lmpinstalledpkgs.h
|
||||
|
||||
/*_gpu.h
|
||||
/*_gpu.cpp
|
||||
|
||||
@ -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.$@ ]; \
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user