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

⟦317b7336a⟧ TextFile

    Length: 12124 (0x2f5c)
    Types: TextFile
    Names: »Makefile«

Derivation

└─⟦d10a02448⟧ Bits:30000409 8mm tape, Rational 1000, ENVIRONMENT, D_12_7_3
    └─ ⟦fc9b38f02⟧ »DATA« 
        └─⟦8e9e227a9⟧ 
            └─⟦0b3b13f5b⟧ 
                └─ ⟦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.source- Installs the rxi font sources into the system's
#			  font source area.
#   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
#	XBINDIR		- where X Windows executables currently 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.

        DESTDIR = /usr
         BINDIR = $(DESTDIR)/bin/X11
        XBINDIR = $(DESTDIR)/bin/X11
        FONTDIR = $(DESTDIR)/lib/X11/fonts/misc
         MANDIR = $(DESTDIR)/man/mann
    XAPPLOADDIR = $(DESTDIR)/lib/X11/app-defaults

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

        MANFILE = rxi.n

#---Uncompiled fonts are placed here so that they can be compiled and
#   installed as part of a full MIT X11 rebuild/installation.

            TOP = 
        FONTSRC = $(TOP)/src/x/fonts/bdf/misc

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

             CC = cc
             FC = $(XBINDIR)/bdftopcf -t
             CP = cp
        INSTALL = install
             LD = ld
      MKFONTDIR = $(XBINDIR)/mkfontdir
             MV = mv
             RM = rm -f
          SHELL = /bin/sh

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

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

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

 RECURSIVEMAKES = $(ALLMAKES) \
                  INCLUDES="$(INCLUDES)" \
                  LDFLAGS="$(LDFLAGS)" \
		  LIBDIRS="$(LIBDIRS)"

  RECURSIVEMAKE = make $(RECURSIVEMAKES) $(MFLAGS)

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

    SUBDIRMAKES = $(ALLMAKES) \
                  INCLUDES="-I.. $(INCLUDES)" \
                  LDFLAGS="$(LDFLAGS)" \
		  LIBDIRS="$(LIBDIRS)"

     SUBDIRMAKE = make $(SUBDIRMAKES) $(MFLAGS)

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

  MAINTINCLUDES = -I`pwd` -I$$X11R5/include -I/src/X/block_all

     MAINTMAKES = $(ALLMAKES) \
		  INCLUDES="$(MAINTINCLUDES) $(INCLUDES)" \
                  LDFLAGS="-Bstatic -Qoption ld -M" \
                  DESTDIR=$$X11R5 \
                  XBINDIR=$$X11R5/bin \
		  LIBDIRS="-L$$X11R5/lib"

      MAINTMAKE = make $(MAINTMAKES)     $(MFLAGS)

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

   INSTUIDFLAGS = -m 4755
   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.
    intLDFLAGS  = $(LDFLAGS) $(intLIBDIRS) -assert nosymbolic
    intLIBDIRS  = $(LIBDIRS)

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

           XLIB = -lX11
       XTOOLLIB = -lXt
         XMULIB = -lXmu
         XAWLIB = -lXaw

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

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 xallkeys xdumpfp xsetfp RXI.tmp RXI.tmp2 rxi.man

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

all::
	$(RECURSIVEMAKE) all-programs

all-programs: $(PROGRAMS)

rxi: $(OBJS1)
	$(RM) $@
	$(CC) -o $@ $(intLDFLAGS) $(OBJS1) \
		$(XAWLIB) $(XTOOLLIB) $(XMULIB) $(XLIB) -ltermcap

xallkeys: xallkeys.o
	$(RM) $@
	$(CC) -o $@ $(intLDFLAGS) xallkeys.o $(XLIB)

xdumpfp: xdumpfp.o
	$(RM) $@
	$(CC) -o $@ $(intLDFLAGS) xdumpfp.o $(XLIB)

xsetfp: xsetfp.o
	$(RM) $@
	$(CC) -o $@ $(intLDFLAGS) xsetfp.o $(XLIB)

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

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

RXI_ENV = $(XAPPLOADDIR)/RXI_Env_Menu

RXI.tmp: RXI.Xdefaults Makefile version.info
	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

rx: rx.tmpl Makefile
	$(TMPL) rx.tmpl > rx

version.info: rcg.h
	@(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: install.man  install.fonts  install

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

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

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

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

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

install.fonts:
	for bdf in fixed-screen-*.bdf ; do \
	    pcf=`echo $$bdf | sed 's/\.bdf/.pcf/g'` ; \
	    echo $$bdf '=>' $(FONTDIR)/$$pcf ; \
	    $(FC) $(FCFLAGS) $$bdf > $(FONTDIR)/$$pcf ; \
	done
	( cd $(FONTDIR) ; \
		mv fonts.dir fonts.dir.`date | sed -e 's/ /-/g'` ; \
		$(MKFONTDIR) . )
	@echo 'This call on xset may not work.  Don'"'"'t worry about it.'
	-xset fp rehash

install.fonts.fallback:
	ln -s bdftopcf.exe bdftopcf
	ln -s mkfontdir.exe mkfontdir
	$(RECURSIVEMAKE) "FC=`pwd`/bdftopcf -t" \
			 MKFONTDIR=`pwd`/mkfontdir \
		install.fonts
	rm bdftopcf
	rm mkfontdir

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

clean:
	$(RM) $(PROGRAMS) *.pcf
	$(RM) RXI.tmp* rxi.man version.info rxi-backup*
	$(RM_CMD) \#*

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

maint:
	$(MAINTMAKE) all

backup.fonts:
	cp $(XBINDIR)/bdftopcf bdftopcf.exe
	cp $(XBINDIR)/mkfontdir mkfontdir.exe
	for bdf in fixed-screen-*.bdf ; do \
	    pcf=`echo $$bdf | sed 's/\.bdf/.pcf/g` ; \
	    echo $$bdf ' -> ' $$pcf ; \
	    $(FC) $$bdf > $$pcf ; \
	done

backup.relink:
	$(MAINTMAKE) relink

backup:
	$(MAINTMAKE) backup-programs

backup-programs: backup.fonts backup.relink
	$(RM) Makefile.*
	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}-*.pcf
	( cd $(FONTDIR) ; $(MKFONTDIR) . )
	-xset fp rehash

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

# 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 RMForm.h RMFormP.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 RMCommandP.h RMCommand.h
RmCommand.o:RMCommandI.h RMCommandP.h RMCommand.h