File: macmake

package info (click to toggle)
pgplot5 5.2.2-19.7
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid, trixie
  • size: 7,188 kB
  • sloc: fortran: 39,795; ansic: 22,554; objc: 1,534; sh: 1,298; makefile: 267; pascal: 233; perl: 209; tcl: 190; awk: 51; csh: 25
file content (837 lines) | stat: -rw-r--r-- 21,935 bytes parent folder | download | duplicates (15)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
Echo Usage: macmake  n
Expects current directory to be top level directory of the PGPLOT distribution. n
Also sys_mac needs to be a subdirectory of current directory. n
drivers.list needs to be in current directory. n
Some error checking is done to ensure that all the files are in n
their proper places.  The library is built in current directory. n

# PGPLOT source directories.
#-----------------------------------------------------------------------
Set SRCDIR :src:
Set DEMDIR :examples:
Set FNTDIR :fonts:
Set DRVDIR :drivers:
Set GENDIR :sys:
Set SYSDIR :sys_mac:

# FCOMPL contains the name of the fortran compiler.  FFLAGC contains the
# compiler options for the pgplot routines.  FFLAGD contains the compiler
# options used for the example programs.  To produce 68020 or
# or 68030 code, add -mc68020 to FFLAGC or FFLAGD.  If you to produce
# 68881 or 68882 code, add -mc68881 to FFLAGC or FFLAGD.  If you do
# use the 68020 or the 68881 then you should used them when compiling the
# other files that are link with the pgplot library.  If you use the 68881
# option then you also need to link in the FPU libraries, 
# {FLibraries}IntrinsicLibFPU.o", "{FLibraries}FSANELibFPU.o".  FLINK contains
# the name of the fortran link command used for creating the example programs.
# If mc68881 is used to create pgplot.lib, change FLINK to LinkFortranFPU 
# instead of LinkFortran.  However, I did not get pgdemo1 to work with mc68881.
# The other example programs work fine.
Set FCOMPL  FORTRAN
Set FFLAGC  '-u -saveall -b -opt=0 -bkg=0 -mc68020'
Set FFLAGD  '-u -saveall -b -opt=0 -bkg=0 -mc68020'
Set FLINK LinkFortran

# FFLAGU contains the compiler options for create_grexec, create_doc, and
# pgpack.  FLINK contains the link options for these same programs. Using
# the mc68881 compiler option probably will not speed up performance in
# these programs because very little real operations are performed.  I set
# the optimization lower since compile time is more important.  I also set 
# the background option higher since these programs do not call many
# subroutines.
Set FFLAGU '-opt=0 -bkg=3 -mc68020'

# Determine name of script file which sets the memory partition size.
If "{MPW}"Scripts:AddSizeResource == `Exists -f "{MPW}"Scripts:AddSizeResource`
    Set SizRes AddSizeResource
Else if "{MPW}"Scripts:Fsize == `Exists -f "{MPW}"Scripts:Fsize`
    Set SizRes Fsize
Else
    Echo nError: Could not find either AddSizeResource or Fsize in the "{MPW}"Scripts:  n
folder.  They are needed to change the memory setting in the demo programs. n
	Exit
End


# We need a drivers.list file in the current directory, from which to
# determine the drivers to be compiled.

If 'drivers.list' == `Exists -f drivers.list`
    Echo `Date -t` 'Selecting uncommented drivers from drivers.list'
Else
   Echo `Date -t` 'Could not find drivers.list.  Please specify required ' n
  'drivers by un-commenting them in drivers.list.  Then re-run'
  Exit 1
End

# Get a list of driver names.
Set driv_list ''
Echo `Date -t` "Found drivers"
For Driver in `Search -q -r ! drivers.list | Sort -unique -f 1 | StreamEdit -e '/DRIV/ Replace /DRIV/ "DRIV"'`
	Set driv_list "{driv_list} {Driver}.f"
	Echo {Driver}'.f'
End 


# Language Systems FORTRAN compiler expects their include files to appear in the
# directory in which you actually do the compilation.

