Makefile.obsd_end   [plain text]


# For the OpenBSD auto patching mechanism and compatibility environment
# setup, original OpenBSD sources a put into a OpenBSD subdirectory.
# If a file with the same name, but suffix ".patch" is in that directory,
# that patch will be applied before use.
#
# The OBSDMDSRCS, OBSDMISRCS, OBSDORIGHDRS and OBSDSRCS variables must be set,
# and bracketed by .include of Makefile.obsd_begin and Makefile.obsd_end
#
# Set up dependencies between the OpenBSD source (in a OpenBSD subdirectory)
# and a file with a -obsd.x suffix (where x is 'c' or 's').  The suffix
# rules will then compile the file with the simulate OpenBSD environment.

OBSDSECTIONS= 1 2 3 4 5 6 7 8 9

.for _src in ${OBSDSRCS}
.ifmake autopatch
${_src:R}-obsd.${_src:E}: OpenBSD/${_src} _AUTOPATCHCUR
AUTOPATCHSRCS+= ${_src:R}-obsd.${_src:E}
.else # !autopatch
SRCS+= ${_src}
.endif # autopatch
.endfor

.for _src in ${OBSDMDSRCS}
.ifmake autopatch
${_src:R}-obsd.${_src:E}: OpenBSD/${_src} _AUTOPATCHCUR
AUTOPATCHSRCS+= ${_src:R}-obsd.${_src:E}
.else # !autopatch
MDSRCS+= ${_src}
.endif # autopatch
.endfor

.for _src in ${OBSDMISRCS}
.ifmake autopatch
${_src:R}-obsd.${_src:E}: OpenBSD/${_src} _AUTOPATCHCUR
AUTOPATCHSRCS+= ${_src:R}-obsd.${_src:E}
.else # !autopatch
MISRCS+= ${_src}
.endif # autopatch
.endfor

.ifmake autopatch
.for _src in ${OBSDHDRS}
${_src}: OpenBSD/${_src} _AUTOPATCHCUR
AUTOPATCHHDRS+= ${_src}
.endfor
.endif # autopatch

.for _sect in ${OBSDSECTIONS}
.for _src in ${OBSDMAN${_sect}}
.ifmake autopatch
${_src}: OpenBSD/${_src} _AUTOPATCH
AUTOPATCHMAN+= ${_src}
.else # !autopatch
MAN${_sect}+= ${_src}
.endif # autopatch
.endfor
.endfor