add bin/add-dir.sh skeleton for further development

We have added `bin/add-dir.sh` which is just a skeleton
script.  For now, most of what is useful are the top level
comments describing what the command will and will NOT do.
These comments are work in progress and will be updated.

Updated `bin/README.md` to reflect these changes.

Changed usage introduction text to `bin/README.md`.

Made a minor comment change to `bin/add-dir.sh`.

The `bin/new-year.sh` toll will create the YYYY directory if needed.

Added `template/` directory for Makefile templates.

The `bin/new-year.sh` tool will create `YYYY/Makefile` from
the `template/Makefile.year` if needed.

The `YYYY/.year` and `YYYY/.filelist` will be created
for the new IOCCC year.

Change `bin/new-year.sh` VERSION from "1.1 2024-07-21"
to "1.2 2024-07-22".

Added a brief description of `bin/add-dir.sh` to `bin/README.md`
and updated `bin/new-year.sh` entry.

Added `make genpath_top` rule that just updates `.top`.
The existing `make genpath` also runs `make genpath_top`.

The `YYYY/README.md` will be created from a template
for the new IOCCC year.

Flag as error if `YYYY/README.md`, or `YYYY/YYYY.tar.bz2` is
missing in `bin/gen-years.sh`.

Warn if `YYYY/README.md`, or `YYYY/YYYY.tar.bz2` is an empty file
in `bin/gen-years.sh`.

Changed `bin/gen-years.sh` VERSION from "1.3.4 2024-07-13"
to "1.3.5 2024-07-23".

Performed `make www` to accomplish the above and to test under macOS.
This commit is contained in:
Landon Curt Noll committed 2024-07-23 12:55:07 -07:00
1 parent 332255fd40
commit 30334f9716
9 files changed
+1378 -60

No files matched your search

+20 -11
View File
@@ -99,7 +99,7 @@ all:
.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 genpath new_year love haste waste maker \
clean clobber install genpath new_year genpath_top love haste waste maker \
easter_egg sandwich supernova deep_magic magic charon pluto
# alternative executable
@@ -409,9 +409,8 @@ tab_check:
#
genpath:
@echo '=-=-=-=-= IOCCC begin make $@ =-=-=-=-='
@${RM} -f .tmp.genpath
@${MAKE} genpath_top
@-for i in ${YEARS}; do \
echo "$$i" >> .tmp.genpath; \
if [[ -f $$i/Makefile ]]; then \
echo "cd $$i; make $@"; \
(cd $$i; make $@); \
@@ -419,14 +418,6 @@ genpath:
echo "Warning: $$i/Makefile not found, skipping $$i for $@ processing" 1>&2 ; \
fi; \
done
${SORT} -n -u .tmp.genpath -o .tmp.genpath;
@-if ${CMP} -s .tmp.genpath .top; then \
${RM} -f .tmp.genpath; \
else \
${MV} -f .tmp.genpath .top; \
${CHMOD} 0444 .top; \
echo "updated .top"; \
fi
@echo '=-=-=-=-= IOCCC complete make $@ =-=-=-=-='
# generate YYYY level .filelist
@@ -783,6 +774,24 @@ new_year:
(echo ${YEARS} ${NEW_YEAR}) | ${TR} ' ' '\012' | ${SORT} -n) | \
${FMT} -p | ${SED} -e '2,$$s/^/\t/' -e 's/$$/ \\/' -e '$$s/ \\//'
# form the top level .top only
#
genpath_top:
@echo '=-=-=-=-= IOCCC begin make $@ =-=-=-=-='
@${RM} -f .tmp.genpath
@-for i in ${YEARS}; do \
echo "$$i" >> .tmp.genpath; \
done
${SORT} -n -u .tmp.genpath -o .tmp.genpath;
@-if ${CMP} -s .tmp.genpath .top; then \
${RM} -f .tmp.genpath; \
else \
${MV} -f .tmp.genpath .top; \
${CHMOD} 0444 .top; \
echo "updated .top"; \
fi
@echo '=-=-=-=-= IOCCC complete make $@ =-=-=-=-='
##################
# 133t hacker rulz