Duplicate -y {SRCDIR}.inc :

#-----------------------------------------------------------------------
# Routine lists:
#   PG_ROUTINES: basic PGPLOT routines (Fortran-77).
#   PG_NON_STANDARD: non-Fortran-77 aliases for basic routines.
#   GR_ROUTINES: support routines, not called directly by applications
#	(Fortran-77).
#   SYSTEM_ROUTINES: potentially non-portable routines, usually
#	operating-system dependent.
#   OBSOLETE_ROUTINES: obsolete routines used by some programs.
#   DEMOS: demonstration programs
#-----------------------------------------------------------------------
Set PG_ROUTINES "
 pgarro.f 
 pgask.f  
 pgband.f 
 pgbbuf.f 
 pgbeg.f  
 pgbin.f  
 pgbox.f  
 pgbox1.f 
 pgcirc.f 
 pgcl.f   
 pgcn01.f 
 pgcnsc.f 
 pgconb.f 
 pgconl.f 
 pgcons.f 
 pgcont.f 
 pgconx.f 
 pgcp.f   
 pgctab.f 
 pgcurs.f 
 pgdraw.f 
 pgebuf.f 
 pgend.f  
 pgenv.f  
 pgeras.f 
 pgerrb.f 
 pgerrx.f 
 pgerry.f 
 pgetxt.f 
 pgfunt.f 
 pgfunx.f 
 pgfuny.f 
 pggray.f 
 pghi2d.f 
 pghis1.f 
 pghist.f 
 pghtch.f 
 pgiden.f 
 pgimag.f 
 pglab.f  
 pglcur.f 
 pgldev.f 
 pglen.f  
 pgline.f 
 pgmove.f 
 pgmtxt.f 
 pgncur.f 
 pgnoto.f 
 pgnpl.f  
 pgnumb.f 
 pgolin.f 
 pgpage.f 
 pgpanl.f 
 pgpap.f  
 pgpixl.f 
 pgpnts.f 
 pgpoly.f 
 pgpt.f   
 pgptxt.f 
 pgqah.f  
 pgqcf.f  
 pgqch.f  
 pgqci.f  
 pgqcir.f 
 pgqcol.f 
 pgqcr.f  
 pgqcs.f  
 pgqfs.f  
 pgqhs.f  
 pgqinf.f 
 pgqitf.f 
 pgqls.f  
 pgqlw.f  
 pgqpos.f 
 pgqtbg.f 
 pgqtxt.f 
 pgqvp.f  
 pgqvsz.f 
 pgqwin.f 
 pgrect.f 
 pgrnd.f  
 pgrnge.f 
 pgsah.f  
 pgsave.f 
 pgscf.f  
 pgsch.f  
 pgsci.f  
 pgscir.f 
 pgscr.f  
 pgscrn.f 
 pgsfs.f  
 pgshls.f 
 pgshs.f  
 pgsitf.f 
 pgsls.f  
 pgslw.f  
 pgstbg.f 
 pgsubp.f 
 pgsvp.f  
 pgswin.f 
 pgtbox.f 
 pgtext.f 
 pgupdt.f 
 pgvect.f 
 pgvsiz.f 
 pgvstd.f 
 pgvw.f   
 pgwedg.f 
 pgwnad.f 
"

Set PG_NON_STANDARD "
 pgadvance.f 
 pgbegin.f 
 pgcurse.f 
 pglabel.f 
 pgmtext.f 
 pgncurse.f 
 pgpaper.f 
 pgpoint.f 
 pgptext.f 
 pgvport.f 
 pgvsize.f 
 pgvstand.f 
 pgwindow.f 
"

