Skip to content

Commit 2e4f5d2

Browse files
author
Neil Matthew
committed
Initial v1.21 with BDWGC and macOS support
1 parent 6022b6a commit 2e4f5d2

File tree

337 files changed

+728
-199716
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

337 files changed

+728
-199716
lines changed

Makefile

Lines changed: 46 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
#!/usr/bin/make
22

33
#------------ Compiler choice ---------
4-
#--- Allow for different flags if required ---
5-
64
CC="none"
7-
ARCH="$(shell arch)"
5+
ARCH="$(shell uname -m)"
86
OS="$(shell uname -s)"
97

108
ifeq ($(ARCH), "i386")
@@ -17,6 +15,9 @@ endif
1715

1816
ifeq ($(ARCH), "x86_64")
1917
CC=gcc
18+
ifeq ($(OS), "Darwin")
19+
CC=gcc -Wno-parentheses-equality -Wno-unused-value -Wno-parentheses -Wno-empty-body
20+
endif
2021
endif
2122

2223
ifeq ($(ARCH), "armv7l")
@@ -46,6 +47,18 @@ MANDIR=$(DESTDIR)/usr/share/man/man1
4647
INCDIR=$(DESTDIR)/usr/include/algol68
4748
APPDIR=$(DESTDIR)/usr/share/applications
4849

50+
#------------ macOS values -------------
51+
ifeq ($(OS), "Darwin")
52+
PKGDIR=$(DESTDIR)/usr/local/share/algol68toc
53+
DOCDIR=$(DESTDIR)/usr/local/share/doc/algol68toc
54+
BINDIR=$(DESTDIR)/usr/local/bin
55+
LIBDIR=$(DESTDIR)/usr/local/lib
56+
INFODIR=$(DESTDIR)/usr/local/share/info
57+
MANDIR=$(DESTDIR)/usr/local/share/man/man1
58+
INCDIR=$(DESTDIR)/usr/local/include/algol68
59+
APPDIR=$(DESTDIR)/usr/local/share/applications
60+
endif
61+
4962
#------------- Absolute directories ------------
5063
TOP:=$(shell pwd)
5164
VPATH:=$(TOP)/include
@@ -60,6 +73,7 @@ EXD=$(TOP)/examples
6073
LBD=$(TOP)/library
6174
LPD=$(TOP)/liba68prel
6275
QAD=$(TOP)/qad
76+
GCD=$(TOP)/bdwgc
6377

6478
ADIRS=a68config liba68prel src qad
6579
CDIRS=library a68config liba68prel src
@@ -86,9 +100,11 @@ QADFLAGS=-v -s -uname seedfile -staredit $(QADSTAR)
86100

87101
#------------ Programs -----------
88102
ALGOL=$(CTD)/a68toc
89-
90103
SHELL=/bin/sh
91104
INSTALL=$(shell which install) -g root -o root
105+
ifeq ($(OS), "Darwin")
106+
INSTALL=$(shell which install) -g wheel -o root
107+
endif
92108
INSTALLDATA=$(INSTALL) -m 644
93109
INSTALLPROG=$(INSTALL) -m 555
94110

@@ -99,16 +115,26 @@ export
99115
.PHONY : clean info uninstall
100116

101117
#-----Don't remake the documentation all the time----
102-
#all : c-stamp q-stamp d-stamp
103-
all : c-stamp q-stamp
118+
#all : g-stamp c-stamp q-stamp d-stamp
119+
all : g-stamp c-stamp q-stamp
104120

