[darcs-users] darcs patch: Generate SRC_DIRS programmatically. (and 26 more)

Trent W. Buck trentbuck at gmail.com
Sat Oct 25 01:43:18 UTC 2008


These are the changes I've made the GNUmakefile this week.  (I used
darcs send --match 'touch GNUmakefile'.)  I have amended away some
spelling mistakes in patch descriptions since my last post.  There are
also a couple of minor new patches.

This doesn't include the patch to make ghc noisy by default (because
David didn't approve).  Note that "Use $@ and $* to shrink[...]" does
increase the noise of "make test" if you don't use "make -s test", but
only by a few lines at the top.

That patch also removes the reverse sorting (sort -r) of tests,
because nobody could explain why it was necessary.  Instead it will
just use whatever sorting is the default for globbing in your locale;
you might get different sorting when LC_COLLATE (or indirectly,
LANG/LC_ALL) change.  I feel this is actually beneficial, because
right now tests can accidentally break/fix one another because they
share a working directory.  I hope to address that soon.

The factoring of DARCS_FILES and the test/bugs rules is not complete;
there's still unpleasant boilerplate / code duplication.  I don't
intend to finish the job anytime soon.

The "obviate SRC_DIRS altogether" patch may break some buildbots,
because the SUS/POSIX find's -exec {} + may not be very widespread yet
(after all, the standard is only FIVE YEARS old, grumble).  If this
breaks, we can easily change it to -exec {} \;, which is uglier but
still correct for the case in question.

Thu Oct 23 13:42:12 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Generate SRC_DIRS programmatically.
  
  The -name sys -prune -o ... -print part is a hack to skip the
  src/win32/sys, which is probably safe to include in the list, but I
  didn't want to take any chances.

Thu Oct 23 14:01:39 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Obviate SRC_DIRS altogether.
  
  Note that find -delete would be better, but it is not standard:
  http://www.opengroup.org/onlinepubs/009695399/utilities/find.html

Thu Oct 23 14:09:02 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * DARCS_FILES_DEPS is never bound, so don't evaluate it.

Thu Oct 23 14:34:09 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Tweak C_OBJS declaration.

Thu Oct 23 14:40:44 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Replace procedural := with declarative =.
  
  When you do "x = a b" in make, it doesn't get evaluated until you
  actually attempt to refer to $x in a rule, because make is an expert
  system.  The reason := exists is because if you do
  
      f = $(shell really-slow-command)
  
  and then try to build a bunch of object files, $f will cause
  really-slow-command to be run separately for each one.  Since we're
  just doing internal stuff like $(patsubst), we don't need := and using
  it makes it harder to reason about the system, because it's no longer
  declarative.

Thu Oct 23 16:09:26 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Miscellaneous refactoring.

Thu Oct 23 16:10:23 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Leverage gmake's order-only dependencies.

Thu Oct 23 17:07:45 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Remove obsolete "deb" target.
  I maintain the Debian darcs package, and I don't use this target.
  I doubt anyone else has a use for it.

Thu Oct 23 17:18:30 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Remove unpleasant sequencing operators (;) from haddock targets.
  
  Make is will abort a run when any command fails.  Using ;\\\n to join
  separate lines means make can't detect if the first line fails.  Also,
  continuation lines are ugly.
  
  When disabling failure propagation is intentional and desired, you can
  achieve this explicitly by starting the command with a hyphen (-).

Thu Oct 23 17:51:34 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Don't override MAKEFLAGS's -j.
  
  Make does hairy things within $MAKEFLAGS (which is included in $MAKE)
  to ensure that -j does the right thing in the presence of nested
  makes.  Overriding this with $(MAKE) -j4 is almost certainly naughty.
  Instead, you should do "make -j4 disttest" or implicitly, with
  "MAKEFLAGS=j4 darcs record --test".

Thu Oct 23 18:05:50 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Add conventional "pdf", "ps" and "html" targets.
  See info page (make)Standard Targets.

Thu Oct 23 18:08:47 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Make it obvious why deps are being filtered.

Thu Oct 23 18:14:27 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * release/debian is long gone.

Thu Oct 23 18:20:13 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Fix some predicates I accidentally reversed.

Thu Oct 23 18:20:48 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Reduce loquacity of haddock targets.
  I think that if someone runs "make api-doc", it's not useful to
  immediately print
  
      echo "Generating html"
      Generating html
  
  Therefore I'm removing these lines.

Fri Oct 24 14:17:00 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Don't call GHC on autoconf.mk in .depend rule.
  I don't know why, but $^ included autoconf.mk.  I used $(filter) to
  remove it, and put all the deps on one line while I was at it.

Fri Oct 24 14:24:05 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Turn descriptive commands into comments.
  I don't think there's any point in printing "I'm deleting information
  you can't recover" immediately before doing so, without offering an
  abort step.  Therefore, that message can just be an ordinary comment
  in the makefile.

Fri Oct 24 14:39:00 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Conventionalize make rule for hspwd.

Fri Oct 24 14:44:29 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Refactor test rules.
  Now the target names correspond to the darcs switches, e.g. "make
  test-darcs-2" instead of "make test-format2".  There are some legacy
  pointers so the old targets still work, but they probably put the
  results in a different directory.

Fri Oct 24 19:10:50 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Clean hspwd.

Fri Oct 24 19:50:52 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Add conventional install-ps/pdf/html targets.
  See info page (make)Standard Targets.

Fri Oct 24 19:53:59 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Use ANNOUNCE_GHC convention for darcs.

Fri Oct 24 19:57:40 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Use $@ and $* to shrink test_harness.
  
  Note that I have also removed the use of @ to hide what make is doing.
  
  It is better to use "make --silent" to hide such noise, because then I
  can debug problems in the makefile by running *without* --silent,
  rather than having to temporarily remove the @'s.

Sat Oct 25 12:08:03 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Generate DARCS_FILES by blacklist, not whitelist.
  This attempt is far from perfect, but at least it works.

Sat Oct 25 12:16:33 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Refactor dependency declaration for helper utils.
  The .hs/.lhs deps that "disappear" are still in autoconf.mk.in.

Sat Oct 25 12:19:35 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Generate TEXSOURCES programmatically.

Sat Oct 25 12:22:08 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Refactor targets that prevent "include autoconf.mk" (and .depend).
  As well as being clearer, this is now a good deal more liberal. For
  example, it won't rebuild .depend during "make maintainer-clean".

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/x-darcs-patch
Size: 109406 bytes
Desc: A darcs patch for your repository!
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20081024/dbc75eb9/attachment-0001.bin 


More information about the darcs-users mailing list