Files
ioccc/1986/Makefile
T
Cody Boone Ferguson ef456bfb1e Mass typo fixes
This is a HUGE commit:

    417 files changed, 874 insertions(+), 874 deletions(-)

As the IOCCC website now is https enabled I have updated the
'http://www.ioccc' to 'https://www.ioccc'.

There was also a typo in Makefiles where it said 'for VERY WELCOME' when
it should be 'are VERY WELCOME'.

Finally slashdot.org is also https enabled so references to
'http://slashdot' were changed to 'https://slashdot'.

This was done by my sgit tool (see https://github.com/xexyl/sgit)
like:

    sgit -e 's,http://www.ioccc,https://www.ioccc,g' -e 's/for VERY WELCOME/are VERY WELCOME/g' -e  .

but because I didn't have a list of files that should be modified I had
to be careful which files to commit as I had files that were changed but
not ready to be committed. Since I did it in steps, finding typos as I
went along, I actually ran sgit three times but to simplify the above
(and to show that it's possible to do more than one sed command) I made
it all as one. Since I did not have a list of files ahead of time I had
to determine what files to commit, first going through them like:

    for j in $(for i in $(git status|grep modified|cut -d: -f2); do \
	git grep 'https://www.ioccc' "$i"; done|cut -d: -f1|sort|uniq); \
	do git diff "$j"; done|less -r

(I had to pipe through less because of a strange problem with the git
diff which appears to be because of a terminal problem maybe due to the
command above but it was all I could come up with in a very tired head.)

The above and

    git status | grep modified:

showed that some C files had been modified which obviously should not be
done so I had to do:

    git co '*c'

to undo those changes.

Finally to commit the correct files I did:

    for i in $(git status|grep modified|cut -d: -f2); do \
	git grep -E 'https://www.ioccc|https://slashdot|are VERY WELCOME' "$i"; \
	done |cut -d: -f1|sort|uniq|xargs git commit -v

or so (with any formatting issues or typos here due to typos in the log
due to the terminal (in)sanity issue described).
2023-10-07 04:35:47 -07:00

302 lines
7.3 KiB
Makefile

#!/usr/bin/env make
#
# 1986 Makefile
################################################################################
#
# IOCCC winning entry code may not work on your system. What was liked/allowed
# and worked in the past may no longer be the liked/allowed or compile/run today.
#
# Bug fixes, corrections and typo fixes are VERY WELCOME. If you see a problem,
# first check this URL for a list of known bugs and (mis)features of IOCCC winners:
#
# https://www.ioccc.org/bugs.md
#
# GitHub pull requests are welcome! Please see the above URL for details.
#
################################################################################
#
# This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved.
# You are free to share and adapt this file under the terms of this license:
#
# Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
#
# For more information, see: https://creativecommons.org/licenses/by-sa/4.0/
#############################
# shell used by this Makefile
#############################
#
SHELL= bash
#######################
# common tool locations
#######################
#
include ../var.mk
###############
# IOCCC winners
###############
#
WINNERS= applin august bright hague holloway marshall pawka stein wall
YEAR= 1986
###################
# build all entries
###################
#
all:
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${WINNERS} ; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
.PHONY: all alt data everything clean clobber install \
love haste waste maker easter_egg sandwich \
supernova deep_magic magic charon pluto
# alternative executable
#
alt:
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${WINNERS} ; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
# data files
#
data:
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${WINNERS} ; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
# both all and alt
#
everything:
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${WINNERS} ; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
###############
# utility rules
###############
#
clean:
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${WINNERS} ; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
clobber:
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${WINNERS} ; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
install:
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${WINNERS} ; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
indent.c:
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${WINNERS} ; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
##################
# 133t hacker rulz
##################
#
love:
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${WINNERS} ; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
haste:
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${WINNERS} ; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
waste:
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${WINNERS} ; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
maker:
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${WINNERS} ; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
easter_egg:
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${WINNERS} ; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
sandwich:
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${WINNERS} ; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
# The IOCCC resident astronomer states
#
supernova:
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${WINNERS} ; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
deep_magic:
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${WINNERS} ; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
magic:
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${WINNERS} ; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
charon:
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${WINNERS} ; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
pluto:
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${WINNERS} ; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && $(MAKE) $@)"; \
(cd $$i && $(MAKE) $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='