1 # For the OpenBSD auto patching mechanism and compatibility environment
2 # setup, original OpenBSD sources a put into a OpenBSD subdirectory.
3 # If a file with the same name, but suffix ".patch" is in that directory,
4 # that patch will be applied before use.
6 # The OBSDMDSRCS, OBSDMISRCS, OBSDORIGHDRS and OBSDSRCS variables must be set,
7 # and bracketed by .include of Makefile.obsd_begin and Makefile.obsd_end
9 # Set up dependencies between the OpenBSD source (in a OpenBSD subdirectory)
10 # and a file with a -obsd.x suffix (where x is 'c' or 's'). The suffix
11 # rules will then compile the file with the simulate OpenBSD environment.
13 OBSDSECTIONS= 1 2 3 4 5 6 7 8 9
15 .for _src in ${OBSDSRCS}
17 ${_src:R}-obsd.${_src:E}: OpenBSD/${_src} _AUTOPATCHCUR
18 AUTOPATCHSRCS+= ${_src:R}-obsd.${_src:E}
24 .for _src in ${OBSDMDSRCS}
26 ${_src:R}-obsd.${_src:E}: OpenBSD/${_src} _AUTOPATCHCUR
27 AUTOPATCHSRCS+= ${_src:R}-obsd.${_src:E}
33 .for _src in ${OBSDMISRCS}
35 ${_src:R}-obsd.${_src:E}: OpenBSD/${_src} _AUTOPATCHCUR
36 AUTOPATCHSRCS+= ${_src:R}-obsd.${_src:E}
43 .for _src in ${OBSDHDRS}
44 ${_src}: OpenBSD/${_src} _AUTOPATCHCUR
45 AUTOPATCHHDRS+= ${_src}
49 .for _sect in ${OBSDSECTIONS}
50 .for _src in ${OBSDMAN${_sect}}
52 ${_src}: OpenBSD/${_src} _AUTOPATCH
53 AUTOPATCHMAN+= ${_src}