1
0
Fork 0
mirror of git://slackware.nl/current.git synced 2025-02-15 08:50:09 +01:00
slackware-current/source/ap/ash/patches/ash-makefile.patch
Patrick J Volkerding 5a12e7c134 Slackware 13.0
Wed Aug 26 10:00:38 CDT 2009
Slackware 13.0 x86_64 is released as stable!  Thanks to everyone who
helped make this release possible -- see the RELEASE_NOTES for the
credits.  The ISOs are off to the replicator.  This time it will be a
6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD.
We're taking pre-orders now at store.slackware.com.  Please consider
picking up a copy to help support the project.  Once again, thanks to
the entire Slackware community for all the help testing and fixing
things and offering suggestions during this development cycle.
As always, have fun and enjoy!  -P.
2018-05-31 22:41:17 +02:00

115 lines
3.1 KiB
Diff

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