Difference between revisions of "User:Timothee Flutre/Notebook/Postdoc/2012/11/27"

From OpenWetWare
Jump to: navigation, search
(How to make a GNU package?: add autotools info)
(How to make a GNU package?: add info about documentation)
Line 17: Line 17:
  
 
* use [http://en.wikipedia.org/wiki/GNU_build_system Autotools] (see [http://www.lrde.epita.fr/~adl/autotools.html tutorial]):
 
* use [http://en.wikipedia.org/wiki/GNU_build_system Autotools] (see [http://www.lrde.epita.fr/~adl/autotools.html tutorial]):
** write the files <code>configure.ac</code> and <code>Makefile.am</code>
+
touch configure.ac Makefile.am src/Makefile.am doc/Makefile.am #and edit
** run the tool (repeat until there is no error anymore):
 
 
  autoreconf --install
 
  autoreconf --install
 
  ./configure #can be followed by --prefix=... or LDFLAGS=...
 
  ./configure #can be followed by --prefix=... or LDFLAGS=...
 
  make
 
  make
 
  make check
 
  make check
 +
 +
* write some documentation in [http://en.wikipedia.org/wiki/Texinfo Texinfo]:
 +
<nowiki>
 +
cd doc
 +
wget -O fdl.texi http://cvs.savannah.gnu.org/viewvc/*checkout*/gnustandards/fdl.texi?root=gnustand
 +
ards&content-type=text%2Fplain
 +
touch manual.texi #and edit
 +
</nowiki>
 +
 +
* make your package available to anyone:
 
  make install
 
  make install
 
  make distclean
 
  make distclean
 
  make dist
 
  make dist
 
* write some documentation
 
  
 
* share your code, for instance on [http://en.wikipedia.org/wiki/GitHub GitHub] (see [http://openwetware.org/wiki/User:Timothee_Flutre/Notebook/Postdoc/2012/08/14 my tips])
 
* share your code, for instance on [http://en.wikipedia.org/wiki/GitHub GitHub] (see [http://openwetware.org/wiki/User:Timothee_Flutre/Notebook/Postdoc/2012/08/14 my tips])

Revision as of 20:52, 27 November 2012

Owwnotebook icon.png Project name <html><img src="/images/9/94/Report.png" border="0" /></html> Main project page
<html><img src="/images/c/c3/Resultset_previous.png" border="0" /></html>Previous entry<html>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</html>

How to make a GNU package?

  • find a name for the package
  • structure the package directory:
touch README INSTALL NEWS AUTHORS COPYING ChangeLog
mkdir src build-aux doc test #lib
  • populate the src/ directory with your code, e.g. hello.cpp
touch configure.ac Makefile.am src/Makefile.am doc/Makefile.am #and edit
autoreconf --install
./configure #can be followed by --prefix=... or LDFLAGS=...
make
make check
  • write some documentation in Texinfo:
 cd doc
 wget -O fdl.texi http://cvs.savannah.gnu.org/viewvc/*checkout*/gnustandards/fdl.texi?root=gnustand
ards&content-type=text%2Fplain
 touch manual.texi #and edit

  • make your package available to anyone:
make install
make distclean
make dist