DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ M T

⟦a5b051783⟧ TextFile

    Length: 15571 (0x3cd3)
    Types: TextFile
    Names: »Makefile«

Derivation

└─⟦d10a02448⟧ Bits:30000409 8mm tape, Rational 1000, ENVIRONMENT, D_12_7_3
    └─ ⟦fc9b38f02⟧ »DATA« 
        └─⟦8e9e227a9⟧ 
            └─⟦e9895db93⟧ 
                └─ ⟦this⟧ »./Makefile« 

TextFile

#==============================================================================
# Makefile - Use this to generate and/or install an executable version
#	     of the Rational X Interface program; RXI.
#
# Regeneration and Installation of RXI from sources :
#
#   Unix> make <what>
#
# <what> is one of:
#
#   install		- Installs just the rxi executables and data files.
#   install.man		- Installs just the rxi man page.
#   install.fonts	- Installs just the fonts that rxi needs
#   install.all		- Does install, install.man, and install.fonts.
#
#   relink		- Relinks the rxi executables with local workstation
#			  libraries (perhaps cause the use of shared
#			  libraries, a desirable situation.)
#   clean		- "Cleans" the directory so that you can rebuild
#			  rxi from sources.
#   all			- Creates all rxi executables (from sources if
#			  necessary, do this after a "make clean").
#   install.fonts.fallback- If the normal install.fonts process fails (some
#			  important system program is missing for instance)
#			  then this can be used to attempt to install the
#			  fonts using programs supplied by Rational.
#
#==============================================================================
#---Generated programs/fonts/etc. are installed into these directories.
#   You may want to change some or all of these directory specifications.
#
#	BINDIR		- where rxi executables will reside; eg. /usr/bin
#	FONTDIR		- where compiled fonts reside; eg. /usr/lib/X11/fonts
#	MANDIR		- the man page directory for the rxi man page
#	XAPPLOADDIR	- where application defaults files reside
#	FONTSRC		- where uncompiled fonts reside
#==============================================================================

#---Generated items are installed into these directories.
#
# NOTE: These definitions assume that you are currently operating under the
#	OpenLook/OpenWindows/NeWS system.  This implies that you have
#	the $OPENWINHOME environment variable set.  Do this command:
#	"echo $OPENWINHOME".  If you get an error then you are not operating
#	OpenLook.  *Do* *that* *first*.
#
#	The OPENWIN macro will use the current definition of $OPENWINHOME
#	and RXI will install its binary, its fonts, and its resource files
#	directly into the OpenLook directories where they belong.  
#
#	*If* a customer is determined that RXI must be installed elsewhere,
#	then:
#	a) determine where the binary, the fonts, and the resource files go
#	b) set BINDIR to indicate the place for the binaries
#	c) set FONTDIR to indicate the place for the fonts
#	d) set XAPPLOADDIR and XAPPLOADDIRstr to be the same thing, the name
#		of the directory where the resources files will go
#	e) change the definition of DEFINE=, make it this instead:
#		DEFINES= -DHARDWIRE
#	f) if FONTDIR is not to be $(OPENWIN)/lib/fonts then each and every
#		RXI user will have to tell the OpenLook server where the
#		RXI fonts can be found.  This will be done every time a user
#		starts his OpenLook server.  Read the OpenLook manuals to
#		determine the command to use.
#	g) do a "make all" command before doing the "make install.all"

        OPENWIN = $$OPENWINHOME
     OPENWINstr = $$$$OPENWINHOME
         BINDIR = $(OPENWIN)/bin
        FONTDIR = $(OPENWIN)/lib/fonts
         MANDIR = $(OPENWIN)/man/mann
    XAPPLOADDIR = $(OPENWIN)/etc
 XAPPLOADDIRstr = $(OPENWINstr)/etc

#---Change this if you change MANDIR.  A MANDIR of /usr/man/man2.Z implies a
#   file name of rxi.2, etc.

        MANFILE = rxi.n

#==============================================================================
# You should not need to edit anything below this point.
#==============================================================================

             CC = cc
             CP = cp
        INSTALL = install
             LD = ld
             MV = mv
             RM = rm -f
          SHELL = /bin/sh

