summaryrefslogtreecommitdiff
path: root/gnu/usr.bin/perl/Makefile.bsd-wrapper
blob: 7f06f0e3c5ce89b7080c364f49d71319fe8f3824 (plain)
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
#	$OpenBSD: Makefile.bsd-wrapper,v 1.23 1998/10/19 17:09:39 millert Exp $
#
# Build wrapper for Perl 5.003.
#

# Our lndir is hacked; specify a full path to avoid potential conflicts
# with the one installed with X11.
LNDIR=		/usr/bin/lndir

H2PH=		/usr/bin/h2ph

# Pod (plain old documentation) files.  These get turned into man pages.
# We treat those pod files that don't end in .pod as a special case
POD=		pod/perl.pod pod/perlapio.pod pod/perlbook.pod pod/perlbot.pod \
		pod/perlcall.pod pod/perldata.pod pod/perldebug.pod \
		pod/perldelta.pod pod/perldiag.pod pod/perldsc.pod \
		pod/perlembed.pod pod/perlfaq.pod pod/perlfaq1.pod \
		pod/perlfaq2.pod pod/perlfaq3.pod pod/perlfaq4.pod \
		pod/perlfaq5.pod pod/perlfaq6.pod pod/perlfaq7.pod \
		pod/perlfaq8.pod pod/perlfaq9.pod pod/perlform.pod \
		pod/perlfunc.pod pod/perlguts.pod pod/perlipc.pod \
		pod/perllocale.pod pod/perllol.pod pod/perlmod.pod \
		pod/perlmodlib.pod pod/perlobj.pod pod/perlop.pod \
		pod/perlpod.pod pod/perlre.pod \
		pod/perlref.pod pod/perlrun.pod pod/perlsec.pod \
		pod/perlstyle.pod pod/perlsub.pod pod/perlsyn.pod \
		pod/perltie.pod pod/perltoc.pod pod/perltoot.pod \
		pod/perltrap.pod pod/perlvar.pod pod/perlxs.pod \
		pod/perlxstut.pod x2p/a2p.pod
# Don't install these for now (need special install to do / > ::)
#		lib/Devel/SelfStubber.pm lib/IPC/Open2.pm lib/IPC/Open3.pm \
#		lib/Net/Ping.pm lib/Net/hostent.pm lib/Net/netent.pm \
#		lib/Net/protoent.pm lib/Net/servent.pm lib/ExtUtils/Install.pm \
#		lib/ExtUtils/Liblist.pm lib/ExtUtils/MM_OS2.pm \
#		lib/ExtUtils/MM_Unix.pm lib/ExtUtils/MM_VMS.pm \
#		lib/ExtUtils/MakeMaker.pm lib/ExtUtils/Manifest.pm \
#		lib/ExtUtils/Mkbootstrap.pm lib/ExtUtils/Mksymlists.pm \
#		lib/ExtUtils/testlib.pm lib/ExtUtils/Command.pm \
#		lib/ExtUtils/Embed.pm lib/ExtUtils/MM_Win32.pm \
#		lib/File/Basename.pm lib/File/CheckTree.pm lib/File/Copy.pm \
#		lib/File/Find.pm lib/File/Path.pm lib/File/Compare.pm \
#		lib/File/DosGlob.pm lib/File/stat.pm lib/Getopt/Long.pm \
#		lib/Getopt/Std.pm lib/I18N/Collate.pm lib/Math/BigFloat.pm \
#		lib/Math/BigInt.pm lib/Math/Complex.pm lib/Math/Trig.pm \
#		lib/Pod/Functions.pm lib/Pod/Text.pm lib/Pod/Html.pm \
#		lib/Search/Dict.pm lib/Sys/Hostname.pm lib/Sys/Syslog.pm \
#		lib/Term/Cap.pm lib/Term/Complete.pm lib/Term/ReadLine.pm \
#		lib/Test/Harness.pm lib/Text/Abbrev.pm lib/Text/ParseWords.pm \
#		lib/Text/Soundex.pm lib/Text/Tabs.pm lib/Text/Wrap.pm \
#		lib/Tie/Hash.pm lib/Tie/Scalar.pm lib/Tie/SubstrHash.pm \
#		lib/Tie/RefHash.pm lib/Time/Local.pm lib/Time/gmtime.pm \
#		lib/Time/localtime.pm lib/Time/tm.pm lib/AnyDBM_File.pm \
#		lib/AutoLoader.pm lib/AutoSplit.pm lib/Benchmark.pm \
#		lib/Carp.pm lib/Cwd.pm lib/DirHandle.pm lib/English.pm \
#		lib/Env.pm lib/Exporter.pm lib/FileCache.pm lib/SelectSaver.pm \
#		lib/SelfLoader.pm lib/Shell.pm lib/Symbol.pm \
#		lib/diagnostics.pm lib/integer.pm lib/less.pm lib/lib.pm \
#		lib/overload.pm lib/sigtrap.pm lib/strict.pm lib/subs.pm \
#		lib/vars.pm lib/Bundle/CPAN.pm lib/CGI/Apache.pm \
#		lib/CGI/Carp.pm lib/CGI/Fast.pm lib/CGI/Push.pm \
#		lib/CGI/Switch.pm lib/CGI.pm lib/CPAN.pm lib/CPAN/FirstTime.pm \
#		lib/CPAN/Nox.pm lib/Class/Struct.pm lib/FileHandle.pm \
#		lib/FindBin.pm lib/UNIVERSAL.pm lib/User/grent.pm \
#		lib/User/pwent.pm lib/autouse.pm lib/base.pm lib/blib.pm \
#		lib/constant.pm lib/locale.pm

