summaryrefslogtreecommitdiff
path: root/source/ap/ash/patches/ash-makefile.patch
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/ash/patches/ash-makefile.patch')
-rw-r--r--source/ap/ash/patches/ash-makefile.patch115
1 files changed, 115 insertions, 0 deletions
diff --git a/source/ap/ash/patches/ash-makefile.patch b/source/ap/ash/patches/ash-makefile.patch
new file mode 100644
index 00000000..c3b16a1f
--- /dev/null
+++ b/source/ap/ash/patches/ash-makefile.patch
@@ -0,0 +1,115 @@
+diff -u ash-0.4.0/Makefile ash-0.4.0-/Makefile
+--- ash-0.4.0/Makefile Fri Jan 12 17:50:34 2001
++++ ash-0.4.0-/Makefile Tue Apr 24 00:49:56 2001
+@@ -7,56 +7,68 @@
+ SHSRCS= alias.c cd.c echo.c error.c eval.c exec.c expand.c \
+ histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
+ mystring.c options.c parser.c redir.c show.c trap.c output.c var.c \
+- test.c
+-GENSRCS=arith.c arith.h arith_lex.c builtins.c builtins.h init.c nodes.c \
+- nodes.h syntax.c syntax.h token.h
++ test.c setmode.c test.c
++GENSRCS=builtins.c builtins.h init.c nodes.c arith.c arith.h lex.yy.c \
++ nodes.h syntax.c syntax.h token.h signames.c
+ SRCS= ${SHSRCS} ${GENSRCS}
+
+-LDADD+= -ll -ledit -ltermcap
+-DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP}
++OBJS=alias.o cd.o bltin/echo.o error.o eval.o exec.o expand.o \
++ histedit.o input.o jobs.o mail.o main.o memalloc.o miscbltin.o \
++ mystring.o options.o output.o parser.o redir.o show.o \
++ trap.o var.o bltin/test.o signames.o \
++ builtins.o init.o nodes.o syntax.o arith.o lex.yy.o \
++ setmode.o bltin/times.o
++
++OPT_FLAGS=-O2 -g
++LDFLAGS=-g
++CFLAGS=$(OPT_FLAGS) -DSHELL -I. -DNO_HISTORY -DBSD=1 -DSMALL -D_GNU_SOURCE \
++ -DGLOB_BROKEN -D__COPYRIGHT\(x\)= -D__RCSID\(x\)= -D_DIAGASSERT\(x\)=
++
++all: $(PROG)
++
++$(PROG): build-tools $(GENSRCS) $(GENHDRS) $(OBJS)
++ $(CC) $(LDFLAGS) -o $(PROG) $(OBJS) $(LDLIBS) -lfl
++
++lex.yy.c: arith_lex.l
++ flex -8 $<
++
++CLEANFILES+= mkinit mkinit.o mknodes mknodes.o \
++ mksyntax mksyntax.o
++
++CLEANFILES+= ${GENSRCS} ${GENHDRS}
++
++build-tools: mkinit mknodes mksyntax
++
++.ORDER: builtins.c builtins.h
++builtins.c builtins.h: mkbuiltins builtins.def
++ sh mkbuiltins shell.h builtins.def `pwd`
++
++INIT_DEPS = alias.c eval.c exec.c input.c jobs.c options.c parser.c \
++ redir.c trap.c var.c output.c
++
++init.c: mkinit $(INIT_DEPS)
++ ./mkinit $(INIT_DEPS)
++
++mkinit: mkinit.o
++mknodes: mknodes.o
++mksyntax: mksyntax.o
+
+-LFLAGS= -8 # 8-bit lex scanner for arithmetic
+-YFLAGS= -d
+-
+-CPPFLAGS+=-DSHELL -I. -I${.CURDIR}
+-
+-.PATH: ${.CURDIR}/bltin ${.CURDIR}/../../usr.bin/printf ${.CURDIR}/../test
+-
+-CLEANFILES+= mkinit mknodes mksyntax
+-CLEANFILES+= ${GENSRCS} y.tab.h
+-
+-token.h: mktokens
+- sh ${.ALLSRC}
+-
+-builtins.c builtins.h: mkbuiltins shell.h builtins.def
+- sh ${.ALLSRC} ${.OBJDIR}
+-
+-init.c: mkinit ${SHSRCS}
+- ./${.ALLSRC}
++signames.c: mksignames
++ ./mksignames
+
+ nodes.c nodes.h: mknodes nodetypes nodes.c.pat
+- ./${.ALLSRC}
++ ./mknodes ./nodetypes ./nodes.c.pat
+
+ syntax.c syntax.h: mksyntax
+- ./${.ALLSRC}
+-
+-mkinit: mkinit.c
+- ${HOST_LINK.c} -o mkinit ${.IMPSRC}
+-
+-mknodes: mknodes.c
+- ${HOST_LINK.c} -o mknodes ${.IMPSRC}
++ ./mksyntax
+
+-.if (${MACHINE_ARCH} == "powerpc") || \
+- (${MACHINE_ARCH} == "arm32") || \
+- (${MACHINE_ARCH} == "arm26")
+-TARGET_CHARFLAG= -DTARGET_CHAR="u_int8_t"
+-.else
+-TARGET_CHARFLAG= -DTARGET_CHAR="int8_t"
+-.endif
++arith.c arith.h: arith.y
++ yacc -d arith.y
++ mv y.tab.h arith.h
++ mv y.tab.c arith.c
+
+-mksyntax: mksyntax.c
+- ${HOST_LINK.c} ${TARGET_CHARFLAG} -o mksyntax ${.IMPSRC}
+-
+-.include <bsd.prog.mk>
++token.h: mktokens
++ sh ./mktokens
+
+-${OBJS}: builtins.h nodes.h syntax.h token.h
++clean:
++ rm -f $(PROG) $(OBJS) $(CLEANFILES) core