105121
remove :
106122
for d in $(ADIRS); do $(RM) $$d/*.c $$d/*.m; done
107123

108124
Translate : remove nameseed
109125
-for d in $(ADIRS); do $(MAKE) -C $$d Translate; done
110126

111-
c-stamp:
127+
g-stamp: $(GCD)/gc.a
128+
-mkdir -p include/gc
129+
cp -r $(GCD)/include/* include/algol68/gc
130+
cp $(GCD)/gc.a library/liba68gc.a
131+
touch g-stamp
132+
133+
$(GCD)/gc.a:
134+
tar zxvf bdwgc.tar.gz
135+
-$(MAKE) -C $(GCD) -f Makefile.direct check
136+
137+
c-stamp: g-stamp
112138
-for d in $(CDIRS); do $(MAKE) -C $$d; done
113139
touch c-stamp
114140

@@ -121,15 +147,20 @@ d-stamp :
121147
touch d-stamp
122148

123149
#install : c-stamp q-stamp d-stamp
124-
install : c-stamp q-stamp
150+
install : g-stamp c-stamp q-stamp
125151
$(INSTALL) -m 755 -d $(PKGDIR)
126152
$(INSTALL) -m 755 -d $(INCDIR)
127153
$(INSTALL) -m 755 -d $(INCDIR)/linux
154+
$(INSTALL) -m 755 -d $(INCDIR)/gc
155+
$(INSTALL) -m 755 -d $(INCDIR)/gc/extra
156+
$(INSTALL) -m 755 -d $(INCDIR)/gc/private
128157
$(INSTALL) -m 755 -d $(BINDIR)
129158
$(INSTALL) -m 755 -d $(LIBDIR)
130159
$(INSTALL) -m 755 -d $(INFODIR)
131160
$(INSTALL) -m 755 -d $(DOCDIR)
132161
$(INSTALL) -m 755 -d $(DOCDIR)/examples
162+
$(INSTALL) -m 755 -d $(DOCDIR)/examples/logic
163+
$(INSTALL) -m 755 -d $(DOCDIR)/examples/tests
133164
$(INSTALL) -m 755 -d $(DOCDIR)/pame
134165
$(INSTALL) -m 755 -d $(APPDIR)
135166
$(INSTALL) -m 755 -d $(MANDIR)
@@ -142,13 +173,14 @@ info :
142173
uninstall :
143174
-$(RM) $(BINDIR)/a68toc $(BINDIR)/resetseed $(BINDIR)/ca
144175
-install-info --quiet --remove $(INFODIR)/ctrans.info.gz $(INFODIR)/dir
145-
-$(RM) -r $(PKGDIR) $(DOCDIR)
146-
-$(RM) $(INFODIR)/ctrans.info.gz $(LIBDIR)/liba68.a $(LIBDIR)/liba68s.a \
176+
-$(RM) -rf $(PKGDIR) $(DOCDIR) $(INCDIR)
177+
-$(RM) $(INFODIR)/ctrans.info.gz $(LIBDIR)/liba68.a $(LIBDIR)/liba68s.a $(LIBDIR)/liba68gc.a \
147178
$(MANDIR)/a68toc.1.gz $(MANDIR)/ca.1.gz
148179

149180
dist-clean: clean
150-
-$(RM) -v c-stamp q-stamp d-stamp
181+
-$(RM) -v c-stamp q-stamp d-stamp g-stamp
151182
-$(RM) -r debian/tmp debian/algol68toc
183+
-$(RM) -rf bdwgc
152184

153185
nameseed : a68config/rctr liba68prel/rctr src/rctr qad/rctr
154186
for d in $(ADIRS); do cp $$d/rctr $$d/nameseed; done
@@ -163,14 +195,15 @@ clean:
163195
find $(TOP) \( -name '*~' -o -name '*.asv' -o -name '*##' \) \
164196
-exec $(RM) -v '{}' ';'
165197
-for d in $(ADIRS) $(DDIRS) library; do $(MAKE) -C $$d clean; done
198+
-$(MAKE) -C $(GCD) -f Makefile.direct clean
166199

167200
realclean:
168201
find $(TOP) \( -name '*~' -o -name '*.asv' -o -name '*##' \) \
169202
-exec $(RM) -v '{}' ';'
170203
-for d in $(ADIRS) $(DDIRS) library; do $(MAKE) -C $$d realclean; done
171204

172-
# Revision 1.20 2021/04/21 Neil Matthew
173-
# Port to 64-bit and ARM architectures
205+
vars:
206+
echo "NOR is $(NOR)"
174207

175208
# $Log: Makefile,v $
176209
# Revision 1.12 2012/01/04 17:18:45 sian

README.md

Lines changed: 0 additions & 99 deletions
This file was deleted.

README.original

Lines changed: 0 additions & 92 deletions
This file was deleted.

a68config/a68config.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -734,8 +734,8 @@ void BAAALIB(void) /* initialise DECS a68config */
734734
static A68_BOOL A_invoked = A68_FALSE;
735735