#---These are passed to all normal make commands.

       ALLMAKES = BINDIR="$(BINDIR)" \
		  FONTDIR="$(FONTDIR)" \
		  MANDIR="$(MANDIR)" \
		  XAPPLOADDIR="$(XAPPLOADDIR)" \
                  OPENWIN="$(OPENWIN)" \
                  CCFLAGS="$(CCFLAGS)" \
		  DEFINES="$(DEFINES)"

#---These are passed to all recursive make commands.

 RECURSIVEMAKES = $(ALLMAKES) \
                  OPENWIN="$$OPENWINHOME" \
		  XAPPLOADDIRstr='$(XAPPLOADDIRstr)' \
                  INCLUDES="$(INCLUDES)" \
                  LDFLAGS="$(LDFLAGS)" \
		  LIBDIRS="$(LIBDIRS)"

  RECURSIVEMAKE = make $(RECURSIVEMAKES) $(MFLAGS)

#---These are passed to all subdirectory make commands.

    SUBDIRMAKES = $(ALLMAKES) \
                  OPENWIN="$$OPENWINHOME" \
		  XAPPLOADDIRstr='$(XAPPLOADDIRstr)' \
                  INCLUDES="-I.. $(INCLUDES)" \
                  LDFLAGS="$(LDFLAGS)" \
		  LIBDIRS="$(LIBDIRS)"

    SUBDIRMAKE = make $(SUBDIRMAKES) $(MFLAGS)

#---These are passed to all make commands done for Rational maintenance.

  MAINTINCLUDES = -I/src/X/block_all

     MAINTMAKES = $(ALLMAKES) \
                  OPENWIN="$$OPENWINHOME" \
		  INCLUDES="$(intINCLUDES) $(MAINTINCLUDES)" \
                  LDFLAGS="-Bstatic -Qoption ld -M" \
		  LIBDIRS="-L/usr/lib/X11R3"

      MAINTMAKE = make $(MAINTMAKES)     $(MFLAGS)

#==============================================================================

   INSTMANFLAGS = -m 0444
   INSTDEFFLAGS = -m 0444
   INSTAPPFLAGS = -m 0755

#---These macros are defined on the make command line or not at all.

        CCFLAGS =
        DEFINES =
       INCLUDES =
        LDFLAGS =
        LIBDIRS =

#---These macros are redefined on the make command line if some special effect
#   is desirec.

       OPTIMIZE = -O

#---These macros are (presumably) never overridded by the command line.

    intCCFLAGS  = $(OPTIMIZE) $(intDEFINES) $(intINCLUDES)
    intDEFINES  = -DUTMP $(DEFINES)
    intINCLUDES = $(INCLUDES) -I. -I$(OPENWIN)/include
    intLDFLAGS  = $(LDFLAGS) $(intLIBDIRS) -assert nosymbolic
    intLIBDIRS  = $(LIBDIRS)

.c.o:
	$(CC) $(intCCFLAGS) -c $*.c

           XLIB = -lX11
       XTOOLLIB =  Xt/libXt.a
         XMULIB = Xmu/libXmu.a
         XAWLIB = Xaw/libXaw.a

         RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a \
			.emacs_* tags TAGS make.log MakeOut *.fb *.tmp

OBJS1        = main.o input.o charproc.o cursor.o util.o tabs.o \
               screen.o scrollbar.o button.o misc.o \
               VTPrsTbl.o data.o menu.o \
               RMForm.o ratmenu.o RMShell.o RMLabel.o RMSub.o \
               RMCommand.o

PROGRAMS     = rxi RXI.tmp RXI.tmp2 version.info rxi.man

#==============================================================================
# Compilation/Generation
#==============================================================================

