This checkin contains only enough changes that gsh is able to assemble

and link.  However, it does not work yet and thus still needs work.

The *.asm files have had the following common changes:
	- 'keep' lines were eliminated
	- the 'mcopy' now takes the macro from the /obj/gno/bin/gsh
	  directory.  This is in anticipation of having the macro
	  files generated from a single source file; there is a large
	  amount of duplication.  For the moment, the makefile merely
	  copies the old macro files from the "M" directory to the
	  /obj/gno/bin/gsh directory.
	- start each file with a dummy routine so that the source
	  code winds up in the *.o rather than the *.root file.
	- added the 'setcom 60' directive; there were many source
	  lines that were otherwise getting truncated.

The makefile is a complete rewrite.
This commit is contained in:
gdr-ftp 1998-04-24 15:38:47 +00:00
parent eacedc7aca
commit 61474a874f
23 changed files with 295 additions and 115 deletions

View File

@ -1,87 +1,102 @@
#
# GNO Shell Makefile
# by T Meekins
# makefile for building gsh. This is for use with dmake.
#
# $Id: Makefile,v 1.2 1998/04/24 15:38:31 gdr-ftp Exp $
#
# Devin Reade, February 1998.
#
o/main.root: main.asm
purge ; compile main.asm keep=o/main
PROG = gsh
MAIN = main
MAINSRC = main.asm
SRCS = $(MAINSRC) alias.asm bufpool.asm builtin.asm cmd.asm dir.asm \
edit.asm expand.asm hash.asm history.asm invoke.asm jobs.asm \
orca.asm prompt.asm shell.asm shellutil.asm \
shellvar.asm stdio.asm sv.asm term.asm
# unused: mmdebug.asm
STACK = 4096
o/shell.root: shell.asm m/shell.mac
purge ; compile shell.asm keep=o/shell
# This is a problem. gsh was written to use the old termcap library.
# Not only do we no longer build this library, but we don't even have the
# sources for it. This needs to be changed. For the moment, use the
# ltermcap library from GNO v2.0.4.
#
# LDADD = -ltermcap
LDLIBS += -l/trenco3/lib.206/ltermcap
o/history.root: history.asm m/history.mac
purge ; compile history.asm keep=o/history
# Make sure our macro files get built before trying to assemble source files.
# LOCAL_SETUP = macros
o/prompt.root: prompt.asm m/prompt.mac
purge ; compile prompt.asm keep=o/prompt
.INCLUDE : /src/gno/prog.mk
o/cmd.root: cmd.asm m/cmd.mac
purge ; compile cmd.asm keep=o/cmd
LOCAL_MACRO_SRC = # gsh.mac
MACRO_SRC = \
$(LOCAL_MACRO_SRC) \
/usr/ainclude/m16.gno \
$(LOCAL_MACRO_SRC) \
$(ORCA_DIST)/libraries/orcainclude/m16.orca \
$(ORCA_DIST)/libraries/orcainclude/m16.gs.os \
$(ORCA_DIST)/libraries/orcainclude/m16.tools \
$(ORCA_DIST)/libraries/orcainclude/m16.shell \
$(ORCA_DIST)/libraries/ainclude/m16.pascal \
$(ORCA_DIST)/libraries/ainclude/m16.debug
o/expand.root: expand.asm m/expand.mac
purge ; compile expand.asm keep=o/expand
MACROS = \
$(OBJ_DIR)main.mac \
$(OBJ_DIR)alias.mac \
$(OBJ_DIR)bufpool.mac \
$(OBJ_DIR)builtin.mac \
$(OBJ_DIR)cmd.mac \
$(OBJ_DIR)dir.mac \
$(OBJ_DIR)edit.mac \
$(OBJ_DIR)expand.mac \
$(OBJ_DIR)hash.mac \
$(OBJ_DIR)history.mac \
$(OBJ_DIR)invoke.mac \
$(OBJ_DIR)jobs.mac \
$(OBJ_DIR)mmdebug.mac \
$(OBJ_DIR)orca.mac \
$(OBJ_DIR)prompt.mac \
$(OBJ_DIR)shell.mac \
$(OBJ_DIR)shellutil.mac \
$(OBJ_DIR)shellvar.mac \
$(OBJ_DIR)stdio.mac \
$(OBJ_DIR)sv.mac \
$(OBJ_DIR)term.mac
o/invoke.root: invoke.asm m/invoke.mac
purge ; compile invoke.asm keep=o/invoke
macros: $(MACROS)
o/shellutil.root: shellutil.asm m/shellutil.mac
purge ; compile shellutil.asm keep=o/shellutil
#$(OBJ_DIR)%.mac: %.asm
# @echo making $@
# @$(MACGEN) $(MACGEN_FLAGS) $*.asm $@ $(MACRO_SRC)
o/builtin.root: builtin.asm m/builtin.mac
purge ; compile builtin.asm keep=o/builtin
# $(MACROS): $(LOCAL_MACRO_SRC)
o/hash.root: hash.asm m/hash.mac
purge ; compile hash.asm keep=o/hash
#$(OBJ_DIR)alias.mac: $(MACRO_SRC)
# $(MACGEN) $(MACGEN_FLAGS) alias.asm $@ $(MACRO_SRC)
o/alias.root: alias.asm m/alias.mac
purge ; compile alias.asm keep=o/alias
#bork:
# @echo OBJS are $(OBJS)
# gsh -c ${mktmp echo $(JINCL) $(JDEFS) $< > $@}
o/dir.root: dir.asm m/dir.mac
purge ; compile dir.asm keep=o/dir
o/shellvar.root: shellvar.asm m/shellvar.mac
purge ; compile shellvar.asm keep=o/shellvar
o/jobs.root: jobs.asm m/jobs.mac
purge ; compile jobs.asm keep=o/jobs
o/sv.root: sv.asm m/sv.mac
purge ; compile sv.asm keep=o/sv
o/stdio.root: stdio.asm m/stdio.mac
purge ; compile stdio.asm keep=o/stdio
o/orca.root: orca.asm m/orca.mac
purge ; compile orca.asm keep=o/orca
o/edit.root: edit.asm m/edit.mac
purge ; compile edit.asm keep=o/edit
o/term.root: term.asm m/term.mac
purge ; compile term.asm keep=o/term
o/bufpool.root: bufpool.asm m/bufpool.mac
purge ; compile bufpool.asm keep=o/bufpool
shell: o/main.root \
o/shell.root \
o/history.root \
o/prompt.root \
o/cmd.root \
o/expand.root \
o/invoke.root \
o/shellutil.root \
o/builtin.root \
o/hash.root \
o/alias.root \
o/shellvar.root \
o/jobs.root \
o/dir.root \
o/sv.root \
o/stdio.root \
o/orca.root \
o/edit.root \
o/term.root \
o/bufpool.root \
direct.root
pwd ; purge ; compile link.script keep=gsh
$(ODIR)alias.o: $(OBJ_DIR)alias.mac
$(ODIR)bufpool.o: $(OBJ_DIR)bufpool.mac
$(ODIR)builtin.o: $(OBJ_DIR)builtin.mac
$(ODIR)cmd.o: $(OBJ_DIR)cmd.mac
$(ODIR)dir.o: $(OBJ_DIR)dir.mac
$(ODIR)edit.o: $(OBJ_DIR)edit.mac
$(ODIR)expand.o: $(OBJ_DIR)expand.mac
$(ODIR)hash.o: $(OBJ_DIR)hash.mac
$(ODIR)history.o: $(OBJ_DIR)history.mac
$(ODIR)invoke.o: $(OBJ_DIR)invoke.mac
$(ODIR)jobs.o: $(OBJ_DIR)jobs.mac
$(ODIR)main.o: $(OBJ_DIR)main.mac
$(ODIR)mmdebug.o: $(OBJ_DIR)mmdebug.mac
$(ODIR)orca.o: $(OBJ_DIR)orca.mac
$(ODIR)prompt.o: $(OBJ_DIR)prompt.mac
$(ODIR)shell.o: $(OBJ_DIR)shell.mac
$(ODIR)shellutil.o: $(OBJ_DIR)shellutil.mac
$(ODIR)shellvar.o: $(OBJ_DIR)shellvar.mac
$(ODIR)stdio.o: $(OBJ_DIR)stdio.mac
$(ODIR)sv.o: $(OBJ_DIR)sv.mac
$(ODIR)term.o: $(OBJ_DIR)term.mac

