pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/comms/tn3270/files New makefiles for this that don't d...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/a55869d29e6a
branches:  trunk
changeset: 569710:a55869d29e6a
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Sun Jan 17 01:41:33 2010 +0000

description:
New makefiles for this that don't depend on being in the base source tree.

diffstat:

 comms/tn3270/files/Makefile                |   25 ++++-
 comms/tn3270/files/Makefile.inc            |   14 ---
 comms/tn3270/files/mk/prog.mk              |   32 +++++++
 comms/tn3270/files/mk/setup.mk             |   43 +++++++++
 comms/tn3270/files/mset/Makefile           |   40 ++++----
 comms/tn3270/files/tn3270/Makefile         |  131 ++++++++++++++--------------
 comms/tn3270/files/tools/Makefile          |   14 +-
 comms/tn3270/files/tools/Makefile.inc      |   13 --
 comms/tn3270/files/tools/mkastods/Makefile |   17 ++-
 comms/tn3270/files/tools/mkastosc/Makefile |   20 ++-
 comms/tn3270/files/tools/mkdctype/Makefile |   17 ++-
 comms/tn3270/files/tools/mkdstoas/Makefile |   17 ++-
 comms/tn3270/files/tools/mkhits/Makefile   |   17 ++-
 comms/tn3270/files/tools/mkmake/Makefile   |   17 ++-
 comms/tn3270/files/tools/prt3270/Makefile  |   63 ++++++-------
 15 files changed, 282 insertions(+), 198 deletions(-)

diffs (truncated from 599 to 300 lines):

diff -r ac9a2e4d1b36 -r a55869d29e6a comms/tn3270/files/Makefile
--- a/comms/tn3270/files/Makefile       Sun Jan 17 01:33:16 2010 +0000
+++ b/comms/tn3270/files/Makefile       Sun Jan 17 01:41:33 2010 +0000
@@ -1,6 +1,21 @@
-#      $NetBSD: Makefile,v 1.1.1.1 2010/01/17 01:33:16 dholland Exp $
-#      From NetBSD: Makefile,v 1.8 2005/09/17 16:52:02 chs Exp 
+#      $NetBSD: Makefile,v 1.2 2010/01/17 01:41:33 dholland Exp $
+
+TOP=.
+include $(TOP)/mk/setup.mk
+
+all depend clean distclean:
+       (cd tools && $(MAKE) $@)
+       (cd tn3270 && $(MAKE) $@)
+       (cd mset && $(MAKE) $@)
 
