홈페이지 : http://people.fishpool.fi/~setok/proj/smake/
smake는 개발자가 100% TCL(smake 확장 기능 포함)을 사용하여 makefile을 작성할 수 있도록 해주는 유틸리티입니다. 이를 통해 네임스페이스, 패키지, 데이터베이스 접근 등 대규모 프로젝트를 다루기 위해 TCL이 제공하는 모든 기능을 활용할 수 있습니다. 전통적인 UNIX make에서는 이러한 작업이 어렵고, 종종 복잡한 꼼수를 써야 합니다. 또한 TCL을 사용하면 프로젝트의 요구에 맞게 의존성 검사 루틴을 쉽게 교체할 수 있습니다(예를 들어, 각 타겟에 대해 별도의 명령을 지정하지 않아도 파일의 새로운 버전을 자동으로 확인 및 다운로드하도록 할 수 있습니다). 최신 버전에는 매우 정교하면서도 이해하기 쉬운 규칙 시스템이 포함되어 있으며, 이는 make와 달리 일반 규칙을 지정하고 그 규칙에 대한 보다 구체적인 예외를 설정할 수 있는 기능을 제공합니다.
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
# Here is a very simple example Smakefile that can be used with smake.
# It is meant as a quick demonstration only, not as a proof of smake's power.
# It assumes the C files hello.c and hello.h exist.
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 {}
}
# Here is another simple example Smakefile that demonstrates how smake can be extended.
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
}
'Tcl & Tk > 툴 (Tool)' 카테고리의 다른 글
Komodo Edit (0) | 2025.08.27 |
---|---|
HelpViewer (0) | 2025.08.18 |
TDK (Tcl Dev Kit) 오픈 소스 (0) | 2025.03.06 |
DigiTcl 0.3.2 (0) | 2025.03.06 |
Frink 2.2 (0) | 2025.03.06 |