X11/DidCopy: Xt/*.h Xaw/*.h Xmu/*.h
	cp Xt/*.h	X11
	cp Xaw/*.h	X11
	cp Xmu/*.h	X11
	cp /dev/null	X11/DidCopy

all:: X11/DidCopy
	@echo '============================================================'
	@echo 'The $$OPENWINHOME environment variable must be set, by you,'
	@echo 'to indicate the main OpenLook/NeWS directory.  This is the'
	@echo 'same variable that allows you to run OpenLook and the NeWS'
	@echo 'server.  First we check to make sure that $$OPENWINHOME is'
	@echo 'part of the current environment.  If this next command'
	@echo 'fails then set the OPENWINHOME variable to an appropriate'
	@echo 'value.  If you do not know what value to use then see'
	@echo 'your system administrator before proceeding further.'
	@echo '============================================================'
	set -u ; ls $(OPENWIN) > /dev/null
	cd Xt  ; $(SUBDIRMAKE) all
	cd Xmu ; $(SUBDIRMAKE) all
	cd Xaw ; $(SUBDIRMAKE) all
	$(RECURSIVEMAKE) all-programs

Xt/libXt.a: X11/DidCopy
	cd Xt  ; $(SUBDIRMAKE) all
Xmu/libXmu.a: X11/DidCopy
	cd Xmu ; $(SUBDIRMAKE) all
Xaw/libXaw.a: X11/DidCopy
	cd Xaw ; $(SUBDIRMAKE) all

all-programs: $(PROGRAMS)

main.o: $(XAWLIB) $(XTOOLLIB) $(XMULIB) X11/DidCopy

rxi: $(OBJS1) $(XAWLIB) $(XTOOLLIB) $(XMULIB) X11/DidCopy
	$(RM) $@
	export LD_LIBRARY_PATH ; \
	    LD_LIBRARY_PATH=$(OPENWIN)/lib:/usr/lib ; \
	    $(CC) -o $@ $(intLDFLAGS) $(OBJS1) \
		$(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) -ltermcap

relink::
	$(RM) $(PROGRAMS)
	for pgm in $(PROGRAMS) ; do \
	    $(RECURSIVEMAKE) $$pgm ; \
	done

TMPL = sed -e 's=@BINDIR@='$(BINDIR)'=g' -e 's=@APPDEF@=$(XAPPLOADDIRstr)=g'

RXI_ENV = $(XAPPLOADDIRstr)/RXI_Env_Menu

RXI.tmp: RXI.Xdefaults Makefile version.info
	echo RXI_ENV .$(RXI_ENV).
	echo XAPPLOADDIRstr .$(XAPPLOADDIRstr).
	rm -f RXI.tmp
	@(echo 'BEGIN { print "BEGIN {"; }' ; \
	  echo '/#define *defGeometry/ { print "GEO = " $$3 ";" ; }' ; \
	  echo '/#define *defRV/ { print " RCG = " $$3 ";" ; }' ; \
	  echo '{ next; }' ; \
	  echo 'END { print "}"; }' ; \
	) > awk.tmp
	awk -f awk.tmp rcg.h > awk2.tmp
	@(echo '/\*recognition:[ 	]*<.*>/ ' \
			'{ print $$1 "    " RCG ; next ;}' ; \
	  echo '/\*vt100.geometry:[ 	]*<.*>/ ' \
			'{ print $$1 "    " GEO ; next; }' ; \
	  echo '/\*menu.envMenuFile:[ 	]*<.*>/ ' \
			'{ print $$1 "    '"$(RXI_ENV)"'" ; next;}' ; \
	  echo '{ print; }' ; \
	) >> awk2.tmp
	awk '{ print "# " $$0; }' version.info  >  RXI.tmpx
	echo ''					>> RXI.tmpx
	awk -f awk2.tmp RXI.Xdefaults		>> RXI.tmpx
	mv RXI.tmpx RXI.tmp
	@rm -f awk.tmp awk2.tmp

RXI.tmp2: RXI_Env_Menu Makefile version.info
	rm -f RXI.tmp2
	awk '{ print "/* " $$0 " */"; }' version.info	>  RXI.tmpx
	echo ''						>> RXI.tmpx
	cat RXI_Env_Menu 				>> RXI.tmpx
	mv RXI.tmpx RXI.tmp2

