Switch branches/tags
Nothing to show
Commits on May 21, 2012
Commits on May 20, 2012
Commits on Aug 14, 2005
  1. * `dependencyClosure' now allows a search path, e.g.,

    edolstra committed Aug 14, 2005
        dependencyClosure { ... searchPath = [ ../foo ../bar ]; ... }
    * Primop `dirOf' to return the directory part of a path (e.g., dirOf
      /a/b/c == /a/b).
    * Primop `relativise' (according to Webster that's a real word!) that
      given paths A and B returns a string representing path B relative
      path to A; e.g., relativise /a/b/c a/b/x/y => "../x/y".
    svn path=/nix/trunk/make/; revision=3580
  2. * A primitive operation `dependencyClosure' to do automatic dependency

    edolstra committed Aug 14, 2005
      determination (e.g., finding the header files dependencies of a C
      file) in Nix low-level builds automatically.
      For instance, in the function `compileC' in make/lib/default.nix, we
      find the header file dependencies of C file `main' as follows:
        localIncludes =
          dependencyClosure {
            scanner = file:
              import (findIncludes {
                inherit file;
            startSet = [main];
      The function works by "growing" the set of dependencies, starting
      with the set `startSet', and calling the function `scanner' for each
      file to get its dependencies (which should yield a list of strings
      representing relative paths).  For instance, when `scanner' is
      called on a file `foo.c' that includes the line
        #include "../bar/fnord.h"
      then `scanner' should yield ["../bar/fnord.h"].  This list of
      dependencies is absolutised relative to the including file and added
      to the set of dependencies.  The process continues until no more
      dependencies are found (hence its a closure).
      `dependencyClosure' yields a list that contains in alternation a
      dependency, and its relative path to the directory of the start
      file, e.g.,
        [ /bla/bla/foo.c
      These relative paths are necessary for the builder that compiles
      foo.c to reconstruct the relative directory structure expected by
      The advantage of `dependencyClosure' over the old approach (using
      the impure `__currentTime') is that it's completely pure, and more
      efficient because it only rescans for dependencies (i.e., by
      building the derivations yielded by `scanner') if sources have
      actually changed.  The old approach rescanned every time.
    svn path=/nix/trunk/make/; revision=3578
  3. * Cleanup; sync with thesis.

    edolstra committed Aug 14, 2005
    svn path=/nix/trunk/make/; revision=3577
Commits on May 2, 2005
  1. * Merge remaining stuff from the nix-make branch.

    edolstra committed May 2, 2005
    * Add support for the creation of shared libraries to `compileC',
      `link', and `makeLibrary'.
    * Enable the ATerm library to be made into a shared library.
    svn path=/nix/trunk/make/; revision=2978
Commits on Jul 6, 2004
  1. * ATerm library example.

    edolstra committed Jul 6, 2004
    svn path=/nix/branches/nix-make/examples/; revision=1143
  2. * A function to build libraries.

    edolstra committed Jul 6, 2004
    * The linker can link against libraries.
    * C flags can be passed to the C compiler.
    svn path=/nix/branches/nix-make/lib/; revision=1142
  3. * Dirty interim hack to make header file dependency determination

    edolstra committed Jul 6, 2004
      reliable (if somewhat inefficient): make the current time an
      attribute of the derivation.  Thus, every call to `nix-build' will
      cause the find-includes derivation to be re-done (but not the actual
      compilations if that's not necessary!).  I added a `curTime' primop
      to do this.
    svn path=/nix/branches/nix-make/lib/; revision=1140
  4. * Automatically determine header file dependencies using the

    edolstra committed Jul 6, 2004
      `findIncludes' function.  The current implementation is impure and
      therefore not correct: it gathers header file dependencies only once
      for a specific path (due to caching).
    svn path=/nix/branches/nix-make/lib/; revision=1139
  5. * Linker accepts a name for the program.

    edolstra committed Jul 6, 2004
    * Better diagnostics.
    svn path=/nix/branches/nix-make/lib/; revision=1137
  6. * Deal with directory components in header file references (e.g.,

    edolstra committed Jul 6, 2004
      `#include "foo/../bar/bla.h"') by building an appropriate tree of
    svn path=/nix/branches/nix-make/examples/; revision=1136
  7. * Header files that are used by a compilation must be declared

    edolstra committed Jul 6, 2004
      explicitly.  If you forget a dependency, it's simply not visible to
      the compiler, and so the compilation fails.  This is a big plus over
      conventional Make.
    svn path=/nix/branches/nix-make/examples/; revision=1135
  8. * Some trivial Nix Make examples.

    edolstra committed Jul 6, 2004
    svn path=/nix/branches/nix-make/lib/; revision=1134