gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnu-arch-users] Re: Some questions regarding tagging :)


From: Miles Bader
Subject: [Gnu-arch-users] Re: Some questions regarding tagging :)
Date: 05 Sep 2003 11:53:59 +0900

Magnus Therning <address@hidden> writes:
> Regarding tagging and taglines:
> 
> - It seems rather silly that m4 comments don't work for tag-lines:
>   'dnl arch-tag: my tag' does nothing for 'tla inventory --tags'.
>   Is this (being) fixed?

Hopefully it will be fixed with the `new tagline syntax'; I don't know
if Tom is adverse to changing this with the existing arch-tag:.

The workaround I used for emacs was:

  ifelse(dnl    Do not change this comment
     arch-tag: %s
  )dnl

[For configure.in or whatever you should use `m4_if' instead of `ifelse']

> - I am somewhat struggling with what files to put a tag line in. Does
>   anyone have any insights on this? Automake forces quite some extra
>   files to exist (AUTHORS, NEWS, ChangeLog, etc). Putting tag-lines in
>   them isn't really a problem, but it will make them look different
>   from the corresponding files of other packages. There are also some
>   files that have a prescribed format (e.g. Debian changelog files)
>   where a tag-line wouldn't be acceptable, should such files be added
>   manually instead?

When I was adding taglines to emacs, I thought this a bit.  I ended up
adding taglines to everything except:

   (1) Binary files

   (2) Generated files

   (3) Source files that came from another project and are likely to be
       updated later (of course taglines could be added at the original
       source)

   (3) Text files that I thought might have some legal consequence, like
       COPYING (maybe a tagline doesn't affect that, but I don't know)

   (4) Text files that seemed of `historical interest', like the various
       bits old email in emacs' etc/ directory; there probably wouldn't
       be any techical problem with adding taglines to these, but it
       seemed a bit tacky.

   (5) The main `end-user' text files, e.g. README*, INSTALL*, FTP, etc.
       This is the case I'm least sure about; maybe taglines could be
       added in the future.

In many cases, files that are nominally `text files' _already_ had some
meta-info attached in the form of a `Local variables:' section at the
end (e.g., many ChangeLogs &c set the file coding-system this way).  I
took this as both a sign that it was OK to add taglines, and as a clue
to which syntax to use -- for instance, in emacs many text files
actually use a lisp comment prefix like `;;;'; even though it's not
necessary, it makes the meta-info stand out as such, and just generally
looks better.

I used a big hair shell script to do add all the taglines to emacs, and
also have a shell script to add taglines to new files that show up from
an emacs CVS update; maybe looking at those would provide some useful
info.

They're in my `tla-tools' package, available (along with emacs) at:

   Archive:   address@hidden
   Location:  http://arch.linuxguru.net/~miles/address@hidden

What might be of interest are:

   tla-update-tags:

      Looks at what's changed in a project tree, and adds taglines or does
      `tla add/delete/move' as necessary.  This contains heuristics for
      what sort of taglines to add to what sort of files, and what syntax
      to use for adding them.  It will use external tags for any filetype
      it doesn't recognize.

      tla-update-tags is intended to be run before commiting an update, so
      it will failed if `tla what-changed' does, but you can cause it to
      process all files by changed the `tla what-changed' in the first line
      to something like:

         tla inventory -s | sed 'address@hidden@A  @'

      i.e., just pretend every file was added (which is true).  Hmmm, maybe
      it ought to detect this case automatically...

   tla-munge-archive-xids and tla-emacs-xids-to-db:

      These were what I used to do emacs; it contains largely the same
      rules that are in tla-update-tags (though split between the two
      files), but also has some more detailed rules to handle various
      special cases in the emacs souce tree.  Probably not to useful except
      for reference (and note that tla-munge-archive-xids especially is
      VERY DANGEROUS).

> - Should directories be added explicitly when using tag-lines?

I'm not sure about this -- my vague impression is that arch could cope
either way, but perhaps it could some difference in efficiency.  When
you rename a directory without an explicit tag, arch would see the
old/new directories as removed/added, but presumably could detect that
all the files therein were just renames -- but does it optimize the case
where it can see the directory itself was renamed too?

> - When using Automake during development quite a few files are generated
>   among the sourcefiles from running auto{header,make,conf} and
>   libtoolize. Has anyone written some nice regexps to handle this,
>   rather irritating behaviour?

I always use a separate build dir, so I haven't run into that problem,
except for adding `autom4te\.cache' to my `junk' regexp (grrr, that one is
annoying).

-Miles
-- 
Suburbia: where they tear out the trees and then name streets after them.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]