rxi.man: rxi.man.tmpl Makefile version.info
	rm -f rxi.man
	@( echo '/@VERSION@/ {' ; \
	   awk '{ printf "print %c%s%c;", 34, $$0, 34; }' version.info ; \
	   echo ' next;}' ; \
	   echo '{ print; }' ; \
	) > awk.tmp
	awk -f awk.tmp rxi.man.tmpl > rxi.many
	d="`awk '/ [12][90][0-9][0-9]/ {print $$0;exit;}' version.info`" ; \
	    $(TMPL) -e 's=@DATE@='"$$d"'=g' rxi.many > rxi.manx
	rm -f awk.tmp rxi.many
	mv rxi.manx rxi.man

version.info: rcg.h main.o
	@(echo 'BEGIN { GO = 0; }' ; \
	  echo '/RatRXIVersion\[\]/                   { GO = 1; next; }' ; \
	  echo '/^ *0 *\};/ || (GO == 1 && /#ifdef /) { GO = 0; exit; }' ; \
	  echo 'GO == 1 { print $$0; }' ; \
	) > awk.tmp
	awk -f awk.tmp rcg.h | sed -e 's=", *==g' -e 's= *"==g' > version.info

#==============================================================================
# Install Executables
#==============================================================================

install.all:
	$(RECURSIVEMAKE) install.all-all

install.all-all: install.dirs install.man  install.fonts  install

install.man: install.openwin.check
	$(RECURSIVEMAKE) install.man-all

install.man-all: install.dirs rxi.man
	$(INSTALL) -c $(INSTMANFLAGS) rxi.man $(MANDIR)/$(MANFILE)
	-man rxi > /dev/null
	rm -f rxi.man

install: install.openwin.check
	$(RECURSIVEMAKE) install-pgm

install-pgm: install.dirs $(PROGRAMS) RXI.tmp RXI.tmp2
	if [ -f $(BINDIR)/rxi ] ; then \
		mv $(BINDIR)/rxi $(BINDIR)/rxi.old ; \
	else \
		echo New installation. ; \
	fi
	$(INSTALL) -c $(INSTAPPFLAGS) rxi      $(BINDIR)
	$(INSTALL) -c $(INSTDEFFLAGS) RXI.tmp  $(XAPPLOADDIR)/RXI
	$(INSTALL) -c $(INSTDEFFLAGS) RXI.tmp2 $(XAPPLOADDIR)/RXI_Env_Menu
	rm -f RXI.tmp RXI.tmp2

install.openwin.check:
	@echo '============================================================'
	@echo 'The $$OPENWINHOME environment variable must be set, by you,'
	@echo 'to indicate the main OpenLook/NeWS directory.  This is the'
	@echo 'same variable that allows you to run OpenLook and the NeWS'
	@echo 'server.  First we check to make sure that $$OPENWINHOME is'
	@echo 'part of the current environment.  If this next command'
	@echo 'fails then set the OPENWINHOME variable to an appropriate'
	@echo 'value.  If you do not know what value to use then see'
	@echo 'your system administrator before proceeding further.'
	@echo '============================================================'
	set -u ; ls $(OPENWIN) > /dev/null

install.dirs: install.openwin.check \
		$(BINDIR) $(FONTDIR) $(MANDIR) $(XAPPLOADDIR)

$(BINDIR):
	mkdir -p $(BINDIR)

$(FONTDIR):
	mkdir -p $(FONTDIR)

$(MANDIR):
	mkdir -p $(MANDIR)

$(XAPPLOADDIR):
	mkdir -p $(XAPPLOADDIR)

#==============================================================================
# Fonts
#==============================================================================

install.fonts: install.openwin.check
	$(RECURSIVEMAKE) install.fonts-all

install.fonts-all: install.dirs
	for bdf in fixed-screen-*.bdf ; do \
	    $(OPENWIN)/bin/dumpfont -f 200 -d $(FONTDIR) $$bdf ; \
	done
	@echo "Please ignore any (Encoding: unknown) messages that may appear here."
	( cd $(FONTDIR) ; $(RM) *.ff ; \
		$(OPENWIN)/bin/bldfamily -f 40 ) \
		| tee bldfamily.log \
		| fgrep fixed
	@echo 'If this bin/psh command gets an error then please ignore it.'
	-echo /setdefaultfontpath exit | $(OPENWIN)/bin/psh
	@echo 'If this xset command gets an error then please ignore it.'
	-xset fp rehash