Set GR_ROUTINES "
 grarea.f 
 grbpic.f 
 grchsz.f 
 grclip.f 
 grclos.f 
 grclpl.f 
 grctoi.f 
 grcurs.f 
 grdot0.f 
 grdtyp.f 
 gresc.f  
 grepic.f 
 gretxt.f 
 grfa.f   
 grfao.f  
 grgfil.f 
 grgray.f 
 grimg0.f 
 grimg1.f 
 grimg2.f 
 grimg3.f 
 gritoc.f 
 grldev.f 
 grlen.f  
 grlin0.f 
 grlin1.f 
 grlin2.f 
 grlin3.f 
 grlina.f 
 grmcur.f 
 grmker.f 
 grmova.f 
 grmsg.f 
 gropen.f 
 grpage.f 
 grpars.f 
 grpixl.f 
 grpocl.f 
 grprom.f 
 grpxpo.f 
 grpxps.f 
 grpxpx.f 
 grpxre.f 
 grqcap.f 
 grqci.f  
 grqcol.f 
 grqcr.f  
 grqdev.f 
 grqdt.f  
 grqfnt.f 
 grqls.f  
 grqlw.f  
 grqpos.f 
 grqtxt.f 
 grqtyp.f 
 grquit.f 
 grrec0.f 
 grrect.f 
 grsci.f  
 grscr.f  
 grsetc.f 
 grsets.f 
 grsfnt.f 
 grsize.f 
 grskpb.f 
 grslct.f 
 grsls.f  
 grslw.f  
 grsyds.f 
 grsymk.f 
 grsyxd.f 
 grterm.f 
 grtext.f 
 grtoup.f 
 grtrim.f 
 grtrn0.f 
 grtxy0.f 
 grvct0.f 
 grwarn.f 
 grxhls.f 
 grxrgb.f 
"

Set SYSTEM_ROUTINES "
 grdate.f 
 grflun.f 
 grgcom.f 
 grgenv.f 
 grglun.f 
 grgmem.f 
 grgmsg.f 
 grlgtr.f 
 groptx.f 
 grsy00.f 
 grtrml.f 
 grtter.f 
 gruser.f 
"

Set OBSOLETE_ROUTINES "
 grchar.f 
 grchr0.f 
 grdat2.f 
 grgtc0.f 
 grinqfont.f 
 grinqli.f 
 grinqpen.f 
 grlinr.f 
 grmark.f 
 grmovr.f 
 grsetfont.f 
 grsetli.f 
 grsetpen.f 
 grtran.f 
 grvect.f 
 pgsetc.f 
 pgsize.f 
"

Set DEMOS "
 pgdemo1 
 pgdemo2 
 pgdemo3 
 pgdemo4 
 pgdemo5 
 pgdemo6 
 pgdemo7 
 pgdemo8 
 pgdemo9 
 pgdemo10 
 pgdemo11 
 pgdemo12 
"

Set MAC_ROUTINES "pgblck.f"

Begin
Echo -n "# Makefile for PGPLOT. n
# This file is automatically generated.  n
# n
# This generates the PGPLOT binary files (libraries and demos) in the n
# current default directory. n
#----------------------------------------------------------------------- n
#	PGPLOT subdirectories n
SRCDIR = {SRCDIR} n
DEMDIR = {DEMDIR} n
FNTDIR = {FNTDIR} n
DRVDIR = {DRVDIR} n
SYSDIR = {SYSDIR} n
GENDIR = {GENDIR} n
# n
# FCOMPL contains the name of the fortran compiler.  FFLAGC contains the n
# compiler options for the pgplot routines.  FFLAGD contains the compiler n
# options used for the example programs.  To produce 68020 or n
# or 68030 code, add -mc68020 to FFLAGC or FFLAGD.  If you to produce n
# 68881 or 68882 code, add -mc68881 to FFLAGC or FFLAGD.  If you do n
# use the 68020 or the 68881 then you should used them when compiling the n
# other files that are link with the pgplot library.  If you use the 68881 n
# option then you also need to link in the FPU libraries,  n
# "{FLibraries}IntrinsicLibFPU.o", "{FLibraries}FSANELibFPU.o".  FLINK contains n
# the name of the fortran link command used for creating the example programs. n
# If mc68881 is used to create pgplot.lib, change FLINK to LinkFortranFPU  n
# instead of LinkFortran.  However, I did not get pgdemo1 to work with mc68881. n
# The other example programs work fine. n
# FFLAGU contains the compiler options for create_grexec, create_doc, and n
# pgpack.  FLINK contains the link options for these same programs. Using n
# the mc68881 compiler option probably will not speed up performance in n
# these programs because very little real operations are performed.  I set n
# the optimization lower since compile time is more important.  I also set n
# the background option higher since these programs do not call many n
# subroutines. n
# n
FCOMPL = {FCOMPL} n
FFLAGC = {FFLAGC} n
FFLAGD = {FFLAGD} n
FFLAGU = {FFLAGU} n
FLINK = {FLINK} n
#  n
#  Name of script to set memory size in demo programs. n
#  n
SizRes = {SizRes}  n
# n
# Routine lists. n
# n
"
End > pgplot.make