.include <bsd.own.mk>

.ifndef NOMAN
MANALL=		${POD:S/.pod$/.cat1/g:S/.pm$/.cat3p/g} \
		utils/c2ph.cat1 utils/h2ph.cat1 utils/h2xs.cat1 \
		utils/perldoc.cat1 utils/perlbug.cat1 utils/pl2pm.cat1 \
		utils/splain.cat1 x2p/s2p.cat1 pod/pod2man.cat1 \
		pod/pod2html.cat1 utils/pstruct.cat1 xsubpp.cat1
.else
MANALL=
.endif

MANLOCALBUILD=	yes

.if defined (INSTALL_STRIP) && ${INSTALL_STRIP} == "-s"
INST_PROG='/usr/bin/install -cs'
.else
INST_PROG='/usr/bin/install -c'
.endif

.SUFFIXES: .pod .pm .cat1 cat3p

.pod.cat1:
	@echo "./perl -I./lib ./pod/pod2man --section=1 --official ${.IMPSRC} | ${NROFF} -man > ${.TARGET}"
	./perl -I$./lib ./pod/pod2man --section=1 --official ${.IMPSRC} | ${NROFF} -man > ${.TARGET} || (rm -f ${.TARGET}; false)
# XXX - '/' needs to become :: when installed (need own maninstall target?)
.pm.cat3p:
	@echo "./perl -I./lib ./pod/pod2man --section=3p --official ${.IMPSRC} | ${NROFF} -man > ${.TARGET}"
	./perl -I./lib ./pod/pod2man --section=1 --official ${.IMPSRC} | ${NROFF} -man > ${.TARGET} || (rm -f ${.TARGET}; false)

GENERATED=	config.sh Makefile cflags config.h makeaperl makedepend \
		makedir perl.exp writemain x2p/Makefile x2p/cflags

CLEANFILES=	config.sh ${MAN} ${MANALL}

.BEGIN:
	@if [ ${.CURDIR} != ${.OBJDIR} ]; then ${LNDIR} -s -e obj -e obj.${MACHINE_ARCH} -e Makefile.bsd-wrapper ${.CURDIR}; fi

all:	${GENERATED}
	(cd ${.OBJDIR}; ${MAKE})

config.sh: config.sh.OpenBSD
	(cd ${.OBJDIR}; /usr/bin/env PATH="/bin:/usr/bin:/sbin:/usr/sbin" \
	 /bin/sh Configure -f config.sh.OpenBSD -dsE)

Makefile:
	(cd ${.OBJDIR}; /bin/sh Makefile.SH)

cflags:
	(cd ${.OBJDIR}; /bin/sh cflags.SH)