View File

@ -13,8 +13,12 @@
*
**************************************************************************
keep o/alias
mcopy m/alias.mac
mcopy /obj/gno/bin/gsh/alias.mac
dummy start ; ends up in root
end
setcom 60
VTABSIZE gequ 17

View File

@ -6,6 +6,8 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: bufpool.asm,v 1.2 1998/04/24 15:38:05 gdr-ftp Exp $
*
**************************************************************************
*
* BUFPOOL
@ -15,8 +17,10 @@
*
**************************************************************************
keep o/bufpool
mcopy m/bufpool.mac
mcopy /obj/gno/bin/gsh/bufpool.mac
dummy start ; ends up in .root
end
**************************************************************************
*

View File

@ -15,8 +15,12 @@
*
**************************************************************************
keep o/builtin
mcopy m/builtin.mac
mcopy /obj/gno/bin/gsh/builtin.mac
dummy start ; ends up in .root
end
setcom 60
p_next gequ 0 ;next in global proclist
p_friends gequ p_next+4 ;next in job list

View File

@ -6,6 +6,8 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: cmd.asm,v 1.2 1998/04/24 15:38:09 gdr-ftp Exp $
*
**************************************************************************
*
* CMD.ASM
@ -15,8 +17,12 @@
*
**************************************************************************
mcopy m/cmd.mac
keep o/cmd.mac
mcopy /obj/gno/bin/gsh/cmd.mac
dummy start ; ends up in .root
end
setcom 60
SIGINT gequ 2
SIGSTOP gequ 17

