File: Makefile.bsd-wrapper

package info (click to toggle)
jupp 3.1.38-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,420 kB
  • sloc: ansic: 31,382; sh: 4,199; makefile: 431
file content (89 lines) | stat: -rw-r--r-- 2,671 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# $MirOS: contrib/code/jupp/Makefile.bsd-wrapper,v 1.18 2018/10/20 15:43:58 tg Exp $
#-
# make -f Makefile.bsd-wrapper CFPREFIX=/usr/mpkg sysconfjoesubdir=/joe

MAN=		joe.1
INST_TARGET=	INSTALL_MAN= install
CLEANFILES+=	.deps charmap charmaps i18n syntax joe.txt{,~} jupp

CFPREFIX?=	/usr/local
.if ${CFPREFIX} == "/usr"
CFMANDIR?=	/usr/share/man
.endif
CFMANDIR?=	${CFPREFIX}/man
CFETC?=		/etc

sysconfjoesubdir?=/jupp

CFARGS+=	--prefix=${CFPREFIX:Q} \
		--bindir=${CFPREFIX:Q}/bin \
		--mandir=${CFMANDIR:Q} \
		--sysconfdir=${CFETC:Q} \
		${GCFARGS} \
		--enable-sysconfjoesubdir=${sysconfjoesubdir:Q}

.ifmake winman
CFARGS+=	--enable-win32reloc
.endif

.include <bsd.own.mk>
FSFISLIB=	No

.ifdef __CRAZY
COPTS+=		-Wno-unused-parameter -Wno-cast-qual
.  if exists(/usr/include/jupp.tmp.h) && !defined(wnostrict)
CPPFLAGS+=	-DGCC_Wstrict_prototypes
.  else
COPTS+=		-Wno-strict-prototypes
.  endif
.endif

joe.1: config.status
	cd ${FSFOBJDIR} && ${FSFMAKE} $@

all: jupplink
jupplink: config.status
	@ln -sf joe jupp

winman: joe.1
	nrcon -mandoc joe.1 | col -bx >joe.txt~
	print '$$-3,$$d\n,g/^MirOS BSD/.-3,.+10d\nwq' | ed -s joe.txt~
	cat -s joe.txt~ | sed \
	    -e 's/\(jupp\)\( .global-options\)/\132\2/' \
	    -e '1d' -e '$$d' -e $$'s/$$/\r/' >joe.txt


.ifmake cats
V_GROFF!=	pkg_info -e 'groff-*'
V_GHOSTSCRIPT!=	pkg_info -e 'ghostscript-*'
.  if empty(V_GROFF) || empty(V_GHOSTSCRIPT)
.    error empty V_GROFF=${V_GROFF} or V_GHOSTSCRIPT=${V_GHOSTSCRIPT}
.  endif
.endif

CLEANFILES+=	joe.htm joe.ps1 joe.pdf
CATS_KW=	jmacs, joe, jpico, jstar, jupp, rjoe
CATS_TITLE_joe_1=joe - Joe's Own Editor
cats: joe.cat1 joe.ps1
	set -e; . ${BSDSRCDIR:Q}/scripts/roff2htm; set_target_absolute; \
	    do_conversion_verbose joe 1 joe.cat1 joe.htm
	x=$$(ident joe.1 | \
	    awk '/Mir''OS:/ { print $$4$$5; }' | \
	    tr -dc 0-9); (( $${#x} == 14 )) || exit 1; exec \
	    ${MKSH} ${BSDSRCDIR:Q}/contrib/hosted/tg/ps2pdfmir -p pa4 -c \
	    -o joe.pdf '[' /Author '(The MirOS Project)' \
	    /Title '('${CATS_TITLE_joe_1:Q}')' \
	    /Subject '(BSD Reference Manual)' /ModDate "(D:$$x)" \
	    /Creator '(GNU groff version ${V_GROFF:S/groff-//} \(MirPorts\))' \
	    /Producer '(Artifex Ghostscript ${V_GHOSTSCRIPT:S/ghostscript-//:S/-artifex//} \(MirPorts\))' \
	    /Keywords '('${CATS_KW:Q}')' /DOCINFO pdfmark \
	    -f joe.ps1

alljupps:
	cd ${.CURDIR:Q} && r=$$(<CVS/Root) && cd .. && rm -rf j28 j37 j44 && \
	    cvs -Rqd "$$r" co -d j28 -r joe-2_8-msdos jupp && \
	    cvs -Rqd "$$r" co -d j37 -r jupprc-for-joe-3_7 jupp && \
	    cvs -Rqd "$$r" co -d j44 -r jupprc-for-joe-4_4 jupp && \
	    cd jupp && exec cvs -Rqd "$$r" up -PAd

.include <bsd.cfwrap.mk>