Commit e25b6c81 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

use a more conventional way to generate and include the lmpinstalledpkgs.h file

parent 80cca7c4
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -153,10 +153,13 @@ help:

lmpinstalledpkgs.h: $(SRC) $(INC)
	@echo 'Gathering installed package information (may take a little while)'
	@echo 'const char * LAMMPS_NS::LAMMPS::installed_packages[] = {' > lmpinstalledpkgs.tmp
	@echo '#ifndef LMP_INSTALLED_PKGS' >  lmpinstalledpkgs.tmp
	@echo '#define LMP_INSTALLED_PKGS' >> lmpinstalledpkgs.tmp
	@echo 'const char * LAMMPS_NS::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 \(.*\)"/"\1",/' >> lmpinstalledpkgs.tmp || :; done
	@echo ' NULL };' >> lmpinstalledpkgs.tmp
	@echo '#endif' >> lmpinstalledpkgs.tmp
	@if [ -f lmpinstalledpkgs.h ]; \
          then test "`diff --brief lmpinstalledpkgs.tmp lmpinstalledpkgs.h`" != "" && \
	        mv lmpinstalledpkgs.tmp lmpinstalledpkgs.h || rm lmpinstalledpkgs.tmp ; \
+2 −2
Original line number Diff line number Diff line
@@ -51,6 +51,8 @@
#include "version.h"
#include "error.h"

#include "lmpinstalledpkgs.h"

using namespace LAMMPS_NS;

static void print_style(FILE *fp, const char *str, int &pos);
@@ -978,8 +980,6 @@ void print_style(FILE *fp, const char *str, int &pos)
  }
}

#include "lmpinstalledpkgs.h"

void LAMMPS::print_config(FILE *fp)
{
  const char *pkg;