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 # This .for statement forces evaluation of ${CWD}
18 .for _src in ${OBSDSRCS}
20 ${_cwd}/${_src:R}-obsd.${_src:E}: ${_cwd}/OpenBSD/${_src} _AUTOPATCH
21 AUTOPATCHSRCS+= ${_cwd}/${_src:R}-obsd.${_src:E}
27 .for _src in ${OBSDMDSRCS}
29 ${_cwd}/${_src:R}-obsd.${_src:E}: ${_cwd}/OpenBSD/${_src} _AUTOPATCH
30 AUTOPATCHSRCS+= ${_cwd}/${_src:R}-obsd.${_src:E}
36 .for _src in ${OBSDMISRCS}
38 ${_cwd}/${_src:R}-obsd.${_src:E}: ${_cwd}/OpenBSD/${_src} _AUTOPATCH
39 AUTOPATCHSRCS+= ${_cwd}/${_src:R}-obsd.${_src:E}
46 .for _src in ${OBSDHDRS}
47 ${_cwd}/${_src}: ${_cwd}/OpenBSD/${_src} _AUTOPATCH
48 AUTOPATCHHDRS+= ${_cwd}/${_src}
52 .for _sect in ${OBSDSECTIONS}
53 .for _src in ${OBSDMAN${_sect}}
55 ${_cwd}/${_src}: ${_cwd}/OpenBSD/${_src} _AUTOPATCH
56 AUTOPATCHMAN+= ${_cwd}/${_src}