1

私は文芸的プログラミングについて読み始めたばかりで、noweb-そしてそれは非常に興味深いと思います。私が理解している限り、' notangle'ステップは、文字通りのプログラミング(ソース)ファイルから(マシン)ソースコード(ファイル)を抽出するステップです。

ここで、私は1つの特定の側面に興味があります:実行スクリプトを含むnotangle複数のソースファイルを(ステップで) 1回のパスで抽出し、同じステップで実行スクリプトを実行できるようにしたいです!

bashの例は次のようになります。

#!/usr/bin/env bash
# file: test.c.gdb.sh 

# generate C source file
cat > test.c <<"EOF"
#include "stdio.h"

int main(void) {
  return 0;
}
EOF

# generate gdb script file
cat > test.gdb <<"EOF"
break main
run
EOF

# run the 'execution script'

gcc -g -Wall test.c -o test.exe
chmod +x test.exe
gdb -x test.gdb -se test.exe

ここでのポイントは、シェルから''を呼び出すだけで./test.c.gdb.sh、ソースファイルを生成してコンパイルし、デバッガーを自動的に起動できるということです。

ステップでこのようなことを可能にする文芸的プログラミングツールはありnotangleますか?

よろしくお願いします、
乾杯!

4

1 に答える 1

1

extract multiple source files in one pass (in the notangle step), including an execution script - and run the execution script in the same step!

Folks sometimes use make, ant, scons or maven for this kind of thing.

A "single" magical command can't cover very many bases very well. So it's left to external tools to do this.

Often, the final report or document requires complex, multi-step processing through various LaTeX tools. This, too, may require a simple build script or tool setup.

于 2011-09-16T01:49:01.797 に答える