View File

@ -6,6 +6,8 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: dir.asm,v 1.2 1998/04/24 15:38:12 gdr-ftp Exp $
*
**************************************************************************
*
* DIR.ASM
@ -15,11 +17,16 @@
*
**************************************************************************
keep o/dir
mcopy m/dir.mac
mcopy /obj/gno/bin/gsh/dir.mac
dummy start ; ends up in .root
end
setcom 60
MAXD gequ 50
**************************************************************************
*
* Initialize directory stack

View File

@ -6,6 +6,8 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: edit.asm,v 1.2 1998/04/24 15:38:14 gdr-ftp Exp $
*
**************************************************************************
*
* EDIT.ASM
@ -15,8 +17,12 @@
*
**************************************************************************
keep o/edit
mcopy m/edit.mac
mcopy /obj/gno/bin/gsh/edit.mac
dummy start ; ends up in .root
end
setcom 60
RAW gequ $20
CRMOD gequ $10

View File

@ -6,6 +6,8 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: expand.asm,v 1.2 1998/04/24 15:38:17 gdr-ftp Exp $
*
**************************************************************************
*
* EXPAND.ASM
@ -15,8 +17,12 @@
*
**************************************************************************
mcopy m/expand.mac
keep o/expand.mac
mcopy /obj/gno/bin/gsh/expand.mac
dummy start ; ends up in .root
end
setcom 60
**************************************************************************
*

35
bin/gsh/gsh.rez Normal file
View File

@ -0,0 +1,35 @@
/*
* Resources for version and comment
*
* $Id: gsh.rez,v 1.1 1998/04/24 15:38:19 gdr-ftp Exp $
*/
#define PROG "gsh"
#define DESC "GNO/Shell\n"
#include "Types.rez"
#include "/src/gno/build.tools/builddate.rez"
/*
* Version
*/
resource rVersion (1, purgeable3) {
{ 2, 0, 0, /* Version 2.0.0 */
release, /* development|alpha|beta|final|release */
0 }, /* non-final release number */
verUS, /* Country */
PROG, /* Program name */
DESC
BUILD_DATE
};
/*
* Comment
*/
resource rComment (1, purgeable3) {
PROG " v2.0\n"
DESC
"Written by Tim Meekins.\n"
BUILD_DATE
};

View File

@ -6,6 +6,8 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: hash.asm,v 1.2 1998/04/24 15:38:21 gdr-ftp Exp $
*
**************************************************************************
*
* HASH.ASM
@ -15,8 +17,12 @@
*
**************************************************************************
keep o/hash
mcopy m/hash.mac
mcopy /obj/gno/bin/gsh/hash.mac
dummy start ; ends up in .root
end
setcom 60
C1 gequ 11
C2 gequ 13

View File

@ -6,6 +6,8 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: history.asm,v 1.2 1998/04/24 15:38:23 gdr-ftp Exp $
*
**************************************************************************
*
* HISTORY.ASM
@ -24,8 +26,12 @@
*
**************************************************************************
keep o/history
mcopy m/history.mac
mcopy /obj/gno/bin/gsh/history.mac
dummy start ; ends up in .root
end
setcom 60
histNext gequ 0
histCmd gequ 4

View File

@ -6,6 +6,8 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: invoke.asm,v 1.2 1998/04/24 15:38:25 gdr-ftp Exp $
*
**************************************************************************
*
* INVOKE.ASM
@ -15,8 +17,12 @@
*
**************************************************************************
mcopy m/invoke.mac
keep o/invoke.mac
mcopy /obj/gno/bin/gsh/invoke.mac
dummy start ; ends up in .root
end
setcom 60
SIGINT gequ 2
SIGKILL gequ 9

View File

@ -6,6 +6,8 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: jobs.asm,v 1.2 1998/04/24 15:38:27 gdr-ftp Exp $
*
**************************************************************************
*
* JOBS.ASM
@ -15,8 +17,12 @@
*
**************************************************************************
mcopy m/jobs.mac
keep o/jobs
mcopy /obj/gno/bin/gsh/jobs.mac
dummy start ; ends up in .root
end
setcom 60
WSTOPPED gequ $7F

