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:
1 parent
06ae40f99c
commit
96e0f2b966
353 files changed
+2088
-25506
No files matched your search
+57
-24
@@ -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
@@ -131,10 +131,7 @@ CFLAGS+= -trigraphs
|
||||
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}
|
||||
@@ -168,89 +165,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
@@ -125,10 +125,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}
|
||||
@@ -163,89 +160,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
@@ -125,10 +125,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}
|
||||
@@ -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
|
||||
|
||||
|
||||
######################################
|
||||
|
||||
@@ -125,10 +125,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}
|
||||
@@ -149,89 +146,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
|
||||
|
||||
|
||||
######################################
|
||||
|
||||
@@ -125,10 +125,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}
|
||||
@@ -149,89 +146,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
@@ -141,10 +141,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}
|
||||
@@ -168,89 +165,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
@@ -136,10 +136,7 @@ OS_SET= Linux FreeBSD Darwin
|
||||
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}:
|
||||
${MAKE} `${UNAME}`
|
||||
@@ -225,90 +222,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 Darwin Darwin.alt FreeBSD FreeBSD.alt Linux Linux.alt
|
||||
@-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
@@ -128,10 +128,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
|
||||
|
||||
# We FORCE the use of -O0 -g even if someone overrides it because this entry is
|
||||
# a BACKTRACE QUINE and NEEDS debugging symbols.
|
||||
@@ -158,90 +155,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} -rf ${TARGET}.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
@@ -129,10 +129,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}
|
||||
@@ -153,89 +150,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
@@ -139,10 +139,7 @@ OPT+= -O0
|
||||
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
|
||||
|
||||
|
||||
# We FORCE the use of -O0 even if someone overrides it because this entry has
|
||||
@@ -171,90 +168,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 tbfs
|
||||
@-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
@@ -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,90 +147,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 fib.c fib
|
||||
@-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
@@ -286,10 +286,7 @@ prog = ${rnn1}
|
||||
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
|
||||
text
|
||||
|
||||
${TARGET}: ${PROG}.c Makefile ${INPUTS}
|
||||
@@ -337,58 +334,12 @@ 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
|
||||
|
||||
cpclean:
|
||||
${RM} -f cp*_*.*
|
||||
@@ -398,33 +349,6 @@ clobber: clean cpclean
|
||||
${RM} -rf *.dSYM
|
||||
${RM} -f ${INPUTS}
|
||||
${RM} -f ${OUTPUTS}
|
||||
@-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
@@ -135,10 +135,7 @@ DOCS= poikola.tex
|
||||
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
|
||||
|
||||
# We disable the optimiser because the author stated that for GCC optimiser
|
||||
# level 0 gave correct output. With clang [0123s] works which suggests that
|
||||
@@ -175,90 +172,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 poikola.aux poikola.log poikola.synctex.gz
|
||||
@-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
@@ -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
|
||||
|
||||
|
||||
######################################
|
||||
|
||||
Reference in new issue
Block a user