Don't install links.dat
authorTeemu Murtola <teemu.murtola@gmail.com>
Sat, 4 Jan 2014 18:36:12 +0000 (20:36 +0200)
committerGerrit Code Review <gerrit@gerrit.gromacs.org>
Tue, 14 Jan 2014 19:27:52 +0000 (20:27 +0100)
This file is only necessary for generating the online HTML help, and
this doesn't anyways work (and doesn't need to work) except when run in
the build directory, through 'make html'.

Change-Id: Icb276749d7f8a5c4743ce426729e2564a79eb8a2

share/html/BuildHtmlHelp.cmake
share/html/links.dat [moved from share/top/links.dat with 100% similarity]
src/gromacs/commandline/cmdlinehelpmodule.cpp

index 24a5861f0b7165a9f8d040ba1ad508d950540c53..8a4f169a5f751bdf747e3d641a67ea17895f941a 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2013, by the GROMACS development team, led by
+# Copyright (c) 2013,2014, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -41,6 +41,7 @@ function(PRE_EXPORT_ACTIONS)
     file(MAKE_DIRECTORY ${OUTPUT_DIR}/programs)
     file(COPY ${SOURCE_HTML_DIR}/header.html.in DESTINATION .)
     file(COPY ${SOURCE_HTML_DIR}/footer.html DESTINATION .)
+    file(COPY ${SOURCE_HTML_DIR}/links.dat   DESTINATION .)
 endfunction()
 
 function(POST_EXPORT_ACTIONS)
similarity index 100%
rename from share/top/links.dat
rename to share/html/links.dat
index a0193cb42e2c34a11a319b734708e23734ef6784..93f1a29fd425ecb3caf046f9a36df0615987fcda 100644 (file)
 #include <boost/scoped_ptr.hpp>
 
 #include "gromacs/legacyheaders/copyrite.h"
-#include "gromacs/legacyheaders/smalloc.h"
 
 #include "gromacs/commandline/cmdlinehelpcontext.h"
 #include "gromacs/commandline/cmdlineparser.h"
-#include "gromacs/fileio/futil.h"
 #include "gromacs/onlinehelp/helpformat.h"
 #include "gromacs/onlinehelp/helpmanager.h"
 #include "gromacs/onlinehelp/helptopic.h"
@@ -504,17 +502,13 @@ HelpExportHtml::HelpExportHtml(const CommandLineModuleMap &modules)
     : links_(eHelpOutputFormat_Html)
 {
     initProgramLinks(&links_, modules);
-    char *linksFilename = low_gmxlibfn("links.dat", FALSE, FALSE);
-    if (linksFilename != NULL)
+    File             linksFile("links.dat", "r");
+    std::string      line;
+    while (linksFile.readLine(&line))
     {
-        scoped_ptr_sfree guard(linksFilename);
-        File             linksFile(linksFilename, "r");
-        std::string      line;
-        while (linksFile.readLine(&line))
-        {
-            links_.addLink(line, "../online/" + line, line);
-        }
+        links_.addLink(line, "../online/" + line, line);
     }
+    linksFile.close();
     setupHeaderAndFooter();
 }