Echo `Date -t` "Finding files in PG Standard routines"

Begin
  Set PG_ROUTINES_F ""
  Quote -n  PG_ROUTINES = 
  For files in {PG_ROUTINES}
  	Echo ' '
    If {SYSDIR}{files} == `Exists -f {SYSDIR}{files}`
	   Set PG_ROUTINES_f "{PG_ROUTINES_f} {SYSDIR}{FILES}"
	   Echo -n tt '{SYSDIR}'{files}.o 
	Else 
	   Set PG_ROUTINES_f "{PG_ROUTINES_f} {SRCDIR}{FILES}"
	   Echo -n tt '{SRCDIR}'{files}.o
	End 
  End
  Echo
  Echo
End >> pgplot.make

Echo `Date -t` "Finding files in PG Non Standard routines"

Begin
  Set PG_NON_STANDARD_f ""
  Quote -n PG_NON_STANDARD =
  For files in {PG_NON_STANDARD}
    Echo ' '
    If {SYSDIR}{files} == `Exists -f {SYSDIR}{files}`
	   Set PG_NON_STANDARD_f "{PG_NON_STANDARD_f} {SYSDIR}{FILES}"
	   Echo -n tt '{SYSDIR}'{files}.o 
	Else 
	   Set PG_NON_STANDARD_f "{PG_NON_STANDARD_f} {SRCDIR}{FILES}"
	   Echo -n tt '{SRCDIR}'{files}.o
	End
  End
  Echo
  Echo
End >> pgplot.make

Echo `Date -t` "Finding files in GR Routines"

Begin
  Set GR_ROUTINES_f ""
  Quote -n GR_ROUTINES = 
  For files in {GR_ROUTINES}
  	Echo ' '
    If {SYSDIR}{files} == `Exists -f {SYSDIR}{files}`
	   Set GR_ROUTINES_f "{GR_ROUTINES_f} {SYSDIR}{FILES}"
	   Echo -n tt '{SYSDIR}'{files}.o 
	Else 
	   Set GR_ROUTINES_f "{GR_ROUTINES_f} {SRCDIR}{FILES}"
	   Echo -n tt '{SRCDIR}'{files}.o
	End
  End
  Echo
  Echo
End >> pgplot.make

Echo `Date -t` "Finding files in System Routines"

Begin
  Set SYSTEM_ROUTINES_f ""
  Quote -n SYSTEM_ROUTINES =
  For files in {SYSTEM_ROUTINES}
  Echo ' '
    If {SYSDIR}{files} == `Exists -f {SYSDIR}{files}`
	   Set SYSTEM_ROUTINES_f "{SYSTEM_ROUTINES_f} {SYSDIR}{FILES}"
	   Echo -n tt '{SYSDIR}'{files}.o 
	Else 
	   Set SYSTEM_ROUTINES_f "{SYSTEM_ROUTINES_f} {GENDIR}{FILES}"
	   Echo -n tt '{GENDIR}'{files}.o 
	End
  End
  Echo
  Echo
End >> pgplot.make

Echo `Date -t` "Finding files in Driver Routines"

