<html lang="en"> <head> <title>PKG_ADD and PKG_DEL directives - Untitled</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="Untitled"> <meta name="generator" content="makeinfo 4.13"> <link title="Top" rel="start" href="index.html#Top"> <link rel="up" href="Creating-Packages.html#Creating-Packages" title="Creating Packages"> <link rel="prev" href="The-INDEX-file.html#The-INDEX-file" title="The INDEX file"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <div class="node"> <a name="PKG_ADD-and-PKG_DEL-directives"></a> <a name="PKG_005fADD-and-PKG_005fDEL-directives"></a> <p> Previous: <a rel="previous" accesskey="p" href="The-INDEX-file.html#The-INDEX-file">The INDEX file</a>, Up: <a rel="up" accesskey="u" href="Creating-Packages.html#Creating-Packages">Creating Packages</a> <hr> </div> <h4 class="subsection">35.4.3 PKG_ADD and PKG_DEL directives</h4> <p>If the package contains files called <code>PKG_ADD</code><!-- /@w --> or <code>PKG_DEL</code><!-- /@w --> the commands in these files will be executed when the package is added or removed from the users path. In some situations such files are a bit cumbersome to maintain, so the package manager supports automatic creation of such files. If a source file in the package contains a <code>PKG_ADD</code><!-- /@w --> or <code>PKG_DEL</code><!-- /@w --> directive they will be added to either the <code>PKG_ADD</code><!-- /@w --> or <code>PKG_DEL</code><!-- /@w --> files. <p>In <code>m</code>-files a <code>PKG_ADD</code><!-- /@w --> directive looks like this <pre class="example"> ## PKG_ADD: some_octave_command </pre> <p class="noindent">Such lines should be added before the <code>function</code> keyword. In C++ files a <code>PKG_ADD</code><!-- /@w --> directive looks like this <pre class="example"> // PKG_ADD: some_octave_command </pre> <p class="noindent">In both cases <code>some_octave_command</code> should be replaced by the command that should be placed in the <code>PKG_ADD</code><!-- /@w --> file. <code>PKG_DEL</code><!-- /@w --> directives work in the same way, except the <code>PKG_ADD</code><!-- /@w --> keyword is replaced with <code>PKG_DEL</code><!-- /@w --> and the commands get added to the <code>PKG_DEL</code><!-- /@w --> file. <!-- maybe add again later, if anyone every writes any really interesting --> <!-- fun stuff for Octave. --> <!-- @include amuse.texi --> <!-- --> <!-- Appendices start here. --> <!-- DO NOT EDIT! Generated automatically by munge-texi. --> <!-- Copyright (C) 2007, 2008, 2009 John W. Eaton and David Bateman --> <!-- Copyright (C) 2007 Paul Thomas and Christoph Spiel --> <!-- This file is part of Octave. --> <!-- Octave is free software; you can redistribute it and/or modify it --> <!-- under the terms of the GNU General Public License as published by the --> <!-- Free Software Foundation; either version 3 of the License, or (at --> <!-- your option) any later version. --> <!-- Octave is distributed in the hope that it will be useful, but WITHOUT --> <!-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or --> <!-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --> <!-- for more details. --> <!-- You should have received a copy of the GNU General Public License --> <!-- along with Octave; see the file COPYING. If not, see --> <!-- <http://www.gnu.org/licenses/>. --> </body></html>