install.fonts.fallback:
	cp fixedscreen*.fb $(FONTDIR)
	( cd $(FONTDIR) ; \
		$(OPENWIN)/bin/bldfamily ) | tee bldfamily.log | fgrep fixed
	-echo /setdefaultfontpath exit | $(OPENWIN)/bin/psh

#==============================================================================

clean: install.openwin.check
	$(RM_CMD) \#*
	$(RM) $(PROGRAMS) *.snf
	$(RM) RXI.tmp* rxi.man rx rxsun4 rxsun3 version.info rxi-backup*
	$(RM) X11/*
	cd Xt  ; $(SUBDIRMAKE) clean
	cd Xmu ; $(SUBDIRMAKE) clean
	cd Xaw ; $(SUBDIRMAKE) clean

#==============================================================================
# RXI Maintenance
#==============================================================================

maint:
	$(MAINTMAKE) all

backup.fonts:
	for bdf in fixed-screen-*.bdf ; do \
	    $(OPENWIN)/bin/dumpfont -f 200 -d . $$bdf ; \
	done

backup.relink:
	$(MAINTMAKE) relink

backup: backup.fonts backup.relink
	sed -e 's/\(#define *[a-zA-Z_0-9]* *\)1/\10/g' RXI_Env_Menu > foo
	mv foo RXI_Env_Menu
	rm -f rxi-backup version.info RXI.Tmp RXI.Tmp2
	chmod -R ug+rw *
	tar cfelv - . > ../rxi-backup$$$$ ; \
	    mv ../rxi-backup$$$$ ./rxi-backup

restore: rxi-backup
	tar xf ./rxi-backup
	for hfile in *.hh ; do \
	    mv $$hfile `echo $$hfile | sed -e 's/\.hh/.h/g'` ; \
	done
	sleep 2
	touch *.o
	sleep 2
	touch $(PROGRAMS)
	rm rxi-backup

deinstall:
	rm -f $(BINDIR)/rxi
	rm -f $(XAPPLOADDIR)/RXI*
	rm -f $(FONTDIR)/fixed-screen-{r,b,wr,wb}-{11,12,13,14,15,16}.snf
	( cd $(FONTDIR) ; \
		$(OPENWIN)/bin/bldfamily ) | tee bldfamily.log | fgrep fixed
	-echo /setdefaultfontpath exit | $(OPENWIN)/bin/psh

#==============================================================================
# dependencies generated by makedepend
# DO NOT DELETE
#==============================================================================

button.o:   ptyx.h data.h error.h menu.h ratmenu.h  
charproc.o: ptyx.h VTparse.h data.h error.h main.h menu.h ratmenu.h rcg.h 
cursor.o:   ptyx.h  
data.o:     ptyx.h data.h 
input.o:    ptyx.h data.h ratmenu.h 
main.o:     ptyx.h data.h error.h main.h rcg.h
menu.o:     menu.h ptyx.h data.h 
misc.o:     ptyx.h data.h error.h gray.ic wait.ic waitmask.ic ratmenu.h 
screen.o:   ptyx.h error.h 
scrollbar.o:ptyx.h data.h error.h   
tabs.o:     ptyx.h  
util.o:     ptyx.h data.h error.h 
VTPrsTbl.o: VTparse.h 
RMForm.o:   ratmenu.h RMLabelP.h RMLabel.h RMSubP.h RMSub.h RMCommandP.h \
	    RMCommand.h RMFormP.h RMForm.h
ratmenu.o:  ratmenu.h RMShellP.h RMShell.h RMLabelP.h RMLabel.h RMSubP.h \
            RMSub.h ptyx.h data.h menu.h
RMShell.o:  ratmenu.h RMShellP.h RMShell.h 
RMLabel.o:  RMLabelP.h RMLabel.h   
RMSub.o:    RMSubP.h RMSub.h 
RmCommand.o:RMCommandP.h RMCommand.h RMCommandI.h