Begin
  Set Driv_list_f ""
  Quote -n  DRIV_LIST = 
  For files in {driv_list}
  	Echo ' '
    If {SYSDIR}{files} == `Exists -f {SYSDIR}{files}`
	   Set Driv_list_f "{Driv_list_f} {SYSDIR}{FILES}"
	   Echo -n tt '{SYSDIR}'{files}.o 
	Else 
	   Set Driv_list_f "{Driv_list_f} {DRVDIR}{FILES}"
	   Echo -n tt '{DRVDIR}'{files}.o
	End 
  End
  Echo
  Echo
End >> pgplot.make

Echo `Date -t` "Finding files in Obsolete Routines"

Begin
  Set OBSOLETE_ROUTINES_f ""
  Quote -n  OBSOLETE_ROUTINES = 
  For files in {OBSOLETE_ROUTINES}
  	Echo ' '
    If {SYSDIR}{files} == `Exists -f {SYSDIR}{files}`
	   Set OBSOLETE_ROUTINES_f "{OBSOLETE_ROUTINES_f} {SYSDIR}{FILES}"
	   Echo -n tt '{SYSDIR}'{files}.o 
	Else 
	   Set OBSOLETE_ROUTINES_f "{OBSOLETE_ROUTINES_f} {SRCDIR}{FILES}"
	   Echo -n tt '{SRCDIR}'{files}.o 
	End
  End
  Echo
  Echo
End >> pgplot.make

Begin
  Set MAC_ROUTINES_f ""
  Quote -n  MAC_ROUTINES = 
  For files in {MAC_ROUTINES}
  	Echo ' '
	Echo -n tt '{SYSDIR}'{files}.o 
	Set MAC_ROUTINES_f "{MAC_ROUTINES_f} {SYSDIR}{files}"
  End
  Echo
  Echo
End >> pgplot.make



#-----------------------------------------------------------------------
# Target pgplot.lib is used to built the PGPLOT subroutine library.
# pgplot.lib is the primary PGPLOT object library.
#-----------------------------------------------------------------------

Echo `Date -t` 'Writing pgplot.lib target.'

Begin
Echo "# n
#----------------------------------------------------------------------- n
# Rules for compiling the .o files n
#----------------------------------------------------------------------- n
#"
Echo 'all  pgplot.lib grfont.dat demos'
Echo 'pgplot.lib  {PG_ROUTINES} {PG_NON_STANDARD} {GR_ROUTINES} '
Echo  'grexec.f.o {DRIV_LIST} {SYSTEM_ROUTINES} {MAC_ROUTINES}'
Echo  t  'Lib -f -mf {PG_ROUTINES} '
Echo tt '{PG_NON_STANDARD} '
Echo tt '{GR_ROUTINES} '
Echo tt '{DRIV_LIST} '
Echo tt '{SYSTEM_ROUTINES} '
Echo tt '{MAC_ROUTINES} '
Echo tt 'grexec.f.o  -o pgplot.lib'
End >> pgplot.make

Echo `Date -t` 'Determining object file dependencies.'

# List source code file dependencies explicitly.
Echo `Date -t` 'Writing PG_ROUTINES dependencies'

Begin
  For file in {PG_ROUTINES_f}
	If `evaluate "{file}" =~ '/{()1}()2/'`
		if {1} == SRCDIR
		   Set dir `Echo -n {SRCDIR}{2}`
		Else If {1} == DEMDIR
		   Set dir `Echo -n {DEMDIR}{2}`
		Else If {1} == FNTDIR
		   Set dir `Echo -n {FNTDIR}{2}`
		Else If {1} == DRVDIR
		   Set dir `Echo -n {DRVDIR}{2}`
		Else If {1} == GENDIR
		   Set dir `Echo -n {GENDIR}{2}`
		Else If {1} == SYSDIR
		   Set dir `Echo -n {SYSDIR}{2}`
		End
	End
	Echo -n {file}.o   {file}; 
	search  -sf -i -q /include'grpckg1.inc'/  "{dir}" > Dev:Null && Echo -n " grpckg1.inc"; 
	search  -sf -i -q /include'pgplot.inc'/  "{dir}" > Dev:Null && Echo -n " pgplot.inc"
	Echo  nt '{FCOMPL} ' {file} ' {FFLAGC}'
  End
