You are here

smake 1.1.1

admin의 아바타
첨부 파일파일 크기
Binary Data smake-1.1.tar.gz16.22 KB

홈페이지 : http://people.fishpool.fi/~setok/proj/smake/

예제와 문서가 포함되어 있습니다.

smake is a utility that allows developers to build makefiles in 100% TCL (with the smake extensions). This allows one to use all the facilities that TCL provides to deal with large projects like namespaces, packages, database access etc. With the traditional UNIX make this is difficult and often ugly hacks are involved. Plus, with TCL you can easily replace the dependency checking routines to suit the needs of the project (f.ex. to automatically check and fetch new versions of the file from the net, without having to specify the operation for each target). The latest version includes a fairly sophisticated but easy to understand rule system, which (unlike make) offers the possibility to specify general rules and more specific exceptions to these rules

target hello.o { 
  depend {foo.h main.c} {
    compile main.c 
  }
}
target foo.o {
  depend {foo.c foo.h} {
    compile foo.c
  }
}
target testiprg {
  depend {foo.o main.o} {
    link testiprg {foo.o main.o} Tcl8.0
  }
}
target all {
  depend testiprg {}
}
set Compile "g++"
set COptions "-c -g"
set Linker "g++"
set LOptions "-execute -r"

target hello.o {
  depend {foo.h main.c} {
    compile main.c 
      -Wall 
      -I/usr/include/ 
      -I..
  }
}
target testiprg {
  depend {main.o} {
    link testiprg {foo.o main.o 
      -L/usr/lib} {tcl8.0 tk8.0}
  }
}
# Note the position of the curly braces for link!
target all {
  depend testiprg {}
}
target clean {
  set LObjFiles [glob *.o]
  foreach it $LObjFiles {
    file delete $it
  }
  file delete testiprg
}