-SUBDIR = tools .WAIT tn3270 mset
-
-.include <bsd.subdir.mk>
+install:
+       $(INSTALLDIR) $(DESTDIR)$(BINDIR)
+       $(INSTALLDIR) $(DESTDIR)$(MAN1DIR)
+       $(INSTALLDIR) $(DESTDIR)$(MAN5DIR)
+       $(INSTALLDIR) $(DESTDIR)$(SHAREDIR)
+       $(INSTALLBIN) tn3270/tn3270   $(DESTDIR)$(BINDIR)/tn3270
+       $(INSTALLBIN) mset/mset       $(DESTDIR)$(BINDIR)/mset
+       $(INSTALLMAN) tn3270/tn3270.1 $(DESTDIR)$(MAN1DIR)/mset.1
+       $(INSTALLMAN) mset/mset.1     $(DESTDIR)$(MAN1DIR)/mset.1
+       $(INSTALLMAN) mset/map3270.5  $(DESTDIR)$(MAN5DIR)/map3270.5
+       $(INSTALLFILE) mset/map3270   $(DESTDIR)$(SHAREDIR)/map3270
diff -r ac9a2e4d1b36 -r a55869d29e6a comms/tn3270/files/Makefile.inc
--- a/comms/tn3270/files/Makefile.inc   Sun Jan 17 01:33:16 2010 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-#      $NetBSD: Makefile.inc,v 1.1.1.1 2010/01/17 01:33:16 dholland Exp $
-#      From NetBSD: Makefile.inc,v 1.12 2009/04/14 22:15:27 lukem Exp 
-
-WARNS?=        1       # XXX -Wcast-qual -Wshadow issues
-
-USE_FORT?= yes # network client
-
-CPPFLAGS+=-DTERMCAP -DSRCRT -DKLUDGELINEMODE -DUSE_TERMIO -DTN3270 -Dunix
-CPPFLAGS+=-I${.CURDIR} -I.
-KBD=   unix.kbd
-
-.if exists(${.CURDIR}/../../Makefile.inc)
-.include "${.CURDIR}/../../Makefile.inc"
-.endif
diff -r ac9a2e4d1b36 -r a55869d29e6a comms/tn3270/files/mk/prog.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/tn3270/files/mk/prog.mk     Sun Jan 17 01:41:33 2010 +0000
@@ -0,0 +1,32 @@
+#      $NetBSD: prog.mk,v 1.1 2010/01/17 01:41:33 dholland Exp $
+
+OBJS=$(SRCS:T:R:=.o)
+
+all: $(PROG)
+
+$(PROG): $(OBJS)
+       $(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $(PROG)
+
+.for S in $(SRCS:M*.c)
+$(S:T:R).o: $(S)
+       $(CC) $(CFLAGS) -c $(S)
+.endfor
+
+.for S in $(SRCS:M*.y)
+$(S:T:R).o: $(S)
+       $(YACC) -o $(S:.y=.c) $(S)
+       $(CC) $(CFLAGS) -c $(S:.y=.c)
+.endfor
+
+genfiles: $(GENFILES)
+
+depend:
+       $(MAKE) genfiles
+       $(MKDEP) $(CFLAGS) $(SRCS) > .depend
+
+-include .depend
+
+clean distclean:
+       rm -f $(PROG) *.o $(SRCS:M*.y:.y=.c) $(GENFILES)
+
+.PHONY: all genfiles depend clean distclean
diff -r ac9a2e4d1b36 -r a55869d29e6a comms/tn3270/files/mk/setup.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/tn3270/files/mk/setup.mk    Sun Jan 17 01:41:33 2010 +0000
@@ -0,0 +1,43 @@
+#      $NetBSD: setup.mk,v 1.1 2010/01/17 01:41:33 dholland Exp $
+
+KBD= unix.kbd
+
+############################################################
+# installation
+
+DESTDIR?=# empty
+PREFIX?=/usr/local
+
+BINDIR?=$(PREFIX)/bin
+MAN1DIR?=$(PREFIX)/man/man1
+MAN5DIR?=$(PREFIX)/man/man5
+SHAREDIR?=$(PREFIX)/share/tn3270
+
+BINMODE?=755
+MANMODE?=644
+FILESMODE?=644
+
+############################################################
+# compile flags
+
+CFLAGS+=-fstack-protector -Wstack-protector --param ssp-buffer-size=1
+CFLAGS+=-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
+CFLAGS+=-Wsign-compare -Wno-traditional -Wno-pointer-sign
+CFLAGS+=-DTERMCAP -DSRCRT -DKLUDGELINEMODE -DUSE_TERMIO -DTN3270 -Dunix
+
+############################################################
+# programs
+
+CC?=cc
+CFLAGS?=-O
+
+MKDEP?=$(CC) -MM
+
+INSTALL?=install
+
+INSTALLDIR=$(INSTALL) -d
+INSTALLBIN?=$(INSTALL) -c -m $(BINMODE)
+INSTALLMAN?=$(INSTALL) -c -m $(MANMODE)
+INSTALLFILE?=$(INSTALL) -c -m $(FILESMODE)
+
+CFLAGS+=-DPATH_MAP3270=\"$(SHAREDIR)/map3270\"
diff -r ac9a2e4d1b36 -r a55869d29e6a comms/tn3270/files/mset/Makefile
--- a/comms/tn3270/files/mset/Makefile  Sun Jan 17 01:33:16 2010 +0000
+++ b/comms/tn3270/files/mset/Makefile  Sun Jan 17 01:41:33 2010 +0000
@@ -1,30 +1,28 @@
-#      $NetBSD: Makefile,v 1.1.1.1 2010/01/17 01:33:23 dholland Exp $
-#      From NetBSD: Makefile,v 1.26 2003/10/21 10:01:22 lukem Exp 
+#      $NetBSD: Makefile,v 1.2 2010/01/17 01:41:34 dholland Exp $
 
-.include <bsd.own.mk>
+TOP=..
+include $(TOP)/mk/setup.mk
 
-PROG=  mset
 MAN=   mset.1 map3270.5
-SRCS=  astosc.c map3270.c mset.c
-DPSRCS=        astosc.out
+
+CFLAGS+=-I.
 
-MKASTOSCDIR!=cd $(.CURDIR)/../tools/mkastosc && ${PRINTOBJDIR}
-MKASTOSC=${MKASTOSCDIR}/mkastosc
+PROG=mset
+SRCS=../api/astosc.c ../ascii/map3270.c ../ascii/mset.c
+GENFILES=astosc.out
 
-${MKASTOSC}:
-       @cd ${.CURDIR}/../tools/mkastosc && ${MAKE}
+include $(TOP)/mk/prog.mk
+
+MKASTOSC=../tools/mkastosc/mkastosc
 
-CLEANFILES+= astosc.out
-astosc.out: ${.CURDIR}/../ctlr/hostctlr.h ${.CURDIR}/../ctlr/function.h \
-           ${.CURDIR}/../ctlr/${KBD} ${MKASTOSC}
-       ${_MKTARGET_CREATE}
-       ${MKASTOSC} \
-           ${.CURDIR}/../ctlr/hostctlr.h ${.CURDIR}/../ctlr/function.h \
-           < ${.CURDIR}/../ctlr/${KBD} > tmp
-       mv -f tmp ${.TARGET}
+astosc.out: ${MKASTOSC} ../ctlr/hostctlr.h ../ctlr/function.h ../ctlr/${KBD}
+       ${MKASTOSC} ../ctlr/hostctlr.h ../ctlr/function.h \
+           < ../ctlr/${KBD} > astosc.tmp
+       mv -f astosc.tmp ${.TARGET}
 
-.include <bsd.prog.mk>
+clean: cleanhere
+cleanhere:
+       rm -f astosc.tmp
 
-.PATH: ${.CURDIR}/../api ${.CURDIR}/../ascii
-
+# depend should catch this, but just in case
 astosc.o:      astosc.out
diff -r ac9a2e4d1b36 -r a55869d29e6a comms/tn3270/files/tn3270/Makefile
--- a/comms/tn3270/files/tn3270/Makefile        Sun Jan 17 01:33:16 2010 +0000
+++ b/comms/tn3270/files/tn3270/Makefile        Sun Jan 17 01:41:33 2010 +0000
@@ -1,87 +1,88 @@
-#      $NetBSD: Makefile,v 1.1.1.1 2010/01/17 01:33:25 dholland Exp $
-#      From NetBSD: Makefile,v 1.38 2008/08/29 00:02:24 gmcgarry Exp 
+#      $NetBSD: Makefile,v 1.2 2010/01/17 01:41:34 dholland Exp $
 
-.include <bsd.own.mk>
-
-CPPFLAGS+=-I${NETBSDSRCDIR}/lib -I${NETBSDSRCDIR}/usr.bin/telnet
-LDADD+=        -lcurses -lcrypt
-DPADD+=        ${LIBCURSES} ${LIBCRYPT}
+TOP=..
+include $(TOP)/mk/setup.mk
 
-PROG=  tn3270
-SRCS=  api.c api_bsd.c api_exch.c apilib.c asc_ebc.c astosc.c commands.c \
-       dctype.c disp_asc.c ebc_disp.c function.c genbsubs.c genget.c \
-       globals.c inbound.c main.c map3270.c network.c oia.c options.c \
-       outbound.c ring.c sys_bsd.c system.c telnet.c termin.c terminal.c \
-       termout.c tn3270.c utilities.c
-DPSRCS=        asc_disp.out astosc.out disp_asc.out kbd.out
+#.if (defined(HAVE_GCC) && ${HAVE_GCC} == 4) || defined(HAVE_PCC)
+#.for f in api commands system telnet terminal termout tn3270 utilities
+#COPTS.${f}.c+=  -Wno-pointer-sign
+#.endfor
+#.endif
 
-MKASTOSCDIR !=cd $(.CURDIR)/../tools/mkastosc && ${PRINTOBJDIR}
-MKASTOSC= ${MKASTOSCDIR}/mkastosc
-
-${MKASTOSC}:
-       @cd ${.CURDIR}/../tools/mkastosc && ${MAKE}
+CFLAGS+=-I.
 
-MKASTODSDIR!=cd $(.CURDIR)/../tools/mkastods && ${PRINTOBJDIR}
-MKASTODS= ${MKASTODSDIR}/mkastods
-
-${MKASTODS}:
-       @cd ${.CURDIR}/../tools/mkastods && ${MAKE}
+PROG=tn3270
+SRCS=\
+       ../api/api_bsd.c \
+       ../api/api_exch.c \
+       ../api/apilib.c \
+       ../api/asc_ebc.c \
+       ../api/astosc.c \
+       ../api/dctype.c \
+       ../api/disp_asc.c \
+       ../api/ebc_disp.c \
+       ../ascii/map3270.c \
+       ../ascii/termin.c \
+       ../ctlr/api.c \
+       ../ctlr/function.c \
+       ../ctlr/inbound.c \
+       ../ctlr/oia.c \
+       ../ctlr/options.c \
+       ../ctlr/outbound.c \
+       ../general/genbsubs.c \
+       ../general/globals.c \
+       ../sys_curses/system.c \
+       ../sys_curses/termout.c
 
-MKDSTOASDIR!=cd $(.CURDIR)/../tools/mkdstoas && ${PRINTOBJDIR}
-MKDSTOAS= ${MKDSTOASDIR}/mkdstoas
-
-${MKDSTOAS}:
-       @cd ${.CURDIR}/../tools/mkdstoas && ${MAKE}
+GENFILES=asc_disp.out astosc.out disp_asc.out kbd.out
 
-MKHITSDIR!=cd $(.CURDIR)/../tools/mkhits && ${PRINTOBJDIR}
-MKHITS= ${MKHITSDIR}/mkhits
-
-${MKHITS}:
-       @cd ${.CURDIR}/../tools/mkhits && ${MAKE}
+CFLAGS+=-I../telnet
+SRCS+=\
+       ../telnet/libtelnet/genget.c \
+       ../telnet/commands.c \
+       ../telnet/main.c \
+       ../telnet/network.c \
+       ../telnet/ring.c \
+       ../telnet/sys_bsd.c \
+       ../telnet/telnet.c \
+       ../telnet/terminal.c \
+       ../telnet/tn3270.c \
+       ../telnet/utilities.c
 
-astosc.out: ${.CURDIR}/../ctlr/hostctlr.h ${.CURDIR}/../ctlr/function.h \
-           ${.CURDIR}/../ctlr/${KBD} ${MKASTOSC}
-       ${_MKTARGET_CREATE}
-       ${MKASTOSC} \
-           ${.CURDIR}/../ctlr/hostctlr.h ${.CURDIR}/../ctlr/function.h \
-           < ${.CURDIR}/../ctlr/${KBD} > astosc.tmp
+LIBS+=-lcurses
+LIBS+=-lcrypt
+
+include $(TOP)/mk/prog.mk
+
+MKASTOSC=../tools/mkastosc/mkastosc
+MKASTODS=../tools/mkastods/mkastods
+MKDSTOAS=../tools/mkdstoas/mkdstoas
+MKHITS=../tools/mkhits/mkhits
+
+astosc.out: ${MKASTOSC} ../ctlr/hostctlr.h ../ctlr/function.h ../ctlr/${KBD}
+       ${MKASTOSC} ../ctlr/hostctlr.h ../ctlr/function.h \
+          < ../ctlr/${KBD} > astosc.tmp
        mv -f astosc.tmp ${.TARGET}
-CLEANFILES+=   astosc.tmp astosc.out
 
 asc_disp.out: ${MKASTODS}
-       ${_MKTARGET_CREATE}
        ${MKASTODS} > asc_disp.tmp
        mv -f asc_disp.tmp ${.TARGET}
-CLEANFILES+=   asc_disp.tmp asc_disp.out



Home | Main Index | Thread Index | Old Index