1997-11-18 05:31:00 +00:00
|
|
|
#
|
1998-04-24 15:38:47 +00:00
|
|
|
# makefile for building gsh. This is for use with dmake.
|
|
|
|
#
|
1999-01-15 06:50:35 +00:00
|
|
|
# $Id: Makefile,v 1.9 1999/01/15 06:50:35 gdr-ftp Exp $
|
1998-04-24 15:38:47 +00:00
|
|
|
#
|
|
|
|
# Devin Reade, February 1998.
|
1997-11-18 05:31:00 +00:00
|
|
|
#
|
|
|
|
|
1998-04-24 15:38:47 +00:00
|
|
|
PROG = gsh
|
|
|
|
MAIN = main
|
|
|
|
MAINSRC = main.asm
|
1998-06-09 16:22:56 +00:00
|
|
|
SRCS = $(MAINSRC) \
|
|
|
|
shell.asm \
|
|
|
|
history.asm \
|
|
|
|
prompt.asm \
|
|
|
|
cmd.asm \
|
|
|
|
expand.asm \
|
|
|
|
invoke.asm \
|
|
|
|
shellutil.asm \
|
|
|
|
builtin.asm \
|
|
|
|
hash.asm \
|
|
|
|
alias.asm \
|
|
|
|
dir.asm \
|
|
|
|
shellvar.asm \
|
|
|
|
jobs.asm \
|
|
|
|
sv.asm \
|
|
|
|
stdio.asm \
|
|
|
|
orca.asm \
|
|
|
|
edit.asm \
|
|
|
|
term.asm \
|
1998-08-03 17:30:30 +00:00
|
|
|
bufpool.asm \
|
|
|
|
mmdebug.asm
|
1998-06-09 16:22:56 +00:00
|
|
|
|
|
|
|
# Note: STACK variable does not control size of stack/direct-page segment
|
|
|
|
# since this is assembly language. Edit stack segment in main.asm
|
|
|
|
# to change this size.
|
1998-04-24 15:38:47 +00:00
|
|
|
|
|
|
|
# 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
|
1999-01-15 06:50:35 +00:00
|
|
|
LDLIBS += -l/usr/lib/libtermcap.204
|
1998-08-03 17:30:30 +00:00
|
|
|
|
|
|
|
# For debugging: produce a link map
|
|
|
|
## LDFLAGS += -M
|
1998-04-24 15:38:47 +00:00
|
|
|
|
|
|
|
# Make sure our macro files get built before trying to assemble source files.
|
|
|
|
# LOCAL_SETUP = macros
|
|
|
|
|
1999-01-08 07:38:47 +00:00
|
|
|
CUSTOM_RELEASE = TRUE
|
|
|
|
|
1998-04-24 15:38:47 +00:00
|
|
|
.INCLUDE : /src/gno/prog.mk
|
|
|
|
|
1998-05-30 17:21:40 +00:00
|
|
|
# We give a custom implicit rule for *.o files so that we don't get
|
|
|
|
# duplicate "dummy" symbols in the link step.
|
|
|
|
%.o: %.asm
|
|
|
|
$(AS) -o $@ $(ASFLAGS) $(__OFLAG) $<
|
|
|
|
-$(RM) -f $(OBJ_DIR)$*.root
|
|
|
|
|
1998-06-09 16:22:56 +00:00
|
|
|
LOCAL_MACRO_SRC = gsh.mac
|
1998-04-24 15:38:47 +00:00
|
|
|
MACRO_SRC = \
|
1998-06-09 16:22:56 +00:00
|
|
|
$(LOCAL_MACRO_SRC)
|
|
|
|
|
Major changes to gsh with this checkin:
* When ~ is parsed and next character is a delimiter, make sure contents
of expanded $HOME match the user's delimiter.
* When wildcard patterns don't match, rather than terminating the command
gsh now prints "No match: <pattern> ignored" and passes the command line
minus the unmatched patterns on to be executed.
* Modified echo command so it doesn't add a blank to the end.
* Make "clear" and "source" built-ins non-forked commands. Unforking
"source" allows prefixes to be set in files that are sourced.
* Add loop to parse a single command (removing leading whitespace) before
sending it off to be expanded and executed. Skip null lines and comments
at this level. This allows later commands that depend upon variables set
in the 1st command to work; e.g.: set t_num=1 ; echo "Test number $t_num"
Also fixes problems seen when tab was first character of multiple lines.
* Initialize environment variable flags at startup (for echo, nodirexec,
nonewline, noglob, nobeep, pushdsilent, term, and ignoreeof). Set
flag when env var is set in upper or lower case (formerly, only worked
with lower case).
* Lots of places two-word addresses are incremented using inc, without
checking for overflow into the high-order word. As these are discovered,
they are changed to use adc on both words.
See file UpdateLog for detailed list of changes.
1998-06-30 17:26:04 +00:00
|
|
|
# Everything should be in gsh.mac. If useful, the following could be added
|
1998-06-09 16:22:56 +00:00
|
|
|
# /usr/ainclude/m16.gno \
|
|
|
|
# $(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 \
|
Major changes to gsh with this checkin:
* When ~ is parsed and next character is a delimiter, make sure contents
of expanded $HOME match the user's delimiter.
* When wildcard patterns don't match, rather than terminating the command
gsh now prints "No match: <pattern> ignored" and passes the command line
minus the unmatched patterns on to be executed.
* Modified echo command so it doesn't add a blank to the end.
* Make "clear" and "source" built-ins non-forked commands. Unforking
"source" allows prefixes to be set in files that are sourced.
* Add loop to parse a single command (removing leading whitespace) before
sending it off to be expanded and executed. Skip null lines and comments
at this level. This allows later commands that depend upon variables set
in the 1st command to work; e.g.: set t_num=1 ; echo "Test number $t_num"
Also fixes problems seen when tab was first character of multiple lines.
* Initialize environment variable flags at startup (for echo, nodirexec,
nonewline, noglob, nobeep, pushdsilent, term, and ignoreeof). Set
flag when env var is set in upper or lower case (formerly, only worked
with lower case).
* Lots of places two-word addresses are incremented using inc, without
checking for overflow into the high-order word. As these are discovered,
they are changed to use adc on both words.
See file UpdateLog for detailed list of changes.
1998-06-30 17:26:04 +00:00
|
|
|
# $(ORCA_DIST)/libraries/ainclude/m16.debug
|
1998-04-24 15:38:47 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
1999-01-08 07:38:47 +00:00
|
|
|
MANPAGES_1 = \
|
|
|
|
man/alias.1 \
|
|
|
|
man/cd.1 \
|
|
|
|
man/clear.1 \
|
|
|
|
man/exit.1 \
|
|
|
|
man/gsh.1
|
|
|
|
|
1998-04-24 15:38:47 +00:00
|
|
|
macros: $(MACROS)
|
|
|
|
|
1998-06-09 16:22:56 +00:00
|
|
|
$(OBJ_DIR)%.mac: %.asm
|
|
|
|
@echo making $@
|
|
|
|
@$(MACGEN) $(MACGEN_FLAGS) $*.asm $@ $(MACRO_SRC)
|
1998-04-24 15:38:47 +00:00
|
|
|
|
1998-06-09 16:22:56 +00:00
|
|
|
$(MACROS): $(LOCAL_MACRO_SRC)
|
1998-04-24 15:38:47 +00:00
|
|
|
|
1998-06-09 16:22:56 +00:00
|
|
|
$(OBJ_DIR)alias.mac: $(MACRO_SRC)
|
|
|
|
$(MACGEN) $(MACGEN_FLAGS) alias.asm $@ $(MACRO_SRC)
|
1998-04-24 15:38:47 +00:00
|
|
|
|
1999-01-08 07:38:47 +00:00
|
|
|
# Place files where they will subsequently be archived in a binary
|
|
|
|
# distribution.
|
|
|
|
release: $(OBJ_DIR)$(PROG) $(MANPAGES_1) $(DESC)
|
|
|
|
$(INSTALL) -d $(RELBIN) $(RELMAN)/man1 $(DESC_DIR)
|
|
|
|
$(INSTALL) $(OBJ_DIR)$(PROG) $(RELBIN)
|
|
|
|
$(INSTALL) $(MANPAGES_1) $(RELMAN)/man1
|
|
|
|
$(DESCU) -o $(DESC_SRC) $(DESC_SRC) $(DESC)
|
|
|
|
|
|
|
|
# Install files into a live system. This doesn't update the describe
|
|
|
|
# database.
|
|
|
|
install: $(OBJ_DIR)$(PROG) $(MANPAGES_1)
|
|
|
|
$(INSTALL) -d $(BINDIR) $(MANDIR)/man1
|
|
|
|
$(INSTALL) $(OBJ_DIR)$(PROG) $(BINDIR)
|
|
|
|
$(INSTALL) $(MANPAGES_1) $(MANDIR)/man1
|
1998-04-24 15:38:47 +00:00
|
|
|
|
|
|
|
$(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
|