736736
/* --- Configuration information for this module */
737-
static char *A_config_arguments[] = {"/home/neil/Algol-68RS/algol68toc-1.20-debian/src/a68toc","-v","-uname","seedfile","-staredit","59LR","-lib","/home/neil/Algol-68RS/algol68toc-1.20-debian/a68config","-dir","/home/neil/Algol-68RS/algol68toc-1.20-debian/a68config","-dir",".","a68config.a68",""};
738-
static char *A_config_environment[] = {"A68_LIB=/home/neil/Algol-68RS/algol68toc-1.20-debian/a68config","A68_CDIR=","A68_DIR=","A68_STAREDIT=","A68_NAMESEED=nameseed","CTRANS_NAMESEED=",""};
737+
static char *A_config_arguments[] = {"/home/neil/Algol-68RS/algol68toc-1.21/src/a68toc","-v","-uname","seedfile","-staredit","59LR","-lib","/home/neil/Algol-68RS/algol68toc-1.21/a68config","-dir","/home/neil/Algol-68RS/algol68toc-1.21/a68config","-dir",".","a68config.a68",""};
738+
static char *A_config_environment[] = {"A68_LIB=/home/neil/Algol-68RS/algol68toc-1.21/a68config","A68_CDIR=","A68_DIR=","A68_STAREDIT=","A68_NAMESEED=nameseed","CTRANS_NAMESEED=",""};
739739
static char *A_config_modinfo_files[] = {""};
740740
static A_CONFIG_INFO A_config;
741741
/* --- end of configuration information */
@@ -750,11 +750,11 @@ A68_38 LBAALIB; /* procedure value */
750750
if( A_invoked ) return;
751751
A_invoked = A68_TRUE;
752752
/* --- Initialise configuration information */
753-
A_config.source_file = "/home/neil/Algol-68RS/algol68toc-1.20-debian/a68config/a68config.a68";
754-
A_config.translation_time = "Wed Apr 21 16:34:02 2021";
753+
A_config.source_file = "/home/neil/Algol-68RS/algol68toc-1.21/a68config/a68config.a68";
754+
A_config.translation_time = "Mon May 3 00:36:15 2021";
755755
A_config.ctrans_version = "Ctrans_34.6";
756756
A_config.name_seed = "AAAALIB (from seed file) ";
757-
A_config.spec_change_time = "Wed Apr 21 16:34:02 2021";
757+
A_config.spec_change_time = "Mon May 3 00:36:15 2021";
758758
A_config.arguments = A_config_arguments;
759759
A_config.environment = A_config_environment;
760760
A_config.modinfo_files = A_config_modinfo_files;

a68config/a68config.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
194
2020
070064001a0100070303737472001a010303727663041a00070065041a01001a0508737472746f727663010000001a041a006304076d616b65727663010000001a041a060066000507006700050100660407613638696e697401000000660005070068000501001a0700690005010068040d73686f77613638636f6e6669670100000068000507006a000502001a001a0409613638636f6e66696701001a001a0005010e73686f775f613638636f6e6669670069010a636f6e666967696e666f001a
2121
CAAALIB
22-
1619019242
22+
1619998575
2323
7
2424
HAAALIBffftff
2525
XAAALIBftffff

0 commit comments

Comments
 (0)