head	1.2;
access;
symbols;
locks
	perlman:1.2; strict;
comment	@# @;


1.2
date	98.02.23.06.40.20;	author perlman;	state Exp;
branches;
next	1.1;

1.1
date	98.02.23.04.44.56;	author perlman;	state Exp;
branches;
next	;


desc
@@


1.2
log
@*** empty log message ***
@
text
@# HCI Education Survey Makefile
# This makefile generates reports and installs them in the DESTDIR directory

oldreports=README.ps README.txt # no longer generated
# reports are the files that get generated
reports= \
	contact.html \
	country.html \
	respond.html \
	course.html \
	faculty.html \
	program.html
# generators are the shell scripts to generate reports
generators= html-contact html-country html-course \
	html-faculty html-program

# DESTDIR is where the generated reports and data files are copied
DESTDIR=/acminfo/2/sigs/sigchi/educhi
HTTPDIR=http://www.acm.org/sigchi/educhi/
HTTPDIR=

all: ${reports}

# newcopy installs the file only if it is newer and differs from the original
install: ${reports}
	for i in index.html totals.inc ${reports} Data/*; do newcopy $$i cat ${DESTDIR}; done
	# cp ${reports} Data/* survey.txt ${DESTDIR}

clean:
	/bin/rm -f ${reports}

.PRECIOUS: ${generators} index.html Data/* survey.txt

index.html: totals.inc respond.html

contact.html: Data/* html-contact
	html-contact Data/* > $@@

faculty.html: makefile html-faculty
	html-faculty Data/* > $@@

course.html: makefile html-course
	html-course Data/* > $@@

country.html: Data/* html-country
	html-country Data/* > $@@

program.html: makefile html-program
	html-program Data/* > $@@

totals.inc: Data Data/*
	programs=`cat Data/* | grep -ic "^%section.*program"`; \
	faculty=`cat Data/* | grep -ic "^%section.*faculty"`; \
	courses=`cat Data/* | grep -ic "^%section.*course"`; \
	echo "$$programs programs, $$faculty faculty, and $$courses courses." > $@@

respond.html: Data/* makefile
	for i in Data/*; do sssearch section=unit $$i | ssformat -t "	<li><a href='${HTTPDIR}$$i'>%shortname</a>"; done > $@@

@


1.1
log
@Initial revision
@
text
@d10 3
a12 3
	course.rpt courseA.rpt courseO.rpt \
	faculty.rpt facultyA.rpt facultyO.rpt \
	program.rpt programA.rpt programO.rpt
d14 2
a15 2
generators= html-contact html-country report-course \
	report-faculty report-program
d39 2
a40 5
course.rpt: makefile Data/* report-course courseA.rpt courseO.rpt
	# report-course Data/* > $@@
	echo "Courses from America (USA) are in courseA.rpt" > $@@
	echo "while courses from Other countries are in courseO.rpt." >> $@@
	echo "This split keeps the report files under 100K bytes." >> $@@
d42 2
a43 2
courseA.rpt: Data/* report-course
	report-course `report-files country=usa Data/*` > $@@
a44 3
courseO.rpt: Data/* report-course
	report-course `report-files country!=usa Data/*` > $@@

d48 2
a49 20
faculty.rpt: makefile Data/* report-faculty facultyA.rpt facultyO.rpt
	# faculty-course Data/* > $@@
	echo "Faculty from America (USA) are in facultyA.rpt" > $@@
	echo "while faculty from Other countries are in facultyO.rpt." >> $@@
	echo "This split keeps the report files under 100K bytes." >> $@@

facultyA.rpt: Data/* report-faculty
	report-faculty `report-files country=usa Data/*` > $@@

facultyO.rpt: Data/* report-faculty
	report-faculty `report-files country!=usa Data/*` > $@@

program.rpt: makefile Data/* report-program programA.rpt programO.rpt
	#report-program Data/* > $@@
	echo "Programs in America (USA) are in programA.rpt" > $@@
	echo "while programs in Other countries are in programO.rpt." >> $@@
	echo "This split keeps the report files under 100K bytes." >> $@@

programA.rpt: Data/* report-program
	report-program `report-files country=usa Data/*` > $@@
a50 3
programO.rpt: Data/* report-program
	report-program `report-files country!=usa Data/*` > $@@

a59 16
# OLD FILES

country.rpt: Data/* report-country
	report-country Data/* > $@@

respond.rpt: Data/* makefile
	sssearch section=unit Data/* | ssformat -t "%shortname" > $@@

README.txt: tmac.README README.nr totals.inc respond.rpt
	nroff tmac.README README.nr | unctrl > $@@

README.ps: tmac.README README.nr totals.inc respond.rpt
	atroff tmac.README README.nr > $@@

README.html: hmac.README README.nr totals.inc respond.html
	nroff hmac.README README.nr | unctrl > $@@
@
