Files
Cody Boone Ferguson 211a27769e Add alt code, scripts + format fixes in 2000/tomx
The alt code is based on the author's remarks with a fix so that it
actually works (I presume it once did work but it no longer did). This
compiles mkentry.c and running tomx.alt ends up running mkentry!

The try.sh script shows the different ways tomx.c can be used: as a
script, as a compiled file and as a Makefile. 'tomx.c' as a shell script
compiles itself and as a Makefile it does the same thing!

The try.alt.sh does more or less the same thing as try.sh but it works
for the alt code which works with mkentry.c (see above).

Format/typo fix README.md.

Although the try.sh and try.alt.sh script both chmod +x the source code
the code here in the repo is now +x as well because it can be used as a
script and a Makefile as well as compiled as C.

I believe this completes the review of 2000/tomx.
2023-11-13 14:36:24 -08:00

23 lines
225 B
C
Executable File

#include <stdio.h>
#define true
true /*:all
CC=cc
PROG=tomx
false :
make -f $0 $1
exit 0
all: $(PROG)
%:%.c
$(CC) $< -o $@
clean:
rm $(PROG)
.PHONY: /* true clean */
int main() {return!printf("Hello, world\n");}