config.h:
	(cd ${.OBJDIR}; /bin/sh config_h.SH)

makeaperl:
	(cd ${.OBJDIR}; /bin/sh makeaperl.SH)

makedepend:
	(cd ${.OBJDIR}; /bin/sh makedepend.SH)

makedir:
	(cd ${.OBJDIR}; /bin/sh makedir.SH)

perl.exp:
	(cd ${.OBJDIR}; /bin/sh perl_exp.SH)

writemain:
	(cd ${.OBJDIR}; /bin/sh writemain.SH)

x2p/Makefile:
	(cd ${.OBJDIR}/x2p; /bin/sh Makefile.SH)

x2p/cflags:
	(cd ${.OBJDIR}/x2p; /bin/sh cflags.SH)

utils/c2ph.cat1: utils/c2ph
	@echo "./perl -I./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET}"
	./perl -I$./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET} || (rm -f ${.TARGET}; false)

utils/h2ph.cat1: utils/h2ph
	@echo "./perl -I./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET}"
	./perl -I$./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET} || (rm -f ${.TARGET}; false)

utils/h2xs.cat1: utils/h2xs
	@echo "./perl -I./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET}"
	./perl -I$./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET} || (rm -f ${.TARGET}; false)

utils/perldoc.cat1: utils/perldoc
	@echo "./perl -I./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET}"
	./perl -I$./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET} || (rm -f ${.TARGET}; false)

utils/perlbug.cat1: utils/perlbug
	@echo "./perl -I./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET}"
	./perl -I$./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET} || (rm -f ${.TARGET}; false)

utils/pl2pm.cat1: utils/pl2pm
	@echo "./perl -I./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET}"
	./perl -I$./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET} || (rm -f ${.TARGET}; false)

utils/splain.cat1: utils/splain
	@echo "./perl -I./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET}"
	./perl -I$./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET} || (rm -f ${.TARGET}; false)

x2p/s2p.cat1: x2p/s2p
	@echo "./perl -I./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET}"
	./perl -I$./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET} || (rm -f ${.TARGET}; false)

pod/pod2man.cat1: pod/pod2man
	@echo "./perl -I./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET}"
	./perl -I$./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET} || (rm -f ${.TARGET}; false)

pod/pod2html.cat1: pod/pod2html
	@echo "./perl -I./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET}"
	./perl -I$./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET} || (rm -f ${.TARGET}; false)

utils/pstruct.cat1: utils/pstruct
	@echo "./perl -I./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET}"
	./perl -I$./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET} || (rm -f ${.TARGET}; false)

xsubpp.cat1: lib/ExtUtils/xsubpp
	@echo "./perl -I./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET}"
	./perl -I$./lib ./pod/pod2man --section=1 --official ${.ALLSRC} | ${NROFF} -man > ${.TARGET} || (rm -f ${.TARGET}; false)

.ifdef NOMAN
maninstall:
	@echo NOMAN is set
.endif

install: install.perl ${MANALL} maninstall
	(cd ${DESTDIR}/usr/include; ${H2PH} \
		-d ${DESTDIR}/usr/lib/perl5/site_perl/${MACHINE_ARCH}-openbsd \
		*.h arpa/*.h machine/*.h net/*.h protocols/*.h sys/*.h)
	-chmod -R a+rX ${DESTDIR}/usr/lib/perl5

install.perl:
	(cd ${.OBJDIR}; INSTALL=${INSTALL} INSTALL_COPY=${INSTALL_COPY} \
	 INSTALL_STRIP=${INSTALL_STRIP} ${MAKE} install.perl)

test:
	-@if [ -e Makefile ]; then ${MAKE} test; fi

clean:
	-@if [ -e Makefile ]; then ${MAKE} realclean; fi

cleandir:
	-@if [ -e Makefile ]; then ${MAKE} realclean; fi
	-@rm -f ${CLEANFILES}

depend:
	# Nothing here so far...

lint:
	# Nothing here so far...

tags:
	# Nothing here so far...

.include <bsd.obj.mk>
.include <bsd.subdir.mk>
.ifndef NOMAN
.include <bsd.man.mk>
.endif