Makefile 2.31 KB
#
# Makefile for PR/man
#

PRDEPTH=..
include $(PRDEPTH)/PRdefs

SGIDOCS=relnotes_jp.sgi README.release.sgi

PCDOCS=relnotes_jp.pc README.release.pc

LDIRT=$(SGIDOCS) $(PCDOCS)

#
# relnotes_old is not a SUBDIR becase it gets handled differently.
#

default: $(SGIDOCS)

install: $(SGIDOCS)
	$(INSTALL) -m 444 -F /usr/src/PR/doc	\
		-src relnotes_jp.sgi relnotes20L.jp
	$(INSTALL) -m 444 -F /usr/src/PR -src README.release.sgi README.jp
	$(INSTALL) -m 444 -F /usr/src/PR/doc relnotes.rsp_dev
	$(INSTALL) -m 444 -F /usr/src/PR/doc relnotes.rsp_gfx
	$(INSTALL) -m 444 -F /usr/src/PR/doc relnotes.rsp_audio
	(cd relnotes_old; make install )

#
# Perl スクリプト(by 三成さん)は PC 用と SGI 用を #ifdef で一つにまと
# めたファイルに対して、それを SGI 用に変換するために使用する。
#
relnotes_jp.sgi:  relnotes_jp
	perl -ne 'if(/^#if(def.+PC|ndef.+SGI)/){$$a=1}elsif(/^#if(ndef.+PC|def.+SGI)/||/^#endif/){$$a=0}elsif(/^#else/){$$a^=1}elsif($$a==0){print}' relnotes_jp > relnotes_jp.sgi

relnotes_jp.64dd.sgi:  relnotes_jp.64dd
	perl -ne 'if(/^#if(def.+PC|ndef.+SGI)/){$$a=1}elsif(/^#if(ndef.+PC|def.+SGI)/||/^#endif/){$$a=0}elsif(/^#else/){$$a^=1}elsif($$a==0){print}' relnotes_jp.64dd > relnotes_jp.64dd.sgi

relnotes_jp.naudio.sgi:  relnotes_jp.naudio
	perl -ne 'if(/^#if(def.+PC|ndef.+SGI)/){$$a=1}elsif(/^#if(ndef.+PC|def.+SGI)/||/^#endif/){$$a=0}elsif(/^#else/){$$a^=1}elsif($$a==0){print}' relnotes_jp.naudio > relnotes_jp.naudio.sgi

README.release.sgi: README.release
	perl -ne 'if(/^#if(def.+PC|ndef.+SGI)/){$$a=1}elsif(/^#if(ndef.+PC|def.+SGI)/||/^#endif/){$$a=0}elsif(/^#else/){$$a^=1}elsif($$a==0){print}' README.release > README.release.sgi

$(PCDOCS): $(PCDOCS:.pc=)
	for i in $(PCDOCS:.pc=); \
	do \
		perl -ne 'if(/^#if(def.+SGI|ndef.+PC)/){$$a=1}elsif(/^#if(ndef.+SGI|def.+PC)/||/^#endif/){$$a=0}elsif(/^#else/){$$a^=1}elsif($$a==0){print}' $$i > $$i.pc; \
	done

pcdocs: $(PCDOCS)
	(cd relnotes_old; make pcdocs)

#
# new install, does .ps files too
#
#install: $(_FORCE) ps-list
#	$(INSTALL) -m 444 -F /usr/src/PR relnotes
#	$(SUBDIRS_MAKERULE)
#	for i in $(SUBDIRS); do \
#		cd $$i; $(INSTALL) -m 444 -F /usr/src/PR/man/$$i `make print-list | sed -e "s/\.p/.ps/g"`; cd ..; \
#	done
#	cd relnotes_old; make install; cd ..

include $(COMMONRULES)

ps-list:
	for i in $(SUBDIRS); do \
		cd $$i; make `make print-list | sed -e "s/\.p/.ps/g"`; cd ..; \
	done