End >> pgplot.make

Echo `Date -t` 'Writing PG_NON_STANDARD dependencies'

Begin
  For file in {PG_NON_STANDARD_f}
	If `evaluate "{file}" =~ '/{()1}()2/'`
		if {1} == SRCDIR
		   Set dir `Echo -n {SRCDIR}{2}`
		Else If {1} == DEMDIR
		   Set dir `Echo -n {DEMDIR}{2}`
		Else If {1} == FNTDIR
		   Set dir `Echo -n {FNTDIR}{2}`
		Else If {1} == DRVDIR
		   Set dir `Echo -n {DRVDIR}{2}`
		Else If {1} == GENDIR
		   Set dir `Echo -n {GENDIR}{2}`
		Else If {1} == SYSDIR
		   Set dir `Echo -n {SYSDIR}{2}`
		End
	End
	Echo -n {file}.o   {file}; 
	search  -sf -i -q /include'grpckg1.inc'/  "{dir}" > Dev:Null && Echo -n " grpckg1.inc"; 
	search  -sf -i -q /include'pgplot.inc'/  "{dir}" > Dev:Null && Echo -n " pgplot.inc"
	Echo  nt '{FCOMPL} ' {file} ' {FFLAGC}'
  End
End >> pgplot.make

Echo `Date -t` 'Writing GR_ROUTINES dependencies'

Begin
  For file in {GR_ROUTINES_f}
	If `evaluate "{file}" =~ '/{()1}()2/'`
		if {1} == SRCDIR
		   Set dir `Echo -n {SRCDIR}{2}`
		Else If {1} == DEMDIR
		   Set dir `Echo -n {DEMDIR}{2}`
		Else If {1} == FNTDIR
		   Set dir `Echo -n {FNTDIR}{2}`
		Else If {1} == DRVDIR
		   Set dir `Echo -n {DRVDIR}{2}`
		Else If {1} == GENDIR
		   Set dir `Echo -n {GENDIR}{2}`
		Else If {1} == SYSDIR
		   Set dir `Echo -n {SYSDIR}{2}`
		End
	End
	Echo -n {file}.o   {file}; 
	search  -sf -i -q /include'grpckg1.inc'/  "{dir}" > Dev:Null && Echo -n " grpckg1.inc"; 
	search  -sf -i -q /include'pgplot.inc'/  "{dir}" > Dev:Null && Echo -n " pgplot.inc"
	Echo  nt '{FCOMPL} ' {file} ' {FFLAGC}'
  End
End >> pgplot.make

Echo `Date -t` 'Writing SYSTEM_ROUTINES dependencies'

Begin
  For file in {SYSTEM_ROUTINES_f}
	If `evaluate "{file}" =~ '/{()1}()2/'`
		if {1} == SRCDIR
		   Set dir `Echo -n {SRCDIR}{2}`
		Else If {1} == DEMDIR
		   Set dir `Echo -n {DEMDIR}{2}`
		Else If {1} == FNTDIR
		   Set dir `Echo -n {FNTDIR}{2}`
		Else If {1} == DRVDIR
		   Set dir `Echo -n {DRVDIR}{2}`
		Else If {1} == GENDIR
		   Set dir `Echo -n {GENDIR}{2}`
		Else If {1} == SYSDIR
		   Set dir `Echo -n {SYSDIR}{2}`
		End
	End
	Echo -n {file}.o   {file}; 
	search  -sf -i -q /include'grpckg1.inc'/  "{dir}" > Dev:Null && Echo -n " grpckg1.inc"; 
	search  -sf -i -q /include'pgplot.inc'/  "{dir}" > Dev:Null && Echo -n " pgplot.inc"
	Echo  nt '{FCOMPL} ' {file} ' {FFLAGC}'
  End
