# ~jhs/public_html/bin/Makefile by Julian Stacey SUBDIR += .other .sh all: index.html BLA!= find . -type f \ \( ! -name ./index.html \ -and \ ! -name ./index.html.tmp \ -and \ ! -name ./index.lmth \ \) \ -print index.lmth: ${BLA} echo "" > $@ echo "Julian Stacey's ~/bin/" >> $@ echo "

Julian Stacey's" >> $@ echo "
Index of ~jhs/bin/

" >> $@ echo "

Generated `date` by " >> $@ echo "Makefile

" >> $@ echo "

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

  • ' >> $@ echo '' >> $@ echo '' >> $@ chmod 644 $@ .include # bsd.subdir.mk before berklix.mk, else no recursion into SUBDIR .include