diff options
-rw-r--r-- | .gitignore | 9 | ||||
-rw-r--r-- | mmix.spec | 87 | ||||
-rw-r--r-- | sources | 9 |
3 files changed, 105 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1922cf0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +/abstime.ch +/mmixal.ch +/mmix-arith.ch +/mmix-config.ch +/mmix-io.ch +/mmix-pipe.ch +/mmix-sim.ch +/mmoimg.ch +/mmix-20131017.tgz diff --git a/mmix.spec b/mmix.spec new file mode 100644 index 0000000..ec73beb --- /dev/null +++ b/mmix.spec @@ -0,0 +1,87 @@ +Name: mmix +Version: 20131017 +Release: 1%{?dist} +Summary: MMIX simulators, assembler, and tools +License: Knuth +URL: http://mmix.cs.hm.edu/ +Source0: http://mmix.cs.hm.edu/src/mmix-%{version}.tgz +# CWEB "patches" to fix various GCC warnings +Source100: https://raw.githubusercontent.com/ascherer/mmix/local/abstime.ch +Source101: https://raw.githubusercontent.com/ascherer/mmix/local/mmix-arith.ch +Source102: https://raw.githubusercontent.com/ascherer/mmix/local/mmix-config.ch +Source103: https://raw.githubusercontent.com/ascherer/mmix/local/mmix-io.ch +Source104: https://raw.githubusercontent.com/ascherer/mmix/local/mmix-pipe.ch +Source105: https://raw.githubusercontent.com/ascherer/mmix/local/mmix-sim.ch +Source106: https://raw.githubusercontent.com/ascherer/mmix/local/mmixal.ch +# CWEB "patches" to add features +Source200: http://mmix.cs.hm.edu/tools/mmoimg/mmoimg.ch + +BuildRequires: tex-amsfonts +BuildRequires: tex-cm +BuildRequires: tex-cweb +BuildRequires: tex-epsf +BuildRequires: tex-etex +BuildRequires: tex-knuth-lib +BuildRequires: tex-pdftex +BuildRequires: tex-tex +BuildRequires: tex-texconfig + +%description +MMIX is a computer intended to illustrate machine-level aspects of +programming. In the books The Art of Computer Programming, it replaces +MIX, the 1960s-style machine that formerly played such a role. MMIX was +designed so that its machine language would be simple, elegant, and easy +to learn. At the same time it includes all of the complexities needed to +achieve high performance in practice, so that MMIX could in principle be +built and even perhaps be competitive with some of the fastest +general-purpose computers in the marketplace. + +%prep +%setup -q -c -a 0 +cp %{SOURCE100} %{SOURCE101} %{SOURCE102} %{SOURCE103} %{SOURCE104} \ + %{SOURCE105} %{SOURCE106} %{SOURCE200} . + + +%build +ctangle mmotype.w mmoimg.ch mmoimg.c +cweave mmotype.w mmoimg.ch mmoimg.tex + +make all mmoimg CFLAGS="$RPM_OPT_FLAGS" + +for f in mm*.w; do + make ${f%.w}.pdf PDFTEX=pdftex +done +pdftex mmoimg.tex + + +%check +./mmixal -x -b 250 -l copy.mml copy.mms +./mmix copy copy.mms > copy.out +diff -u copy.mms copy.out + +./mmixal -x -b 250 -l hello.mml hello.mms +./mmix -Dhello.mmb hello.mmo +echo -e '10000\nq' | ./mmmix plain.mmconfig hello.mmb + +./mmixal -x -b 250 -l silly.mml silly.mms +./mmix -Dsilly.mmb silly.mmo +echo -e '10000\nq' | ./mmmix plain.mmconfig silly.mmb + + +%install +mkdir -p $RPM_BUILD_ROOT%{_bindir} +install mmix mmixal mmmix mmotype mmoimg $RPM_BUILD_ROOT%{_bindir}/ + + +%files +%doc README *.pdf +%{_bindir}/mmix +%{_bindir}/mmixal +%{_bindir}/mmmix +%{_bindir}/mmotype +%{_bindir}/mmoimg + + +%changelog +* Tue Aug 18 2015 Yaakov Selkowitz <yselkowi@redhat.com> +- Initial release @@ -0,0 +1,9 @@ +7d356a887ae204e21720d94ffa28e7a4 mmix-20131017.tgz +7076d657a50299807eb34f531d4db752 abstime.ch +e9fc1af244b3fcba8d0587365c222a69 mmixal.ch +21a4023147574165152ca5c1c098e00a mmix-arith.ch +a9b6b0d84f36b7572e4fbd0dc5e52065 mmix-config.ch +4697b076cb64ef208d2a26b5a4364979 mmix-io.ch +397a307492a3013687779ff2267ae16e mmix-pipe.ch +0a46517ae695c8b402b8acd4a537dd48 mmix-sim.ch +233bec216df043c6b03d17d73834c713 mmoimg.ch |