End >> pgplot.make

Echo `Date -t` 'Writing driv_list dependencies'

Begin
  For file in {Driv_list_f}
	If `evaluate "{file}" =~ '/{()1}()2/'`
		if {1} == SRCDIR
		   Set dir `Echo -n {SRCDIR}{2}`
		Else If {1} == DEMDIR
		   Set dir `Echo -n {DEMDIR}{2}`
		Else If {1} == FNTDIR
		   Set dir `Echo -n {FNTDIR}{2}`
		Else If {1} == DRVDIR
		   Set dir `Echo -n {DRVDIR}{2}`
		Else If {1} == GENDIR
		   Set dir `Echo -n {GENDIR}{2}`
		Else If {1} == SYSDIR
		   Set dir `Echo -n {SYSDIR}{2}`
		End
	End
	Echo -n {file}.o   {file}; 
	search  -sf -i -q /include'grpckg1.inc'/  "{dir}" > Dev:Null && Echo -n " grpckg1.inc"; 
	search  -sf -i -q /include'pgplot.inc'/  "{dir}" > Dev:Null && Echo -n " pgplot.inc"
	Echo  nt '{FCOMPL} ' {file} ' {FFLAGC}'
  End
  Echo grexec.f.o  grexec.f n
t '{FCOMPL} ' grexec.f ' {FFLAGC}' n
grexec.f  drivers.list {SYSDIR}create_grexec.f n
t  Directory '{SYSDIR}' n
t  '{FCOMPL}' create_grexec.f '{FFLAGU}' n
t  LinkFORTRANtool create_grexec create_grexec.f.o n
t  Move -y create_grexec :: n
t  Directory :: n
t create_grexec
End >> pgplot.make


Echo `Date -t` 'Writing MAC_ROUTINES dependencies'
#  Mac routines are always in {SYSDIR}, so don't need if structure
Begin
  For file in {MAC_ROUTINES_f}
	If `evaluate "{file}" =~ '/{()1}()2/'`
		Set dir `Echo -n {SYSDIR}{2}`
	End
	Echo -n {file}.o   {file}; 
	search  -sf -i -q /include'grpckg1.inc'/  "{dir}" > Dev:Null && Echo -n " grpckg1.inc"; 
	search  -sf -i -q /include'pgplot.inc'/  "{dir}" > Dev:Null && Echo -n " pgplot.inc"
	Echo  nt '{FCOMPL} ' {file} ' {FFLAGC}'
  End
End >> pgplot.make
Echo `Date -t` 'Writing OBSOLETE_ROUTINES dependencies'


Begin
	Echo 'pgplotold.lib  {OBSOLETE_ROUTINES}'
	Echo t Lib -f -mf ' {OBSOLETE_ROUTINES} -o pgplotold.lib'
End >> pgplot.make

Begin
  For file in {OBSOLETE_ROUTINES_f}
	If `evaluate "{file}" =~ '/{()1}()2/'`
		if {1} == SRCDIR
		   Set dir `Echo -n {SRCDIR}{2}`
		Else If {1} == DEMDIR
		   Set dir `Echo -n {DEMDIR}{2}`
		Else If {1} == FNTDIR
		   Set dir `Echo -n {FNTDIR}{2}`
		Else If {1} == DRVDIR
		   Set dir `Echo -n {DRVDIR}{2}`
		Else If {1} == GENDIR
		   Set dir `Echo -n {GENDIR}{2}`
		Else If {1} == SYSDIR
		   Set dir `Echo -n {SYSDIR}{2}`
		End
	End
	Echo -n {file}.o   {file}; 
	search  -sf -i -q /include'grpckg1.inc'/  "{dir}" > Dev:Null && Echo -n " grpckg1.inc"; 
	search  -sf -i -q /include'pgplot.inc'/  "{dir}" > Dev:Null && Echo -n " pgplot.inc"
	Echo  nt '{FCOMPL} ' {file} ' {FFLAGC}'
  End
