# ~jhs/public_html/Makefile by Julian Stacey # JJLATER: # All .html have been converted to .lmth, Except in bim/ # The following dirs may break, Makefiles need looking at: # src/bsd/jhs/bin/public/phone/ # src/bsd/jhs/bin/public/satelite/ # I could add public /etc files # See also: README.htaccess NO_OBJ=true # NO_OBJ does not stop /usr/obj/`pwd` being created, # as subsidiary directories create it. # SUBDIR += fun home jpg pics SUBDIR += CFBSD SUBDIR += berklix SUBDIR += bg SUBDIR += bike-fast SUBDIR += bim SUBDIR += bin SUBDIR += bsd SUBDIR += blog SUBDIR += bsdpie SUBDIR += consultants SUBDIR += contact SUBDIR += cv SUBDIR += deter SUBDIR += dots SUBDIR += ewinter SUBDIR += estic SUBDIR += faraday SUBDIR += fax SUBDIR += flights SUBDIR += fraud SUBDIR += free SUBDIR += freebsd SUBDIR += ftp SUBDIR += gea SUBDIR += gifs SUBDIR += hardware SUBDIR += harries SUBDIR += holz SUBDIR += idacas SUBDIR += mail SUBDIR += maps SUBDIR += mecc SUBDIR += mobile SUBDIR += monorail SUBDIR += ms SUBDIR += phone SUBDIR += post SUBDIR += puzzle SUBDIR += rates SUBDIR += robot SUBDIR += sale SUBDIR += scanjet SUBDIR += sfd SUBDIR += ski SUBDIR += sms SUBDIR += src SUBDIR += stadtmuenchen SUBDIR += standards SUBDIR += systems SUBDIR += std SUBDIR += starnberg SUBDIR += symmetric SUBDIR += techtalk SUBDIR += test SUBDIR += txt SUBDIR += pcs SUBDIR += vcfe SUBDIR += walk SUBDIR += pml SUBDIR += laptops SUBDIR += jlucas SUBDIR += volksentscheid .if exists (pics/isar/Makefile) SUBDIR += pics/isar .endif .if (make(clean) || make(obj)) # Reduce SUBDIR to only clean src/ # cleandir is not here, as I want all # dependent files generated local ready for access by web server; # so I do not limit the removal of obj links. .if !target(html) SUBDIR = src .endif .endif # Next target not called automatically, till I work out how to # do it along with SUBDIR & working on different versions of FreeBSD # (so cant use EG _SUBDIRUSE which is on 4.5 but not 4.7). all: index.html all.html modes rd check asclist # usb cdrom all_lmth_hook: ${.CURDIR}/all.lmth all_html_hook: all.html #all.html: default rule from all.lmth ${.CURDIR}/all.lmth! echo "" > $@ echo " " >> $@ echo -n "<!-- DO NOT EDIT -" >> $@ echo " This File is generated by ~/public_html/Makefile -->" >> $@ echo " " >> $@ echo "Julian Stacey's ~/all.html" >> $@ echo -n "

Julian Stacey's " >> $@ echo "Index Of Files.

" >> $@ echo -n "

Commented Indexes For Some categories" >> $@ echo " Also Exist

" >> $@ echo "" >> $@ echo "

Sources

" >> $@ echo "

Texts

" >> $@ echo -n "

Dot Files (Unix " >> $@ echo " Initialisers)

" >> $@ echo -n "

Domain" >> $@ echo -n " directories in /site" >> $@ echo " not listed in this web file.

" >> $@ echo "
" >> $@ echo -n "

Uncommented Alphabetic List Of All Files" >> $@ echo " in ~jhs/, generated `date` by " >> $@ echo "../Makefile

