Skip to content
Commits on May 21, 2012
  1. @edolstra
  2. @edolstra
Commits on May 20, 2012
  1. @edolstra
Commits on Aug 14, 2005
  1. @edolstra

    * `dependencyClosure' now allows a search path, e.g.,

    edolstra committed
        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. @edolstra

    * A primitive operation `dependencyClosure' to do automatic dependency

    edolstra committed
      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
          "foo.c"
          /bla/bar/fnord.h
          "../bar/fnord.h"
        ]
    
      These relative paths are necessary for the builder that compiles
      foo.c to reconstruct the relative directory structure expected by
      foo.c.
    
      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. @edolstra

    * Cleanup; sync with thesis.

    edolstra committed
    svn path=/nix/trunk/make/; revision=3577
Commits on May 2, 2005
  1. @edolstra

    * Merge remaining stuff from the nix-make branch.

    edolstra committed
    * 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. @edolstra

    * ATerm library example.

    edolstra committed
    svn path=/nix/branches/nix-make/examples/; revision=1143
  2. @edolstra

    * A function to build libraries.

    edolstra committed
    * 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. @edolstra

    * Dirty interim hack to make header file dependency determination

    edolstra committed
      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. @edolstra

    * Automatically determine header file dependencies using the

    edolstra committed
      `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. @edolstra

    * Linker accepts a name for the program.

    edolstra committed
    * Better diagnostics.
    
    svn path=/nix/branches/nix-make/lib/; revision=1137
  6. @edolstra

    * Deal with directory components in header file references (e.g.,

    edolstra committed
      `#include "foo/../bar/bla.h"') by building an appropriate tree of
      symlinks.
    
    svn path=/nix/branches/nix-make/examples/; revision=1136
  7. @edolstra

    * Header files that are used by a compilation must be declared

    edolstra committed
      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. @edolstra

    * Some trivial Nix Make examples.

    edolstra committed
    svn path=/nix/branches/nix-make/lib/; revision=1134
Something went wrong with that request. Please try again.