Fixes to 1992/ant

The Makefile has had a new rule added and another fixed as 'am' does not
support certain features that the Makefile uses.

Added #include <time.h> as the author stated that for some systems it
might be necessary (like DOS with Turbo C assuming anyone here uses
that).

Typo fixes including references to files that do not exist (am.c ->
ant.c and so on).

Typo/format check README.md and ant.README.
This commit is contained in:
Cody Boone Ferguson committed 2023-11-08 09:47:20 -08:00
1 parent 0e452a3813
commit de7ba83559
6 files changed
+52 -26

No files matched your search

+18 -10
View File
@@ -113,7 +113,7 @@ PROG= ${ENTRY}
#
OBJ= ${PROG}.o
DATA=
TARGET= ${PROG} am
TARGET= ${PROG}
#
ALT_OBJ=
ALT_TARGET=
@@ -129,15 +129,18 @@ all: data ${TARGET}
.PHONY: all alt data everything diff_orig_prog diff_prog_orig \
diff_alt_prog diff_prog_alt diff_orig_alt diff_alt_orig \
clean clobber install love haste waste maker easter_egg \
sandwich supernova deep_magic magic charon pluto
sandwich supernova deep_magic magic charon pluto \
supernova deep_magic magic charon pluto
${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
am: ${PROG}
${RM} -f $@
${LN} $< $@
am: ant
rm -f am
ln ant am
cp am am.safe
cp am.safe am
rm -f am.safe
# alternative executable
#
@@ -215,11 +218,16 @@ clobber: clean
echo 'ate sandwich'; \
fi
am_clobber: clean am
${RM} -f am.safe
${CP} am am.safe
${CP} am.safe am
${RM} -f am.safe
am_clean:
rm -f ant.o am.o
@-if [ -f indent.c ]; then \
echo ${RM} -f indent.c; \
${RM} -f indent.c; \
fi
am_clobber: am_clean
rm -f am.safe
install:
@echo "Dr. Spock says that is not logical!"
+8 -7
View File
@@ -8,7 +8,7 @@ make all
## To use:
```sh
./am Makefile
./ant Makefile
```
where `Makefile` is a Makefile to use.
@@ -16,16 +16,17 @@ where `Makefile` is a Makefile to use.
### Try:
First build the tool itself with our Makefile:
```sh
./ant ant.test.mk
./ant Makefile am
```
We also suggest that you try:
Now use `am` to do some things:
```sh
make am
./am Makefile am_clobber # clobber everything except am
./am Makefile all
./am ant.test.mk # run the test Makefile with am
```
@@ -34,8 +35,8 @@ make am
Like much of POSIX, obfuscation has its place. Your task is to
figure out where.
This entry comes complete with a Posix-like command description.
Interested POSIX balloters should lobby the IEEE for an obfuscated\
This entry comes complete with a POSIX-like command description.
Interested POSIX balloters should lobby the IEEE for an obfuscated
P1003 subcommittee.
+8 -8
View File
@@ -35,7 +35,7 @@ None.
OPERANDS
makefile This required argument, is a pathname of a description
makefile This required argument is a pathname of a description
file, which is also referred to as the "makfile". A
pathname of "-", shall *NOT* denote the standard input.
@@ -123,7 +123,7 @@ MAKEFILE EXECUTION
Command lines shall be processed one at a time by writing the command
line to standard output, unless prefixed with an at-sign (@), and
executing the command(s) in the line. Commands shall be executed by
passing the command line to the command interpreter via the system()
passing the command line to the command interpreter via the system(3)
function.
The environment for the command being executed shall contain all of the
@@ -168,7 +168,7 @@ rules for the same target are ignored. There is *no* support for
adding prerequisites to a target's prerequisite list once a target
rule is defined.
There are no special targets or inference rule support.
There are no special targets and no inference rule support.
MACROS
@@ -191,7 +191,7 @@ the definition of environment variables, excluding parentheses, ( and ),
which are used for delimiters.
Macros can appear anywhere in the makefile, except within other macro
references (ie. no nesting). Macros in target and command lines shall
references (i.e. no nesting). Macros in target and command lines shall
be evaluated when the line is read. Macros in macro definition lines
shall be evaluated *IMMEDIATELY*. A macro that has not been defined
shall evaluate to a null string without causing any error condition.
@@ -233,7 +233,7 @@ tested on
For all machines, the compile command line should be
cc -O -o am am.c
cc -O -o ant ant.c
The value RULES represents the number of slots available to record
target rules, dependencies, and commands. The default value chosen
@@ -261,9 +261,9 @@ REFERENCES
FILES
howe.c Obfuscated source
howe.README Manual for AM
howe.test.mk Test makefile
ant.c Obfuscated source
ant.README Manual for AM
ant.test.mk Test makefile
BUGS
+1
View File
@@ -8,6 +8,7 @@
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <time.h>
#ifndef RULES
#define RULES 500
+1 -1
View File
@@ -180,7 +180,7 @@ error.1:
# Target where dependency does not exist.
error.2: unknown
# Receipe command causes error.
# Recipe command causes error.
error.3: t1 fail t2
fail:
ls -l unknown