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

Trent W. Buck trentbuck at gmail.com
Thu Oct 23 07:38:07 UTC 2008


Whew!  I sat down this morning aiming to achieve one thing: "darcs mv
src/*.tex doc/manual", then correct GNUmakefile, Setup.hs and cabal.in
so the manual still built correctly.

Instead I got bogged down whacking low-hanging fruit in the makefile.
I know it's going away, but it's easier to understand (and translate)
a two-page makefile than a ten page one :-)

Some of these changes *are* contentious, and I probably also let a few
bugs slip through.  I feel like it's mostly good, though, so let's
have some patch review so this stuff can get applied!

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 13:34:47 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Use $@ to avoid repetition in makefile.

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 16:39:56 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Explain ghcflags_fancy.

Thu Oct 23 16:57:44 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Generate the list of source files (rather than hard-coding it).

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:25:29 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Generate the list of tex sources (rather than hard-coding it).

Thu Oct 23 17:28:31 EST 2008  Trent W. Buck <trentbuck at gmail.com>
  * Refactor dependency declartion for helper utils.
  The .hs/.lhs deps that "disappear" are still in autoconf.mk.in.

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.

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


More information about the darcs-users mailing list