Writing Free Software – Part 6: Making a simple distribution


You might remember from a previous post that we’ve already got a “dist” target which creates a tarball of the source. However, the source doesn’t include any of the code we wrote, only the files generated by autotools. In this article, we’ll make the modifications to the Makefile.am file required to include our source in the dist tarball.

Return to our workspace

$ cd ~/src/greeting

Add an EXTRA_DIST automake variable

$ echo "EXTRA_DIST = Greeting.cs NDesk.Options.cs" >> Makefile.am

Re-build our Makefile

$ ./configure

Test the distdir target

$ make distdir
...
$ ls greeting-0.0.1
AUTHORS Greeting.cs Makefile.in README configure.ac
COPYING INSTALL NDesk.Options.cs aclocal.m4 install-sh
ChangeLog Makefile.am NEWS configure missing
$ make dist
...

Conclusion

Another short one. Sorry for the brevity. But as you can see, a little bit goes a long way.

, , , , ,

Leave a Reply

%d bloggers like this: