#------------------------------------------------------------------------------
# Makefile for Oberon system documentation
# (c) University of Ulm, SAI, D-7900 Ulm
# afb 8/90
# rev afb 9/90: GNU make
# rev afb 9/90
#    avoid patsubst in association with ":=" assignment to
#    keep environment lists < 5kb
# rev afb 4/92: hierarchical makefiles
#------------------------------------------------------------------------------

Chapter3 :=	ASCII.3 Assertions.3 \
		Clocks.3 Comments.3 Conclusion.3 Conditions.3 \
		ConstStrin.3 Coroutines.3 CrPipes.3 \
		Dates.3 Discipline.3 Errors.3 \
		EventCondi.3 Events.3 ForeignEve.3 IEEE.3 \
		IndirectDi.3 Internet.3 \
		Iterators.3 Lists.3 \
		Loader.3 LocalSemap.3 \
		Maps.3 Math.3 MC68881.3 Memory.3 Messages.3 \
		NetIO.3 Networks.3 NeWS.3 NeWSSysTok.3 \
		Objects.3 Operations.3 \
		PersDiscip.3 PersObject.3 \
		Print.3 Priorities.3 Process.3 \
		RTErrors.3 Random.3 Read.3 Reals.3 RelatedEve.3 \
		RemoteObje.3 \
		Resolver.3 RoundRobin.3 Scales.3 Scan.3 ScanDir.3 Schedulers.3 \
		Semaphores.3 \
		Sets.3 SMStreams.3 \
		Storage.3 StreamCond.3 StreamDisc.3 Streams.3 \
		Strings.3 Suffixes.3 Sys.3 SysArgs.3 SysCommand.3 SysConf.3 \
		SysConvers.3 SysDebug.3 SysErrors.3 \
		SysFile.3 SysHost.3 SysIO.3 SysIPC.3 SysLoader.3 \
		SysMain.3 SysMemory.3 SysModules.3 \
		SysProcess.3 SysResourc.3 SysSegment.3 SysSelect.3 \
		SysSignals.3 SysSockets.3 SysStat.3 SysStorage.3 \
		SysTermIO.3 SysTime.3 SysTypes.3 \
		Tasks.3 Texts.3 \
		TimeCondit.3 Timers.3 Times.3 Types.3 Timezones.3 \
		UnixArchiv.3 UnixArgLis.3 UnixArgume.3 UnixClock.3 \
		UnixDirect.3 UnixDomain.3 UnixEnviro.3 \
		UnixFileCo.3 UnixFiles.3 UnixPipes.3 UnixProces.3 \
		UnixWaitCo.3 UntaggedSt.3 Write.3 XAuthority.3

BinDir :=	../../bin
MiscDir :=	../../misc

InstallLib :=	/usr/local/lib/oberon
InstallMan :=	/usr/local/man/oberon

Release :=	0.4

#------------------------------------------------------------------------------
# installation
#------------------------------------------------------------------------------
Man3 :=		$(InstallMan)/man3
Pages3 =	$(patsubst %,$(Man3)/%, $(Chapter3))

.PHONY:		install
install:	$(Pages3)

$(Pages3):	$(Man3)/%: %
		rm -f $@
		$(BinDir)/patch_macros \
			-l $(InstallLib) \
			-m $(MiscDir)/macros \
			-r $(Release) \
			$< >$@
		chmod 664 $@

#------------------------------------------------------------------------------
# cleanup & checkout
#------------------------------------------------------------------------------
.PHONY:		checkout clean
checkout:	$(Chapter3)
clean:
		rcsclean $(Docs)
