move some rules into 1337.mk

A number of rules have been moved from entry `Makefile`s into the
`1337.mk` include file to make it easier for these common rules to be
updated or modified globally (by modifying the `1337.mk` include file).

The entry level `Makefile`s are now similar in form to the
/Makefile.example](https://github.com/ioccc-src/mkiocccentry/blob/master/Makefile.example)
file from the other repo.

The following make rules were moved into the `1337.mk` include file:

- `make indent.c`
- `make install`
- `make diff_orig_prog`
- `make diff_prog_orig`
- `make diff_alt_prog`
- `make diff_prog_alt`

This simplifies the entry level `Makefile`s so that they mostly reflect
the specifics of the particular entry.

Mentioned in FAQ 4.2, that the make diff rules are in the `1337.mk` include file.

Fixed invalid TAB character in `faq.md`.

Removed `make clean` directives that removed `indent.c`.  This file is now
removed via `make indent_clean`, a clean rule that also removes `indent.c`.

Removed `make clobber` directives that removed sandwich,  This file is now
removed via `make indent_clobber`, a clean rule that also removes `sandwich`.

Added `make indent_clean` and `make indent_clobber` rules into the top level
`Makefile` and the year level `YYYY/Makefile`.

Performed `make quick_www` to accomplish the above and to test under macOS.
This commit is contained in:
Landon Curt Noll committed 2024-08-21 23:42:28 -07:00
1 parent 06ae40f99c
commit 96e0f2b966
353 files changed
+2088 -25506

No files matched your search

+57 -24
View File
@@ -229,30 +229,6 @@ clobber:
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
install:
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${ENTRIES}; 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 ${ENTRIES}; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && ${MAKE} $@)"; \
(cd $$i && ${MAKE} $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
genpath:
@echo '=-=-= IOCCC begin make $@ =-=-='
@${RM} -f .tmp.genpath
@@ -292,6 +268,63 @@ new_entry:
${FMT} | ${SED} -e '2,$$s/^/\t/' -e 's/$$/ \\/' -e '$$s/ \\//'
########################
# extended utility rules
########################
.PHONY: indent_clean indent_clobber
# you may be able to misunderstand the source by reading indent.c
#
indent.c:
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${ENTRIES}; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && ${MAKE} $@)"; \
(cd $$i && ${MAKE} $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
indent_clean: clean
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${ENTRIES}; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && ${MAKE} $@)"; \
(cd $$i && ${MAKE} $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
indent_clobber: indent_clean clobber
@echo '=-=-= ${YEAR} begin make $@ =-=-='
@echo
@for i in ${ENTRIES}; 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 ${ENTRIES}; do \
echo "=-= start ${YEAR}/$$i =-="; \
echo "(cd $$i && ${MAKE} $@)"; \
(cd $$i && ${MAKE} $@); \
echo "=-= end ${YEAR}/$$i =-="; \
echo; \
done
@echo '=-=-= ${YEAR} complete make $@ =-=-='
##################
# 1337 hacker rulz
##################
+1 -77
View File
@@ -127,10 +127,7 @@ ALT_TARGET= ${PROG}.alt
all: data ${TARGET}
@${TRUE}
.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
.PHONY: all alt data everything clean clobber
${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
@@ -166,90 +163,17 @@ everything: all alt ag ag.alt
@${TRUE}
#####################
# make a difference #
#####################
#
# diff orig source and source
#
diff_orig_prog: ${PROG}.orig.c ${PROG}.c
@-${DIFF} -u ${PROG}.orig.c ${PROG}.c
# diff source and orig source
#
diff_prog_orig: ${PROG}.c ${PROG}.orig.c
@-${DIFF} -u ${PROG}.c ${PROG}.orig.c
# diff alt source and source
#
diff_alt_prog: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.c; \
fi
# diff source and alt source
#
diff_prog_alt: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.c ${PROG}.alt.c; \
fi
# diff orig and alt
#
diff_orig_alt: ${PROG}.orig.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.orig.c ${PROG}.alt.c; \
fi
# diff alt and orig
diff_alt_orig:
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.orig.c; \
fi
###############
# utility rules
###############
#
clean:
${RM} -f ${OBJ} ${ALT_OBJ}
@-if [ -f indent.c ]; then \
echo ${RM} -f indent.c; \
${RM} -f indent.c; \
fi
clobber: clean
${RM} -f ${TARGET} ${ALT_TARGET}
${RM} -rf *.dSYM
${RM} -f ag ag.txt ant.alt ag.alt deobfuscated/ant deobfuscated/ant-c89 deobfuscated/ag deobfuscated/ag-c89
@-if [ -e sandwich ]; then \
${RM} -f sandwich; \
echo 'ate sandwich'; \
fi
install:
@echo "Dr. Spock says that is not logical!"
@${TRUE}
# you may be able to misunderstand the source by reading indent.c
#
indent.c: ${PROG}.c
@if which "${GINDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${GINDENT} < $< > $@"; \
${GINDENT} < $< > $@; \
elif which "${INDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${INDENT} < $< > $@"; \
${INDENT} < $< > $@; \
else \
echo "no indent tool found, ident $< yourself, sorry"; \
echo "exit 17"; \
exit 17; \
fi
######################################
+1 -77
View File
@@ -127,10 +127,7 @@ ALT_TARGET= ${PROG}.alt
all: data ${TARGET}
@${TRUE}
.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
.PHONY: all alt data everything clean clobber
${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
@@ -162,90 +159,17 @@ everything: all alt
@${TRUE}
#####################
# make a difference #
#####################
#
# diff orig source and source
#
diff_orig_prog: ${PROG}.orig.c ${PROG}.c
@-${DIFF} -u ${PROG}.orig.c ${PROG}.c
# diff source and orig source
#
diff_prog_orig: ${PROG}.c ${PROG}.orig.c
@-${DIFF} -u ${PROG}.c ${PROG}.orig.c
# diff alt source and source
#
diff_alt_prog: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.c; \
fi
# diff source and alt source
#
diff_prog_alt: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.c ${PROG}.alt.c; \
fi
# diff orig and alt
#
diff_orig_alt: ${PROG}.orig.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.orig.c ${PROG}.alt.c; \
fi
# diff alt and orig
diff_alt_orig:
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.orig.c; \
fi
###############
# utility rules
###############
#
clean:
${RM} -f ${OBJ} ${ALT_OBJ}
@-if [ -f indent.c ]; then \
echo ${RM} -f indent.c; \
${RM} -f indent.c; \
fi
clobber: clean
${RM} -f ${TARGET} ${ALT_TARGET}
${RM} -rf *.dSYM
${RM} -f chris
@-if [ -e sandwich ]; then \
${RM} -f sandwich; \
echo 'ate sandwich'; \
fi
install:
@echo "Dr. Spock says that is not logical!"
@${TRUE}
# you may be able to misunderstand the source by reading indent.c
#
indent.c: ${PROG}.c
@if which "${GINDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${GINDENT} < $< > $@"; \
${GINDENT} < $< > $@; \
elif which "${INDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${INDENT} < $< > $@"; \
${INDENT} < $< > $@; \
else \
echo "no indent tool found, ident $< yourself, sorry"; \
echo "exit 17"; \
exit 17; \
fi
######################################
+1 -77
View File
@@ -126,10 +126,7 @@ ALT_TARGET=
all: data ${TARGET}
@${TRUE}
.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
.PHONY: all alt data everything clean clobber
${PROG}: ${PROG}.c
-@if [ ! -f life.d ] ; then \
@@ -159,90 +156,17 @@ everything: all alt
@${TRUE}
#####################
# make a difference #
#####################
#
# diff orig source and source
#
diff_orig_prog: ${PROG}.orig.c ${PROG}.c
@-${DIFF} -u ${PROG}.orig.c ${PROG}.c
# diff source and orig source
#
diff_prog_orig: ${PROG}.c ${PROG}.orig.c
@-${DIFF} -u ${PROG}.c ${PROG}.orig.c
# diff alt source and source
#
diff_alt_prog: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.c; \
fi
# diff source and alt source
#
diff_prog_alt: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.c ${PROG}.alt.c; \
fi
# diff orig and alt
#
diff_orig_alt: ${PROG}.orig.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.orig.c ${PROG}.alt.c; \
fi
# diff alt and orig
diff_alt_orig:
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.orig.c; \
fi
###############
# utility rules
###############
#
clean:
${RM} -f ${OBJ} ${ALT_OBJ}
@-if [ -f indent.c ]; then \
echo ${RM} -f indent.c; \
${RM} -f indent.c; \
fi
clobber: clean
${RM} -f ${TARGET} ${ALT_TARGET}
${RM} -rf *.dSYM
${RM} -f life.d data.name
@-if [ -e sandwich ]; then \
${RM} -f sandwich; \
echo 'ate sandwich'; \
fi
install:
@echo "Dr. Spock says that is not logical!"
@${TRUE}
# you may be able to misunderstand the source by reading indent.c
#
indent.c: ${PROG}.c
@if which "${GINDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${GINDENT} < $< > $@"; \
${GINDENT} < $< > $@; \
elif which "${INDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${INDENT} < $< > $@"; \
${INDENT} < $< > $@; \
else \
echo "no indent tool found, ident $< yourself, sorry"; \
echo "exit 17"; \
exit 17; \
fi
######################################
+1 -77
View File
@@ -126,10 +126,7 @@ ALT_TARGET=
all: data ${TARGET}
@${TRUE}
.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
.PHONY: all alt data everything clean clobber
${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
@@ -150,89 +147,16 @@ everything: all alt
@${TRUE}
#####################
# make a difference #
#####################
#
# diff orig source and source
#
diff_orig_prog: ${PROG}.orig.c ${PROG}.c
@-${DIFF} -u ${PROG}.orig.c ${PROG}.c
# diff source and orig source
#
diff_prog_orig: ${PROG}.c ${PROG}.orig.c
@-${DIFF} -u ${PROG}.c ${PROG}.orig.c
# diff alt source and source
#
diff_alt_prog: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.c; \
fi
# diff source and alt source
#
diff_prog_alt: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.c ${PROG}.alt.c; \
fi
# diff orig and alt
#
diff_orig_alt: ${PROG}.orig.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.orig.c ${PROG}.alt.c; \
fi
# diff alt and orig
diff_alt_orig:
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.orig.c; \
fi
###############
# utility rules
###############
#
clean:
${RM} -f ${OBJ} ${ALT_OBJ}
@-if [ -f indent.c ]; then \
echo ${RM} -f indent.c; \
${RM} -f indent.c; \
fi
clobber: clean
${RM} -f ${TARGET} ${ALT_TARGET}
${RM} -rf *.dSYM
@-if [ -e sandwich ]; then \
${RM} -f sandwich; \
echo 'ate sandwich'; \
fi
install:
@echo "Dr. Spock says that is not logical!"
@${TRUE}
# you may be able to misunderstand the source by reading indent.c
#
indent.c: ${PROG}.c
@if which "${GINDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${GINDENT} < $< > $@"; \
${GINDENT} < $< > $@; \
elif which "${INDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${INDENT} < $< > $@"; \
${INDENT} < $< > $@; \
else \
echo "no indent tool found, ident $< yourself, sorry"; \
echo "exit 17"; \
exit 17; \
fi
######################################
+1 -77
View File
@@ -135,10 +135,7 @@ ALT_TARGET=
all: data ${TARGET}
@${TRUE}
.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
.PHONY: all alt data everything clean clobber
${PROG}: ${PROG}.tmp.c
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
@@ -162,90 +159,17 @@ everything: all alt
@${TRUE}
#####################
# make a difference #
#####################
#
# diff orig source and source
#
diff_orig_prog: ${PROG}.orig.c ${PROG}.c
@-${DIFF} -u ${PROG}.orig.c ${PROG}.c
# diff source and orig source
#
diff_prog_orig: ${PROG}.c ${PROG}.orig.c
@-${DIFF} -u ${PROG}.c ${PROG}.orig.c
# diff alt source and source
#
diff_alt_prog: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.c; \
fi
# diff source and alt source
#
diff_prog_alt: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.c ${PROG}.alt.c; \
fi
# diff orig and alt
#
diff_orig_alt: ${PROG}.orig.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.orig.c ${PROG}.alt.c; \
fi
# diff alt and orig
diff_alt_orig:
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.orig.c; \
fi
###############
# utility rules
###############
#
clean:
${RM} -f ${OBJ} ${ALT_OBJ}
@-if [ -f indent.c ]; then \
echo ${RM} -f indent.c; \
${RM} -f indent.c; \
fi
clobber: clean
${RM} -f ${TARGET} ${ALT_TARGET}
${RM} -rf *.dSYM
${RM} -f jonth.tmp.c
@-if [ -e sandwich ]; then \
${RM} -f sandwich; \
echo 'ate sandwich'; \
fi
install:
@echo "Dr. Spock says that is not logical!"
@${TRUE}
# you may be able to misunderstand the source by reading indent.c
#
indent.c: ${PROG}.c
@if which "${GINDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${GINDENT} < $< > $@"; \
${GINDENT} < $< > $@; \
elif which "${INDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${INDENT} < $< > $@"; \
${INDENT} < $< > $@; \
else \
echo "no indent tool found, ident $< yourself, sorry"; \
echo "exit 17"; \
exit 17; \
fi
######################################
+1 -77
View File
@@ -125,10 +125,7 @@ ALT_TARGET= mind
all: data ${TARGET} ${ALT_TARGET}
@${TRUE}
.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
.PHONY: all alt data everything clean clobber
${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
@@ -153,90 +150,17 @@ everything: all alt
@${TRUE}
#####################
# make a difference #
#####################
#
# diff orig source and source
#
diff_orig_prog: ${PROG}.orig.c ${PROG}.c
@-${DIFF} -u ${PROG}.orig.c ${PROG}.c
# diff source and orig source
#
diff_prog_orig: ${PROG}.c ${PROG}.orig.c
@-${DIFF} -u ${PROG}.c ${PROG}.orig.c
# diff alt source and source
#
diff_alt_prog: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.c; \
fi
# diff source and alt source
#
diff_prog_alt: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.c ${PROG}.alt.c; \
fi
# diff orig and alt
#
diff_orig_alt: ${PROG}.orig.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.orig.c ${PROG}.alt.c; \
fi
# diff alt and orig
diff_alt_orig:
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.orig.c; \
fi
###############
# utility rules
###############
#
clean:
${RM} -f ${OBJ} ${ALT_OBJ}
@-if [ -f indent.c ]; then \
echo ${RM} -f indent.c; \
${RM} -f indent.c; \
fi
clobber: clean
${RM} -f ${TARGET} ${ALT_TARGET}
${RM} -rf *.dSYM
${RM} -f mind
@-if [ -e sandwich ]; then \
${RM} -f sandwich; \
echo 'ate sandwich'; \
fi
install:
@echo "Dr. Spock says that is not logical!"
@${TRUE}
# you may be able to misunderstand the source by reading indent.c
#
indent.c: ${PROG}.c
@if which "${GINDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${GINDENT} < $< > $@"; \
${GINDENT} < $< > $@; \
elif which "${INDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${INDENT} < $< > $@"; \
${INDENT} < $< > $@; \
else \
echo "no indent tool found, ident $< yourself, sorry"; \
echo "exit 17"; \
exit 17; \
fi
######################################
+1 -77
View File
@@ -123,10 +123,7 @@ ALT_TARGET= ${PROG}.alt
all: data ${TARGET}
@${TRUE}
.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
.PHONY: all alt data everything clean clobber
${PROG}: ${PROG}.c
@echo "NOTE: This will not compile when using modern compilers because"
@@ -163,90 +160,17 @@ everything: all alt
@${TRUE}
#####################
# make a difference #
#####################
#
# diff orig source and source
#
diff_orig_prog: ${PROG}.orig.c ${PROG}.c
@-${DIFF} -u ${PROG}.orig.c ${PROG}.c
# diff source and orig source
#
diff_prog_orig: ${PROG}.c ${PROG}.orig.c
@-${DIFF} -u ${PROG}.c ${PROG}.orig.c
# diff alt source and source
#
diff_alt_prog: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.c; \
fi
# diff source and alt source
#
diff_prog_alt: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.c ${PROG}.alt.c; \
fi
# diff orig and alt
#
diff_orig_alt: ${PROG}.orig.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.orig.c ${PROG}.alt.c; \
fi
# diff alt and orig
diff_alt_orig:
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.orig.c; \
fi
###############
# utility rules
###############
#
clean:
${RM} -f ${OBJ} ${ALT_OBJ}
@-if [ -f indent.c ]; then \
echo ${RM} -f indent.c; \
${RM} -f indent.c; \
fi
clobber: clean
${RM} -f ${TARGET} ${ALT_TARGET}
${RM} -rf *.dSYM
${RM} -f \"\;main\(\)\{puts\(\"Hello\ World!\"\)\;\}char\*C=\".c
@-if [ -e sandwich ]; then \
${RM} -f sandwich; \
echo 'ate sandwich'; \
fi
install:
@echo "Dr. Spock says that is not logical!"
@${TRUE}
# you may be able to misunderstand the source by reading indent.c
#
indent.c: ${PROG}.c
@if which "${GINDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${GINDENT} < $< > $@"; \
${GINDENT} < $< > $@; \
elif which "${INDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${INDENT} < $< > $@"; \
${INDENT} < $< > $@; \
else \
echo "no indent tool found, ident $< yourself, sorry"; \
echo "exit 17"; \
exit 17; \
fi
######################################
+1 -77
View File
@@ -127,10 +127,7 @@ ALT_TARGET= ${PROG}.alt
all: data ${TARGET}
@${TRUE}
.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
.PHONY: all alt data everything clean clobber
${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
@@ -158,89 +155,16 @@ everything: all alt
@${TRUE}
#####################
# make a difference #
#####################
#
# diff orig source and source
#
diff_orig_prog: ${PROG}.orig.c ${PROG}.c
@-${DIFF} -u ${PROG}.orig.c ${PROG}.c
# diff source and orig source
#
diff_prog_orig: ${PROG}.c ${PROG}.orig.c
@-${DIFF} -u ${PROG}.c ${PROG}.orig.c
# diff alt source and source
#
diff_alt_prog: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.c; \
fi
# diff source and alt source
#
diff_prog_alt: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.c ${PROG}.alt.c; \
fi
# diff orig and alt
#
diff_orig_alt: ${PROG}.orig.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.orig.c ${PROG}.alt.c; \
fi
# diff alt and orig
diff_alt_orig:
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.orig.c; \
fi
###############
# utility rules
###############
#
clean:
${RM} -f ${OBJ} ${ALT_OBJ}
@-if [ -f indent.c ]; then \
echo ${RM} -f indent.c; \
${RM} -f indent.c; \
fi
clobber: clean
${RM} -f ${TARGET} ${ALT_TARGET}
${RM} -rf *.dSYM
@-if [ -e sandwich ]; then \
${RM} -f sandwich; \
echo 'ate sandwich'; \
fi
install:
@echo "Dr. Spock says that is not logical!"
@${TRUE}
# you may be able to misunderstand the source by reading indent.c
#
indent.c: ${PROG}.c
@if which "${GINDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${GINDENT} < $< > $@"; \
${GINDENT} < $< > $@; \
elif which "${INDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${INDENT} < $< > $@"; \
${INDENT} < $< > $@; \
else \
echo "no indent tool found, ident $< yourself, sorry"; \
echo "exit 17"; \
exit 17; \
fi
######################################
+1 -77
View File
@@ -128,10 +128,7 @@ ALT_TARGET= ${PROG}.alt ${PROG}.alt2
all: data ${TARGET}
@${TRUE}
.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
.PHONY: all alt data everything clean clobber
${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
@@ -176,90 +173,17 @@ everything: all alt
@${TRUE}
#####################
# make a difference #
#####################
#
# diff orig source and source
#
diff_orig_prog: ${PROG}.orig.c ${PROG}.c
@-${DIFF} -u ${PROG}.orig.c ${PROG}.c
# diff source and orig source
#
diff_prog_orig: ${PROG}.c ${PROG}.orig.c
@-${DIFF} -u ${PROG}.c ${PROG}.orig.c
# diff alt source and source
#
diff_alt_prog: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.c; \
fi
# diff source and alt source
#
diff_prog_alt: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.c ${PROG}.alt.c; \
fi
# diff orig and alt
#
diff_orig_alt: ${PROG}.orig.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.orig.c ${PROG}.alt.c; \
fi
# diff alt and orig
diff_alt_orig:
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.orig.c; \
fi
###############
# utility rules
###############
#
clean:
${RM} -f ${OBJ} ${ALT_OBJ}
@-if [ -f indent.c ]; then \
echo ${RM} -f indent.c; \
${RM} -f indent.c; \
fi
clobber: clean
${RM} -f ${TARGET} ${ALT_TARGET}
${RM} -rf *.dSYM
${RM} -f jkb
@-if [ -e sandwich ]; then \
${RM} -f sandwich; \
echo 'ate sandwich'; \
fi
install:
@echo "Dr. Spock says that is not logical!"
@${TRUE}
# you may be able to misunderstand the source by reading indent.c
#
indent.c: ${PROG}.c
@if which "${GINDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${GINDENT} < $< > $@"; \
${GINDENT} < $< > $@; \
elif which "${INDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${INDENT} < $< > $@"; \
${INDENT} < $< > $@; \
else \
echo "no indent tool found, ident $< yourself, sorry"; \
echo "exit 17"; \
exit 17; \
fi
######################################
+1 -77
View File
@@ -127,10 +127,7 @@ ALT_TARGET=
all: data ${TARGET}
@${TRUE}
.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
.PHONY: all alt data everything clean clobber
${PROG}: ${PROG}.c
@echo "NOTE: this entry will segfault if the file cannot be opened."
@@ -152,89 +149,16 @@ everything: all alt
@${TRUE}
#####################
# make a difference #
#####################
#
# diff orig source and source
#
diff_orig_prog: ${PROG}.orig.c ${PROG}.c
@-${DIFF} -u ${PROG}.orig.c ${PROG}.c
# diff source and orig source
#
diff_prog_orig: ${PROG}.c ${PROG}.orig.c
@-${DIFF} -u ${PROG}.c ${PROG}.orig.c
# diff alt source and source
#
diff_alt_prog: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.c; \
fi
# diff source and alt source
#
diff_prog_alt: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.c ${PROG}.alt.c; \
fi
# diff orig and alt
#
diff_orig_alt: ${PROG}.orig.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.orig.c ${PROG}.alt.c; \
fi
# diff alt and orig
diff_alt_orig:
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.orig.c; \
fi
###############
# utility rules
###############
#
clean:
${RM} -f ${OBJ} ${ALT_OBJ}
@-if [ -f indent.c ]; then \
echo ${RM} -f indent.c; \
${RM} -f indent.c; \
fi
clobber: clean
${RM} -f ${TARGET} ${ALT_TARGET}
${RM} -rf *.dSYM
@-if [ -e sandwich ]; then \
${RM} -f sandwich; \
echo 'ate sandwich'; \
fi
install:
@echo "Dr. Spock says that is not logical!"
@${TRUE}
# you may be able to misunderstand the source by reading indent.c
#
indent.c: ${PROG}.c
@if which "${GINDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${GINDENT} < $< > $@"; \
${GINDENT} < $< > $@; \
elif which "${INDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${INDENT} < $< > $@"; \
${INDENT} < $< > $@; \
else \
echo "no indent tool found, ident $< yourself, sorry"; \
echo "exit 17"; \
exit 17; \
fi
######################################
+1 -77
View File
@@ -126,10 +126,7 @@ ALT_TARGET= ${PROG}.alt
all: data ${TARGET}
@${TRUE}
.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
.PHONY: all alt data everything clean clobber
${PROG}: ${PROG}.c
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
@@ -150,89 +147,16 @@ everything: all alt
@${TRUE}
#####################
# make a difference #
#####################
#
# diff orig source and source
#
diff_orig_prog: ${PROG}.orig.c ${PROG}.c
@-${DIFF} -u ${PROG}.orig.c ${PROG}.c
# diff source and orig source
#
diff_prog_orig: ${PROG}.c ${PROG}.orig.c
@-${DIFF} -u ${PROG}.c ${PROG}.orig.c
# diff alt source and source
#
diff_alt_prog: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.c; \
fi
# diff source and alt source
#
diff_prog_alt: ${PROG}.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.c ${PROG}.alt.c; \
fi
# diff orig and alt
#
diff_orig_alt: ${PROG}.orig.c
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.orig.c ${PROG}.alt.c; \
fi
# diff alt and orig
diff_alt_orig:
@-if [[ -e ${PROG}.alt.c ]]; then \
${DIFF} -u ${PROG}.alt.c ${PROG}.orig.c; \
fi
###############
# utility rules
###############
#
clean:
${RM} -f ${OBJ} ${ALT_OBJ}
@-if [ -f indent.c ]; then \
echo ${RM} -f indent.c; \
${RM} -f indent.c; \
fi
clobber: clean
${RM} -f ${TARGET} ${ALT_TARGET}
${RM} -rf *.dSYM
@-if [ -e sandwich ]; then \
${RM} -f sandwich; \
echo 'ate sandwich'; \
fi
install:
@echo "Dr. Spock says that is not logical!"
@${TRUE}
# you may be able to misunderstand the source by reading indent.c
#
indent.c: ${PROG}.c
@if which "${GINDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${GINDENT} < $< > $@"; \
${GINDENT} < $< > $@; \
elif which "${INDENT}" >/dev/null 2>&1; then \
echo ${RM} -f $@; \
${RM} -f $@; \
echo "${INDENT} < $< > $@"; \
${INDENT} < $< > $@; \
else \
echo "no indent tool found, ident $< yourself, sorry"; \
echo "exit 17"; \
exit 17; \
fi
######################################