View File

@ -13,8 +13,12 @@
*
**************************************************************************
keep o/main
mcopy m/main.mac
mcopy /obj/gno/bin/gsh/main.mac
dummy start ; ends up in root
end
setcom 60
init START
jml ~GNO_COMMAND

View File

@ -1,4 +1,21 @@
mcopy mdb.mac
**************************************************************************
*
* The GNO Shell Project
*
* Developed by:
* Jawaid Bazyar
* Tim Meekins
*
* $Id: mmdebug.asm,v 1.2 1998/04/24 15:38:33 gdr-ftp Exp $
*
**************************************************************************
mcopy /obj/gno/bin/gsh/mmdebug.mac
dummy start ; ends up in .root
end
setcom 60
~NEW START
hand equ 0

View File

@ -6,6 +6,8 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: orca.asm,v 1.2 1998/04/24 15:38:34 gdr-ftp Exp $
*
**************************************************************************
*
* ORCA.ASM
@ -15,8 +17,12 @@
*
**************************************************************************
keep o/orca
mcopy m/orca.mac
mcopy /obj/gno/bin/gsh/orca.mac
dummy start ; ends up in .root
end
setcom 60
**************************************************************************
*

View File

@ -6,6 +6,8 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: prompt.asm,v 1.2 1998/04/24 15:38:35 gdr-ftp Exp $
*
**************************************************************************
*
* PROMPT.ASM
@ -15,12 +17,16 @@
*
**************************************************************************
keep o/prompt
mcopy m/prompt.mac
mcopy /obj/gno/bin/gsh/prompt.mac
dummy start ; ends up in .root
end
setcom 60
WritePrompt START
using HistoryData
using HistoryData
prompt equ 0

View File

@ -6,6 +6,8 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: shell.asm,v 1.2 1998/04/24 15:38:37 gdr-ftp Exp $
*
**************************************************************************
*
* SHELL.ASM
@ -15,8 +17,12 @@
*
**************************************************************************
keep o/shell
mcopy m/shell.mac
mcopy /obj/gno/bin/gsh/shell.mac
dummy start ; ends up in .root
end
setcom 60
SIGINT gequ 2
SIGTSTP gequ 18

View File

@ -6,6 +6,8 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: shellutil.asm,v 1.2 1998/04/24 15:38:39 gdr-ftp Exp $
*
**************************************************************************
*
* SHELLUTIL.ASM
@ -15,8 +17,12 @@
*
**************************************************************************
keep o/shellutil
mcopy m/shellutil.mac
mcopy /obj/gno/bin/gsh/shellutil.mac
dummy start ; ends up in .root
end
setcom 60
;=========================================================================
;

View File

@ -7,6 +7,8 @@
* Tim Meekins
* Derek Taubert
*
* $Id: shellvar.asm,v 1.2 1998/04/24 15:38:41 gdr-ftp Exp $
*
**************************************************************************
*
* SHELLVAR.ASM
@ -16,8 +18,12 @@
*
**************************************************************************
keep o/shellvar
mcopy m/shellvar.mac
mcopy /obj/gno/bin/gsh/shellvar.mac
dummy start ; ends up in .root
end
setcom 60
**************************************************************************
*

View File

@ -6,6 +6,8 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: stdio.asm,v 1.2 1998/04/24 15:38:43 gdr-ftp Exp $
*
**************************************************************************
*
* STDIO.ASM
@ -19,8 +21,12 @@
*
**************************************************************************
keep o/stdio
mcopy m/stdio.mac
mcopy /obj/gno/bin/gsh/stdio.mac
dummy start ; ends up in .root
end
setcom 60
**************************************************************************
*

View File

@ -6,6 +6,8 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: sv.asm,v 1.2 1998/04/24 15:38:45 gdr-ftp Exp $
*
**************************************************************************
*
* SV.ASM
@ -15,9 +17,13 @@
*
**************************************************************************
keep o/sv
mcopy m/sv.mac
mcopy /obj/gno/bin/gsh/sv.mac
dummy start ; ends up in .root
end
setcom 60
**************************************************************************
*
* Allocate a string vector array

View File

@ -6,6 +6,8 @@
* Jawaid Bazyar
* Tim Meekins
*
* $Id: term.asm,v 1.2 1998/04/24 15:38:47 gdr-ftp Exp $
*
**************************************************************************
*
* TERM.ASM
@ -15,8 +17,12 @@
*
**************************************************************************
keep o/term
mcopy m/term.mac
mcopy /obj/gno/bin/gsh/term.mac
dummy start ; ends up in .root
end
setcom 60
TIOCGETP gequ $40067408