views:

115

answers:

2

My main question is that the autotools created links to INSTALL, COPYING, missing, install-sh, and depcomp. When I tried to view them I saw that they were uploaded as links so I replaced them with real files so they are viewable. Am I missing something fundamental? When I unpack my gz file from 'make dist' this is what it looks like:

Distribution Tree (Minus Source Directories)

-rw-r--r-- 1 ojblass users  18591 2009-05-30 03:23 Makefile.in
-rwxr-xr-x 1 ojblass users 136168 2009-05-30 03:20 configure
drwxr-xr-x 3 ojblass users   4096 2009-05-30 03:20 autom4te.cache
-rw-r--r-- 1 ojblass users  32230 2009-05-30 03:20 aclocal.m4
-rw-r--r-- 1 ojblass users    251 2009-05-30 03:20 configure.ac
-rw-r--r-- 1 ojblass users    626 2009-05-30 03:11 AUTHORS
-rwxr-xr-x 1 ojblass users    120 2009-05-30 03:11 autogen.sh
-rw-r--r-- 1 ojblass users    737 2009-05-30 03:11 ChangeLog
-rw-r--r-- 1 ojblass users  35147 2009-05-30 03:11 COPYING
-rwxr-xr-x 1 ojblass users  17867 2009-05-30 03:11 depcomp
-rwxr-xr-x 1 ojblass users    199 2009-05-30 03:11 example.pl
-rwxr-xr-x 1 ojblass users    152 2009-05-30 03:11 example.sh
-rw-r--r-- 1 ojblass users   9512 2009-05-30 03:11 INSTALL
-rwxr-xr-x 1 ojblass users  13620 2009-05-30 03:11 install-sh
-rw-r--r-- 1 ojblass users    215 2009-05-30 03:11 Makefile.am
-rwxr-xr-x 1 ojblass users  11135 2009-05-30 03:11 missing
-rw-r--r-- 1 ojblass users     75 2009-05-30 03:11 NEWS
-rwxr-xr-x 1 ojblass users    507 2009-05-30 03:11 profile.sh
-rw-r--r-- 1 ojblass users   2605 2009-05-30 03:11 README
-rw-r--r-- 1 ojblass users    201 2009-05-30 03:11 README_developers
-rwxr-xr-x 1 ojblass users    382 2009-05-30 03:11 run.sh
-rw-r--r-- 1 ojblass users    481 2009-05-30 03:11 TODO
-rwxr-xr-x 1 ojblass users    117 2009-05-30 03:11 usefull.sh

I am planning on removing the README_developers and making two sections in the README. I am also looking at removing the run.sh and profile.sh and making them part of a make test target (some reading required). I do not think that a TODO item belongs in the source distribution but maybe it is okay to have it in the source tree of the project. Any additional pointers above and beyond the links question is appreciated.

+1  A: 

The TODO file can go in the distribution; it is an indication to consumers of things that you think are deficient in the product, and they are a pointer to potential contributors to areas where they could perhaps help improve the product. (Also, if you fell under a bus, it would help other people take over using the current release material.)

It might be worth using a sub-directory to hold the bulk of configuration material.

Regarding your main question - were the files 'links' or 'symlinks'? Symbolic links are less useful for packaging unless you tell (GNU) tar to follow them anyway ('-h' or '--dereference'). If the only symlinks are to those files, that works; if you use symbolic links in the distribution itself, it may be more counter-productive.

Jonathan Leffler
Looking at ls output with number of links == 1 it's easy to tell that those are symlinks not hard-links.
lispmachine
erm.. now I read that those are regular files from unpacked distribution tarball
lispmachine
To be perfectly clear these are not from the tar ball but a download of the files from sourceforge. they come down as links to nonexistant files on some machines when you fetch the source. If these don't exist than the package tar ball won't have them. These things are a bit less than obvious. But looking at SourceForge uncrustify I found something that looks reasonable as far as structures go. I am going to leave this question up for a little longer.
ojblass
+1  A: 

Short answer: Leaving those symlinks (other than INSTALL) would be faked conformance to GNU coding standards.

By default automake perform check for conformance to GNU standards (requires following files to exist: INSTALL, NEWS, README, COPYING, AUTHORS and ChangeLog). One may turn of that check (and safely remove some of those files) by passing --foreign option to automake (to do it edit autogen.sh and rerun it).

The links were created when automake was invoked with --add-missing options which unless --copy option was given creates symlinks for missing files rather then copying them. This is in order to keep those files (actually INSTALL only) up to date whenever you install newer automake. Regerding Jonathan's answer those symlinks are not an issue: all distributed files are copied to separate directory before making tarball. Change them to regular files if you want to edit them.

Other files (README_developers, run.sh, profile.sh, TODO etc.) were probably generated by IDE you are using and added to EXTRA_DIST variable in top Makefile.am. You may remove them from distribution by editing EXTRA_DIST and afterward you may also remove them from source.

The rest is automatically generated by autoconf and automake:

  • aclocal.m4
  • autom4te.cache
  • configure
  • depcomp
  • install-sh
  • Makefile.in
  • missing

If you want to further unclutter your top source directory you may add AC_CONFIG_AUX_DIR([scripts]) to configure.ac. This way some of the scripts will find place in scripts directory.

Update:

The GNU coding standards merely describe the requirement of those documentation files to be present within distribution and what information should be included there. The --add-missing option is to remind programmer what files should be written. Obviously having empty NEWS or AUTHORS file won't make the project more conformant to standard.

Only ChangeLog file have rigid requirements on it's format. In some projects ChangeLog is automatically generated from properly formated commit messages. On Darcs it's simply darcs changes >ChangeLog. If you use Subversion you may look at: svn2log, svn2cl.

As mentioned INSTALL file might be reasonable to keep as symlink but only if there is no project specific information needed about the installation (i.e. no extra configure script arguments etc.).

lispmachine
What if someone else packages the product or downloads the source from SourceForge that has different files in those locations? Can you ellaborate more on that GNU Standard you referenced? Does it specifically mention handling of these files for conformance?
ojblass
When someone downloads the distribution tarball than he has copies (notsymlinks) of files you had. The difference may arise when source istaken from source control management system (aka version control system)and those files/symlinks are not included in repository. Therefore Iprefer to handle them as files and put them under version control.
lispmachine
Thank you enjoy your bounty!
ojblass