End >> pgplot.make


#-----------------------------------------------------------------------
# Target "demos" is used to make the demo programs. They can also be made
# individually.
#-----------------------------------------------------------------------
Echo `Date -t` 'Writing Demos target'

Begin
  Echo -n 'demos  '
  For file in {DEMOS}
	Echo -n '{DEMDIR}'"{file} "
  End
  Echo 'pgplot.lib'
  Echo t 'Echo `Date -t` Creating demonstration programs.'
  For file in {DEMOS}
    Echo '{DEMDIR}'{file}  '{DEMDIR}'{file}.f.o pgplot.lib
	Echo t '{FLINK}' '{DEMDIR}'{file} '{DEMDIR}'{file}.f.o pgplot.lib
	Echo t AddResourceFile '{DEMDIR}'{file}
	If {file} == "pgdemo3"
		Echo t '{SizRes}' '{DEMDIR}'{file} 1024
	Else 
		Echo t '{SizRes}' '{DEMDIR}'{file} 512
    End
  End
  For file in {DEMOS}
	Echo '{DEMDIR}'{file}.f.o   '{DEMDIR}'{file}.f
	Echo t '{FCOMPL} {DEMDIR}'{file}.f ' {FFLAGD}'
  End
End >> pgplot.make

#-----------------------------------------------------------------------
# Target "grfont.dat" is the binary font file.
# This is created from grfont.txt with the "pgpack" program.
#    (a) compile the `pgpack' program; then
#    (b) run `pgpack' to convert the ASCII version of the font file
#    (grfont.txt) into the binary version (grfont.dat). When executed,
#    `pgpack' should report:
#	Characters defined:   996
#	Array cells used:   26732
#-----------------------------------------------------------------------
Echo `Date -t` 'Writing grfont.dat target.'
Begin
   Echo grfont.dat  '{FNTDIR}grfont.txt {SYSDIR}pgpack.f' n
	t Duplicate -y '{SYSDIR}pgpack.f {FNTDIR}' n
	t Directory '{FNTDIR}' n
	t If grfont.dat == '`Exists -f grfont.dat`' n
	tt Delete grfont.dat n
	t  End n
	t FORTRAN pgpack.f '{FFLAGU}' n
	t LinkFORTRANtool pgpack pgpack.f.o  n
	t 'Echo `Date -t` Executing pgpack, which takes a while and the ball does not spin. n'n
	t 'Should report: n'n
	t 'Characters defined:   996 n'n
	t 'Array cells used:   26732' n
	t pgpack n
	t 'Echo `Date -t` Finished creating grfont.dat.' n
	t Directory ::
End >> pgplot.make

Echo `Date -t` 'Writing pgplot.doc target.'
Begin
	Echo pgplot.doc  {SYSDIR}create_doc.f n
	t  Directory '{SYSDIR}' n
	t  '{FCOMPL}' create_doc.f '{FFLAGU}' n
	t  LinkFORTRANtool create_doc create_doc.f.o n
	t  Move -y create_doc :: n
	t  Directory :: n
	t 'Echo `Date -t` Executing create_doc, which takes a long time and the ball does not spin.' 
	Echo -n t create_doc '{SRCDIR}'
	For files in {PG_ROUTINES}
		Echo ' '
		Echo -n tt {files} 
	End 
	Echo
	Echo t 'Echo `Date -t` Finished creating pgplot.html and pgplot.doc.' 
End >> pgplot.make

Echo `Date -t` 'Writing clean target.'
Begin
	Echo clean  n
	t  Delete -i '{PG_ROUTINES} 'n
	t '{PG_NON_STANDARD} 'n
	t '{GR_ROUTINES} 'n
	t	grexec.f.o '{DRIV_LIST} 'n
	t '{SYSTEM_ROUTINES} 'n
	t '{MAC_ROUTINES}'
End >> pgplot.make

Echo `Date -t` 'Finished.'