mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-20 03:47:16 +02:00
88 lines
2.3 KiB
Diff
88 lines
2.3 KiB
Diff
From: Loic Prylli <Loic.Prylli@graville.fdn.fr>
|
|
Date: Mon, 29 Jun 1998 20:15:00 -0400
|
|
Subject: 00 Makefiles
|
|
|
|
Fix makefiles to make it possible to compile mailx on non-BSD systems.
|
|
---
|
|
Makefile | 32 +++++++++++++++++++++++++++++++-
|
|
USD.doc/Makefile | 14 +++++++++-----
|
|
2 files changed, 40 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/Makefile b/Makefile
|
|
index e2313ca..e693279 100644
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -1,12 +1,24 @@
|
|
# $OpenBSD: Makefile,v 1.13 2020/12/15 00:50:01 daniel Exp $
|
|
|
|
PROG= mail
|
|
+CC ?= gcc
|
|
+
|
|
+CFLAGS += -D_DEFAULT_SOURCE -D_BSD_SOURCE -DDEBIAN -g -Wall
|
|
+
|
|
SRCS= version.c cmd1.c cmd2.c cmd3.c cmdtab.c collect.c \
|
|
edit.c fio.c head.c v7.local.c lex.c list.c main.c names.c \
|
|
popen.c quit.c send.c strings.c temp.c tty.c util.c vars.c
|
|
+
|
|
+
|
|
+OBJS=$(SRCS:%.c=%.o)
|
|
+LIBS=-llockfile -lbsd
|
|
+
|
|
SFILES= mail.help mail.tildehelp
|
|
EFILES= mail.rc
|
|
LINKS= ${BINDIR}/mail ${BINDIR}/Mail ${BINDIR}/mail ${BINDIR}/mailx
|
|
+MFILES= mail.1
|
|
+
|
|
+all: $(PROG)
|
|
|
|
distribution:
|
|
cd ${.CURDIR}/misc; ${INSTALL} ${INSTALL_COPY} -o root -g wheel \
|
|
@@ -14,4 +26,22 @@ distribution:
|
|
cd ${.CURDIR}/misc; ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} \
|
|
-m 444 ${SFILES} ${DESTDIR}/usr/share/misc
|
|
|
|
-.include <bsd.prog.mk>
|
|
+
|
|
+$(PROG): $(OBJS)
|
|
+ $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
|
|
+
|
|
+.c.o:
|
|
+ $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
|
|
+
|
|
+.y.c:
|
|
+ bison $<
|
|
+ mv -f $*.tab.c $@
|
|
+
|
|
+clean:
|
|
+ rm -f $(PROG) $(OBJS) *~ core
|
|
+
|
|
+install:
|
|
+ install -p -c -m 755 $(PROG) $(DESTDIR)/usr/bin/mail
|
|
+ install -p -c -m 644 $(MFILES) $(DESTDIR)/usr/share/man/man1/mail.1
|
|
+ cd misc && install -p -c -m 644 $(EFILES) $(DESTDIR)/etc/
|
|
+ cd misc && install -p -c -m 644 $(SFILES) $(DESTDIR)/usr/share/misc/
|
|
diff --git a/USD.doc/Makefile b/USD.doc/Makefile
|
|
index fc82a17..a59ecb0 100644
|
|
--- a/USD.doc/Makefile
|
|
+++ b/USD.doc/Makefile
|
|
@@ -5,11 +5,15 @@ DIR= usd/07.mail
|
|
SRCS= mail0.nr mail1.nr mail2.nr mail3.nr mail4.nr mail5.nr mail6.nr \
|
|
mail7.nr mail8.nr mail9.nr maila.nr
|
|
MACROS= -me
|
|
+TBL=tbl
|
|
|
|
-paper.ps: ${SRCS}
|
|
- ${TBL} ${SRCS} | ${ROFF} > ${.TARGET}
|
|
+all: manual.ps manual.txt
|
|
|
|
-paper.txt: ${SRCS}
|
|
- ${TBL} ${SRCS} | ${ROFF} -Tascii > ${.TARGET}
|
|
+manual.ps: ${SRCS}
|
|
+ ${TBL} ${SRCS} | groff ${MACROS} -Tps > $@
|
|
|
|
-.include <bsd.doc.mk>
|
|
+manual.txt: ${SRCS}
|
|
+ ${TBL} ${SRCS} | groff ${MACROS} -Tascii > $@
|
|
+
|
|
+clean :
|
|
+ -rm -f manual.ps manual.txt
|