# ~jhs/public_html/bin/Makefile by Julian H. Stacey SUBDIR += .other SUBDIR += .sh SUBDIR += .csh all: index.lmth index.html FILES!= find -s . -type f \ \( \! -name ./index.html -and \ \! -name ./index.html.tmp -and \ \! -name ./index.lmth \ \) -print | \ grep -v index.html | grep -v index.lmth # JJLATER why do I need above grep -v files_show: @echo ${FILES} index.lmth: ${FILES} echo "" > ${.CURDIR}/$@ echo "Julian H. Stacey's ~/bin/" >> ${.CURDIR}/$@ echo "

Julian H. Stacey's" >> ${.CURDIR}/$@ echo "
Index of ~jhs/bin/

" >> ${.CURDIR}/$@ echo "

Generated `date` by " >> ${.CURDIR}/$@ echo "Makefile

" >> ${.CURDIR}/$@ echo "

" >> ${.CURDIR}/$@ @# Cant use ${FILES} in next line as need filenames one per line. (cd ${.CURDIR}; find . -type f \( \ ! -name index.html -and \ ! -name index.lmth -and \ ! -name index.html.tmp \) \ -print ) | grep -v .no_customise | sort > ${HOME}/tmp/$@.tmp for i in `cat ${HOME}/tmp/$@.tmp` ; do \ echo "
  • $$i
    "		>> ${.CURDIR}/$@ ; \
    		head -2 ${.CURDIR}/$$i | sed 's//\>/g' | sed 's/&/\&/g'	>> ${.CURDIR}/$@ ; \
    		echo "
    " >> ${.CURDIR}/$@ ; \ done -rm ${HOME}/tmp/$@.tmp @# The head above should be changed to cat till blank line echo '

  • ' >> ${.CURDIR}/$@ echo '' \ >> ${.CURDIR}/$@ echo '' >> ${.CURDIR}/$@ chmod 644 ${.CURDIR}/$@ .include