" >> $@ @#OLD (cd ${.CURDIR} ; find . -type f \! -name \*.lmth -print ) \ @#OLD | sort > ${HOME}/tmp/`basename $@`.tmp.1 @#OLD for i in `cat ${HOME}/tmp/$@.tmp.1` ; do \ @#OLD echo "
  • $$i" >> $@ ; \ @#OLD done for i in `cd ${.CURDIR} ; find . -type f \! -name \*.lmth -print ) \ | sort` ; do \ echo "
  • $$i" >> $@ ; \ done @## -rm ${HOME}/tmp/$@.tmp.1 echo -n '

  • ' >> $@ echo -n 'footer' >> $@ echo '' >> $@ chmod 644 $@ asclist: @echo "Convert this lot to .txt make it easy for others browsers" find . -name \*.asc rdist: # cd public_html ; make rdist cd ${.CURDIR}/.. ; rdist -f public_html/Distfile gate rsh gate "cd public_html/.. ; rdist -f public_html/Distfile remote" clean: clean2 clean2: @echo "Seeing if any typescript for you to manually delete" -find . -type f -name typescript -print -ls -l all.lmth.tmp.[12] -cd ${.CURDIR} && find . -type d -name .xvpics | xargs rm -rf modes! echo $@ .if exists(/site) @echo "Next chown needs to be run as root." @# but it doesnt fail unless eg there is stuff owned by root. cd /tmp; cd ${.CURDIR} && find . -print0 | \ xargs -0 ${XS} chown -h jhs .else # build for cdrom inside a chroot find . -print0 | xargs -0 chown -h www .endif @# chown fixes things like src/bsd/jhs/bin/public/filesize/tst.20 @# which if make runs as root are uid 0 @# The print0 & xargs -0 are to cope with a nasty @# ".kde/share/apps/knotes/notes/knote/knote 1" .if exists(/site) cd /tmp;cd ${.CURDIR} && find . -type f -print0 \ | xargs -0 chmod a+r cd /tmp;cd ${.CURDIR} && find . -type d -print0 \ | xargs -0 chmod a+rx .else # build for cdrom inside a chroot .endif @# Symbolic links must be owned by me, (not root as I once discovered @# some to be), else I suspect rdist may not upload them to the web. rd! @echo "skipping rdist lap 2>&1 > /dev/null &" tidy: find . -type f -name \*.lmth | \ grep -v ./bin/index.html | \ grep -v ./src/fixes.html | \ grep -v ./dots/index.html | \ xargs tidy -i -m @# I could add some bim m4 exceptions to the list above. @# but not important if I dont, equally unimportantn if I @# werent to except the 3 above. usb: usb.ufs usb.dos usb.ufs: cd ${HOME}/public_html/.. ; rdist -R -f public_html/Distfile usb.ufs usb.dos: cd ${HOME}/public_html/.. ; rdist -R -f public_html/Distfile usb.dos cdrom: @echo "JJLATER also mkisofs a cdrom rock ridge image & put it on" @echo "king /dev/da0s1 so that it can be read on MS systems" # Scan for phone numbers @ other strings I may not want public. .if exists(../private/Makefile.personal) .include "../private/Makefile.personal" SCAN_TEL = SCAN_TEL += $(TKOM_CARD_FAX) SCAN_TEL += $(TKOM_CARD_TEL) SCAN_TEL += $(TKOM_FAMILY_TEL) SCAN_TEL += $(TKOM_MODEM) SCAN_TEL += $(TKOM_PERMIN_TEL) SCAN_TEL += $(TKOM_PERSONAL_FAX) SCAN_TEL += $(TKOM_PERSONAL_TEL) SCAN_TEL += $(TKOM_PROJECT_TEL) SCAN_TEL += $(MOBILE_REAL) # SCAN_TEL += $(TKOM_CDROM_TEL) # Do not scan for this. # SCAN_TEL += $(TKOM_WEB_TEL) # Do not scan for this. .else SCAN_TEL = "no_Makefile.people.list_of_numbers" .endif grep_tel: -for i in ${SCAN_TEL} ; \ do \ echo "Sanning for $$i" ; \ find . -type f \ | xargs grep -l $$i ; \ done @echo done # Scan for phone numbers @ other strings I may not want public .if exists(../private/Makefile.personal) SCAN_EML = SCAN_EML += $(EMAIL_BN) SCAN_EML += $(EMAIL_PN) SCAN_EML += $(LEAK_SCAN) .else SCAN_EML = "no_Makefile.people.list_of_emails" .endif SCAN_EML += jhs@'berklix'\.com SCAN_EML += jhs@'berklix'\.net SCAN_EML += jhs@'berklix'\.org SCAN_EML += jhs\-list@'berklix'\.com SCAN_EML += jhs\-list@'berklix'\.net SCAN_EML += jhs\-list@'berklix'\.org SCAN_EML += jhs@'bsdpie'\.com SCAN_EML += jhs@'freebsd'\.org SCAN_EML += jhs@'monometro'\.co.uk SCAN_EML += jhs@'surfacevision'\.com SCAN_EML += postmaster@'berklix'\.com SCAN_EML += postmaster@'berklix'\.net SCAN_EML += postmaster@'berklix'\.org SCAN_EML += postmaster@'bsdpie'\.com SCAN_EML += postmaster@'surfacevision'\.com SCAN_EML += webmaster@'berklix'\.com SCAN_EML += webmaster@'berklix'\.net SCAN_EML += webmaster@'berklix'\.org SCAN_EML += webmaster@'bsdpie'\.com SCAN_EML += webmaster@'monometro'\.co.uk grep_mail: @echo Scanning for ${SCAN_EML} @# The echo is to break up components in LEAK_SCAN. -cd ${.CURDIR}; for i in `echo ${SCAN_EML}` ; \ do \ echo " " ; \ echo "Scanning for $$i" ; \ find . -type f | xargs grep -l $$i ; \ done @echo done # In FreeBSD=-4.7 usr.bin/usbhidctl/Makefile is the only file to use both # bsd.prog.mk & bsd.subdir.mk, & it uses them in that order. # .include # .include # Note /usr/share/mk/bsd.subdir.mk has: # .if !target(__initialized__) # __initialized__: # .if exists(${.CURDIR}/../Makefile.inc) # .include "${.CURDIR}/../Makefile.inc" # .endif # .endif check: test -e ${.CURDIR}/index.html @# above is to make damn sure index.html doesnt get lost in @# /usr/obj/`pwd` , else web wont be visible to browsers. @echo "Suggestion: make linkcheck" @echo "Suggestion: make linkchecker" @echo "Suggestion: make httrack" linkcheck: @# linkcheck -help ls -l ${HOME}/linkcheck.report.localhost @# this recurses. @# It doesnt write ${HOME}/linkcheck.report.localhost till ^C cd ${.CURDIR}/../../tmp && linkcheck -r http://localhost/~jhs ls -l ~/linkcheck.report.localhost linkchecker: @# linkchecker -help | more @# Checks just one page. cd ${.CURDIR}/../../tmp && linkchecker -r20 http://localhost/~jhs httrack: cd ${HOME}/tmp/httrack && httrack -a -d -w http://localhost/~jhs/ @# -a = --stay-on-same-address @# -d stay on the same principal domain (--stay-on-same-domain) @# -w *mirror web sites (--mirror) ls -l hts-log.txt httrack2: @echo "This will not copy, just check" rsh www.berklix.com httrack -d --spider http://localhost/~jhs/ ls -l hts-log.txt @# --spider , to test links: reports Errors @# & Warnings (-p0C0I0t) @# -t test all URLs (even forbidden ones) (--test) @# See more httrack notes in bin/.sh/web_cp_remote findxv: find . -type d -name .xvpics .include .include