Makefile 994 Bytes
#
# Makefile for patches20I ultra
#

include $(ROOT)/usr/include/make/PRdefs

OLD_DOCS =	Changefiles.jp \
		DOC_cpak.jp \
		DOC_handle.jp \
		DOC_prenmi.jp \
		DOC_clock.jp \
		DOC_fpal.jp \
		DOC_piraw.jp \
		README.jp

OLD_SGIDOCS =   ${OLD_DOCS:.jp=.sgi}

OLD_PCDOCS =	${OLD_DOCS:.jp=.pc}

LDIRT = $(OLD_SGIDOCS) $(OLD_PCDOCS)

default:

include $(COMMONRULES)

install:        default $(OLD_SGIDOCS)
		for i in $(OLD_SGIDOCS:.sgi=); \
		do \
			$(INSTALL) -m 444 -F /usr/src/PR/doc/relnotes_old/patches20I/ultra \
			-src $$i.sgi $$i.jp ;\
		done

$(OLD_SGIDOCS):
		for i in $(OLD_DOCS:.jp=); \
		do \
			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}' $$i.jp > $$i.sgi; \
		done

pcdocs:
		for i in $(OLD_DOCS:.jp=); \
		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.jp > $$i.pc; \
		done