Merge tag 'v3.0.0-20141228' into debian
v3.0.0-20141228
Michael Grünewald
9 years ago
15 | 15 | |
16 | 16 | .include "bps.init.mk" |
17 | 17 | |
18 | all configure depend build doc: | |
19 | ${NOP} | |
20 | test: do-test | |
21 | clean: do-clean | |
22 | distclean: clean | |
23 | realclean: distclean | |
18 | TEST_SEQUENCE?= clean obj depend build doc install | |
19 | ||
20 | TEST_ENV+= DESTDIR='/tmp/${USER}${PACKAGEDIR}$${TESTDIR}$${ARCHITECTUREDIR}$${CONFIGURATIONDIR}' | |
21 | TEST_ENV+= PREFIX='/usr/local' | |
22 | TEST_ENV+= USE_SWITCH_CREDENTIALS='no' | |
23 | TEST_ENV+= MAKEOBJDIRPREFIX='/tmp/${USER}${PACKAGEDIR}$${TESTDIR}$${ARCHITECTUREDIR}$${CONFIGURATIONDIR}' | |
24 | TEST_ENV+= PACKAGELIBRARYCONFIGURATION='${SRCDIR}/testsuite/Library/Configuration' | |
25 | TEST_ENV+= PACKAGELIBRARYARCHITECTURE='${SRCDIR}/testsuite/Library/Configuration' | |
26 | TEST_ENV+= BSDOWLSRCDIR='${SRCDIR}' | |
27 | TEST_ENV+= TESTSRCDIR='${SRCDIR}/testsuite/src' | |
28 | TEST_ENV+= TESTDIR='${.CURDIR:C,${SRCDIR}/testsuite,,}/${.ALLSRC:M*.mk:C/.mk$//}' | |
29 | ||
30 | TEST_ENV_UNSET+= SRCDIR | |
31 | TEST_ENV_UNSET+= WRKDIR | |
32 | TEST_ENV_UNSET+= PACKAGE | |
33 | TEST_ENV_UNSET+= PACKAGEDIR | |
34 | TEST_ENV_UNSET+= OFFICER | |
35 | TEST_ENV_UNSET+= VERSION | |
36 | TEST_ENV_UNSET+= MODULE | |
37 | TEST_ENV_UNSET+= EXTERNAL | |
24 | 38 | |
25 | 39 | MP2EPS= ${SH} ${SRCDIR}/support/mp2eps.sh |
26 | 40 | MP2PNG= ${SH} ${SRCDIR}/support/mp2png.sh |
30 | 44 | .export MP2PNG |
31 | 45 | .export MP2PDF |
32 | 46 | |
33 | .for variable in SRCDIR WRKDIR\ | |
34 | PACKAGE PACKAGEDIR OFFICER VERSION MODULE EXTERNAL | |
35 | MAKETEST+= unset ${variable}; | |
36 | .endfor | |
37 | ||
38 | MAKETEST+= ${ENVTOOL} | |
39 | MAKETEST+= DESTDIR='/tmp/${USER}${PACKAGEDIR}$${TESTDIR}$${ARCHITECTUREDIR}$${CONFIGURATIONDIR}' | |
40 | MAKETEST+= PREFIX='/usr/local' | |
41 | MAKETEST+= USE_SWITCH_CREDENTIALS='no' | |
42 | MAKETEST+= MAKEOBJDIRPREFIX='/tmp/${USER}${PACKAGEDIR}$${TESTDIR}$${ARCHITECTUREDIR}$${CONFIGURATIONDIR}' | |
43 | MAKETEST+= PACKAGELIBRARYCONFIGURATION='${SRCDIR}/testsuite/Library/Configuration' | |
44 | MAKETEST+= PACKAGELIBRARYARCHITECTURE='${SRCDIR}/testsuite/Library/Configuration' | |
45 | MAKETEST+= BSDOWLSRCDIR='${SRCDIR}' | |
46 | MAKETEST+= TESTSRCDIR='${SRCDIR}/testsuite/src' | |
47 | MAKETEST+= TESTDIR='${.CURDIR:C,${SRCDIR}/testsuite,,}/${.ALLSRC:M*.mk:C/.mk$//}' | |
48 | MAKETEST+= ${MAKE} | |
49 | ||
50 | TESTSEQUENCE?= clean obj depend build doc install | |
51 | ||
52 | .ORDER: ${TEST:C@^@do-test-@} | |
53 | .ORDER: ${TEST:C@$@.done@} | |
54 | ||
55 | .for test in ${TEST} | |
56 | .if exists(${test}.mk) | |
57 | do-test: do-test-${test} | |
58 | do-test-${test}: ${test}.done | |
59 | ${test}.done: ${test}.mk | |
60 | .for step in ${TESTSEQUENCE} | |
61 | ${INFO} testsuite/${SUBDIR_PREFIX}${test} '(${step})' | |
62 | @${MAKETEST} -f ${.ALLSRC:M*.mk} ${step} | |
63 | .endfor | |
64 | ${INFO} testsuite/${SUBDIR_PREFIX}${test} '(test)' | |
65 | @${MAKETEST} -f ${.ALLSRC:M*.mk} test | |
66 | touch ${test}.done | |
67 | do-clean: do-clean-${test} | |
68 | do-clean-${test}: ${test}.mk .PHONY | |
69 | ${INFO} testsuite/${SUBDIR_PREFIX}${test} '(clean)' | |
70 | @${RM} -f ${test}.done | |
71 | @${MAKETEST} -f ${.ALLSRC:M*.mk} realclean | |
72 | .else | |
73 | .error ${test}: Test is not defined. | |
74 | .endif | |
75 | .endfor | |
76 | ||
77 | display-makeflags: | |
78 | @printf '.MAKEFLAGS: %s\n' ${MAKEFLAGS} | |
79 | ||
80 | .include "bps.usertarget.mk" | |
47 | .include "generic.test.mk" | |
81 | 48 | |
82 | 49 | ### End of file `bsdowl.test.mk' |
38 | 38 | .MAKEFLAGS: -I${.CURDIR}/${subdir} |
39 | 39 | .endfor |
40 | 40 | |
41 | .include "bps.project.mk" | |
41 | .include "generic.project.mk" | |
42 | 42 | |
43 | 43 | ### End of file `Makefile' |
0 | ### @autoconf_input@ | |
1 | ||
2 | # Author: Michael Grünewald | |
3 | # Date: Fri Feb 10 16:50:40 GMT 2006 | |
4 | ||
5 | # BSD Owl Scripts (https://github.com/michipili/bsdowl) | |
6 | # This file is part of BSD Owl Scripts | |
7 | # | |
8 | # Copyright © 2005–2014 Michael Grünewald | |
9 | # | |
10 | # This file must be used under the terms of the CeCILL-B. | |
11 | # This source file is licensed as described in the file COPYING, which | |
12 | # you should have received as part of this distribution. The terms | |
13 | # are also available at | |
14 | # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt | |
15 | ||
16 | PROJECT= bsdowl | |
17 | OFFICER= michipili@gmail.com | |
18 | VERSION= @version@ | |
19 | ||
20 | prefix?= @prefix@ | |
21 | exec_prefix?= @exec_prefix@ | |
22 | bindir?= @bindir@ | |
23 | sbindir?= @sbindir@ | |
24 | libexecdir?= @libexecdir@ | |
25 | datarootdir?= @datarootdir@ | |
26 | datadir?= @datadir@ | |
27 | sysconfdir?= @sysconfdir@ | |
28 | sharedstatedir?= @sharedstatedir@ | |
29 | localstatedir?= @localstatedir@ | |
30 | runstatedir?= @runstatedir@ | |
31 | includedir?= @includedir@ | |
32 | docdir?= @docdir@ | |
33 | infodir?= @infodir@ | |
34 | libdir?= @libdir@ | |
35 | localedir?= @localedir@ | |
36 | mandir?= @mandir@ | |
37 | ||
38 | PREFIX?= ${prefix} | |
39 | EXEC_PREFIX?= ${exec_prefix} | |
40 | DATAROOTDIR?= ${datarootdir} | |
41 | SCRIPTDIR?= ${_BPS_LIBEXEC}${PACKAGEDIR} | |
42 | SHAREDIR?= ${_BPS_DATADIR}${PACKAGEDIR} | |
43 | ||
44 | # Local Variables: | |
45 | # mode: makefile | |
46 | # End: | |
47 | ||
48 | ### End of file `Makefile.config.in' |
0 | ### @autoconf_input@ | |
1 | ||
2 | # Author: Michael Grünewald | |
3 | # Date: Fri Feb 10 16:50:40 GMT 2006 | |
4 | ||
5 | # BSD Owl Scripts (https://github.com/michipili/bsdowl) | |
6 | # This file is part of BSD Owl Scripts | |
7 | # | |
8 | # Copyright © 2005–2014 Michael Grünewald | |
9 | # | |
10 | # This file must be used under the terms of the CeCILL-B. | |
11 | # This source file is licensed as described in the file COPYING, which | |
12 | # you should have received as part of this distribution. The terms | |
13 | # are also available at | |
14 | # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt | |
15 | ||
16 | PROJECT= bsdowl | |
17 | OFFICER= michipili@gmail.com | |
18 | VERSION= @version@ | |
19 | ||
20 | prefix?= @prefix@ | |
21 | exec_prefix?= @exec_prefix@ | |
22 | bindir?= @bindir@ | |
23 | sbindir?= @sbindir@ | |
24 | libexecdir?= @libexecdir@ | |
25 | datarootdir?= @datarootdir@ | |
26 | datadir?= @datadir@ | |
27 | sysconfdir?= @sysconfdir@ | |
28 | sharedstatedir?= @sharedstatedir@ | |
29 | localstatedir?= @localstatedir@ | |
30 | runstatedir?= @runstatedir@ | |
31 | includedir?= @includedir@ | |
32 | docdir?= @docdir@ | |
33 | infodir?= @infodir@ | |
34 | libdir?= @libdir@ | |
35 | localedir?= @localedir@ | |
36 | mandir?= @mandir@ | |
37 | ||
38 | PREFIX?= ${prefix} | |
39 | EXEC_PREFIX?= ${exec_prefix} | |
40 | DATAROOTDIR?= ${datarootdir} | |
41 | SCRIPTDIR?= ${_BPS_LIBEXEC}${PACKAGEDIR} | |
42 | SHAREDIR?= ${_BPS_DATADIR}${PACKAGEDIR} | |
43 | ||
44 | # Local Variables: | |
45 | # mode: makefile | |
46 | # End: | |
47 | ||
48 | ### End of file `Makefile' |
34 | 34 | SHARE+= bps.project.mk |
35 | 35 | SHARE+= bps.m4.mk |
36 | 36 | SHARE+= bps.noweb.mk |
37 | SHARE+= bps.test-expected.mk | |
37 | 38 | |
38 | 39 | .include "generic.files.mk" |
39 | 40 |
53 | 53 | .endif |
54 | 54 | USE_AUTOCONF?=no |
55 | 55 | .if ${USE_AUTOCONF} == yes |
56 | .if "${.CURDIR}" != "${.OBJDIR}" | |
57 | _AUTOCONF_DIR= ${.CURDIR}/ | |
58 | .else | |
59 | _AUTOCONF_DIR= | |
60 | .endif | |
56 | 61 | .for file in config.status config.log |
57 | 62 | .if exists(${file}) |
58 | DISTCLEANFILES+= ${file} | |
63 | DISTCLEANFILES+= ${_AUTOCONF_DIR}${file} | |
59 | 64 | .endif |
60 | 65 | .endfor |
61 | 66 | .if exists(autom4te.cache) |
62 | DISTCLEANDIRS+= autom4te.cache | |
67 | DISTCLEANDIRS+= ${_AUTOCONF_DIR}autom4te.cache | |
63 | 68 | .endif |
64 | 69 | .for file in Makefile.in Makefile.inc.in |
65 | 70 | .if exists(${file})&&empty(CONFIGURE:M${file}) |
66 | 71 | CONFIGURE+= ${file} |
67 | 72 | .endif |
68 | 73 | .endfor |
69 | REALCLEANFILES+= ${CONFIGURE:.in=} | |
74 | .for file in ${CONFIGURE:.in=} | |
75 | REALCLEANFILES+= ${_AUTOCONF_DIR}${file} | |
76 | .endfor | |
70 | 77 | .if exists(configure.ac)||exists(configure.in) |
71 | 78 | .if !defined(REALCLEANFILES)||empty(REALCLEANFILES:Mconfigure) |
72 | REALCLEANFILES+= configure | |
79 | REALCLEANFILES+= ${_AUTOCONF_DIR}configure | |
73 | 80 | .endif |
74 | 81 | .endif |
75 | 82 | .endif # ${USE_AUTOCONF} == yes |
79 | 79 | ${target}-switch-credentials: |
80 | 80 | ${INFO} 'Switching to root credentials for target (${target})' |
81 | 81 | .if ${_BPS_SWITCH_CREDENTIALS_STRATEGY} == su |
82 | @${SU} root -c '${MAKE} ${target}' | |
82 | @(cd ${.CURDIR} && ${SU} root -c '${MAKE} ${target}') | |
83 | 83 | .elif ${_BPS_SWITCH_CREDENTIALS_STRATEGY} == sudo |
84 | @${SUDO} ${MAKE} UID=0 ${target} | |
84 | @(cd ${.CURDIR} && ${SUDO} ${MAKE} UID=0 ${target}>) | |
85 | 85 | .else |
86 | @${MAKE} UID=0 ${target} | |
86 | @(cd ${.CURDIR} && ${MAKE} UID=0 ${target}) | |
87 | 87 | .endif |
88 | 88 | .endif |
89 | 89 | .endfor |
183 | 183 | # The command used to invoke the macro processor M4 |
184 | 184 | # |
185 | 185 | # |
186 | # RELDIR [automatically set] | |
187 | # The current path, relative to ${SRCDIR} | |
188 | # | |
189 | # This is left undefined if SRCDIR is not defined or if it matches | |
190 | # .CURDIR. | |
191 | # | |
192 | # | |
186 | 193 | # _MAKE_USERTARGET [configure obj depend build doc all |
187 | 194 | # install test clean distclean realclean benchmark] |
188 | 195 | # The list of targets that are defined by every module. |
205 | 212 | |
206 | 213 | # Input the package configuration file, if any. |
207 | 214 | .if defined(SRCDIR) && !empty(SRCDIR) |
215 | .sinclude "${SRCDIR}/Makefile.build" | |
216 | .sinclude "${SRCDIR}/Makefile.config" | |
208 | 217 | .if ${SRCDIR} != ${.CURDIR} |
209 | .if exists(${SRCDIR}/${MAKEINITRC}) | |
210 | .include "${SRCDIR}/${MAKEINITRC}" | |
211 | .endif | |
212 | .endif | |
218 | RELDIR:= ${.CURDIR:S@^${SRCDIR}@@} | |
219 | .sinclude "${SRCDIR}/${MAKEINITRC}" | |
220 | .endif | |
221 | .else | |
222 | .sinclude "Makefile.build" | |
223 | .sinclude "Makefile.config" | |
213 | 224 | .endif |
214 | 225 | |
215 | 226 | # Input the current module configuration file, if any. |
216 | .if exists(${.CURDIR}/${MAKEINITRC}) | |
217 | .include "${.CURDIR}/${MAKEINITRC}" | |
218 | .endif | |
227 | .sinclude "${.CURDIR}/${MAKEINITRC}" | |
219 | 228 | |
220 | 229 | |
221 | 230 | # |
352 | 361 | .include "bps.autoconf.mk" |
353 | 362 | .include "bps.credentials.mk" |
354 | 363 | .include "bps.noweb.mk" |
364 | .include "bps.test-expected.mk" | |
355 | 365 | |
356 | 366 | .endif # !target(__<bps.init.mk>__) |
357 | 367 |
26 | 26 | # |
27 | 27 | # |
28 | 28 | # WRKDIR [${.OBJDIR}, inherited] |
29 | # The roor of the objdir-tree of our package. | |
29 | # The root of the objdir-tree of our package. | |
30 | 30 | # |
31 | 31 | # |
32 | 32 | # PACKAGE [last component of SRCDIR, inherited] |
21 | 21 | # Variables: |
22 | 22 | # |
23 | 23 | # THISMODULE [not set] |
24 | # A string identifying the module being built. | |
24 | # A string identifying the module being built. | |
25 | 25 | # |
26 | 26 | # |
27 | 27 | # PRODUCT [not set] |
28 | # The list of products built by the current module | |
28 | # The list of products built by the current module | |
29 | 29 | # |
30 | 30 | # |
31 | # PRODUCTFILE [strategy] | |
32 | # A file exporting the list of available products | |
31 | # PRODUCTFILE [${WRKDIR}/.product] | |
32 | # A file exporting a table of available products | |
33 | # | |
34 | # | |
35 | # PRODUCT_AWK [${AWK} -F'|'] | |
36 | # A awk program that can be used to process the product file | |
33 | 37 | |
34 | 38 | .if !target(__<bps.init.mk>__) |
35 | 39 | .error bps.product.mk cannot be included directly. |
36 | 40 | .endif |
37 | 41 | |
38 | .if !target(__<bps.product.mk>__)&&defined(PRODUCT) | |
42 | .if !target(__<bps.product.mk>__) | |
39 | 43 | __<bps.product.mk>__: |
40 | 44 | |
41 | 45 | PRODUCTFILE?= ${WRKDIR}/.product |
46 | PRODUCTTOOL?= sh -c '\ | |
47 | printf "%s|%s|%s|%s\n"\ | |
48 | "${THISMODULE}"\ | |
49 | "${RELDIR}"\ | |
50 | "$$1"\ | |
51 | "$$2"\ | |
52 | >> ${PRODUCTFILE}\ | |
53 | ' PRODUCTTOOL | |
42 | 54 | |
43 | .if defined(THISMODULE)&&defined(PRODUCT)&&!empty(PRODUCT) | |
55 | .if defined(THISMODULE)&&defined(PRODUCT) | |
44 | 56 | do-product: .PHONY |
45 | @${ECHO} ".if empty(PRODUCT_${THISMODULE}:M${PRODUCT})"\ | |
46 | >> ${PRODUCTFILE} | |
47 | @${ECHO} "PRODUCT_${THISMODULE}+=${PRODUCT}"\ | |
48 | >> ${PRODUCTFILE} | |
49 | @${ECHO} ".endif"\ | |
50 | >> ${PRODUCTFILE} | |
57 | .for product in ${PRODUCT} | |
58 | @${PRODUCTTOOL} '${product}' '${PRODUCT_ARGS.${product}}' | |
59 | .endfor | |
51 | 60 | do-depend: do-product |
52 | 61 | .endif |
53 | 62 | |
55 | 64 | do-distclean-product: .PHONY |
56 | 65 | @${RM} -f ${PRODUCTFILE} |
57 | 66 | |
67 | PRODUCT_AWK?= ${AWK} -F'|' | |
68 | ||
58 | 69 | .if exists(${PRODUCTFILE}) |
59 | .include "${PRODUCTFILE}" | |
70 | _PRODUCT_MODULE_LIST!= ${PRODUCT_AWK}\ | |
71 | '{a[$$1]}END{for(m in a){print m}}'\ | |
72 | ${PRODUCTFILE} | |
73 | .for module in ${_PRODUCT_MODULE_LIST} | |
74 | PRODUCT_${module}!= ${PRODUCT_AWK} -v module='${module}'\ | |
75 | '$$1 == module {print $$3}'\ | |
76 | ${PRODUCTFILE} | |
77 | .endfor | |
60 | 78 | .endif |
61 | 79 | |
62 | 80 | .endif # !target(__<bps.product.mk>__) |
123 | 123 | DISTNAME?= ${PACKAGE}-${VERSION} |
124 | 124 | DISTDIR?= ${.OBJDIR} |
125 | 125 | GPG?= gpg |
126 | ||
127 | .include "bps.init.mk" | |
128 | ||
129 | 126 | |
130 | 127 | # |
131 | 128 | # Data for compression tools |
357 | 354 | |
358 | 355 | |
359 | 356 | # The SHELL variable is defined in user's environment |
360 | SUBSHELLDIR?= . | |
357 | SUBSHELLDIR?= ${.CURDIR} | |
361 | 358 | subshell: .PHONY |
362 | 359 | ${INFO} "Entering developper's subshell" |
363 | @cd ${SUBSHELLDIR} && ${ENVTOOL} ${PROJECTENV} ${SHELL} | |
360 | @(cd ${SUBSHELLDIR} && ${ENVTOOL} ${PROJECTENV} ${SHELL}) | |
364 | 361 | ${INFO} "Exiting developper's subshell" |
365 | 362 | |
366 | # | |
367 | # Delegating targets to subdirectories | |
368 | # | |
369 | ||
370 | .if defined(MODULE) | |
371 | SUBDIR+= ${MODULE:C@.*\:@@} | |
372 | .endif | |
373 | ||
374 | .include "bps.subdir.mk" | |
375 | ||
376 | obj: do-obj-subdir | |
363 | # Remove the global product file before generating dependencies | |
364 | .if target(do-distclean-product) | |
365 | pre-depend: do-distclean-product | |
366 | .endif | |
377 | 367 | |
378 | 368 | .endif # !target(__<bps.project.mk>__) |
379 | 369 |
26 | 26 | ### DESCRIPTION |
27 | 27 | |
28 | 28 | # Delegate targets enumerated by the variable _SUBDIR_TARGET to the |
29 | # directories list by the variable SUBDIR. This implements an | |
30 | # aggregate pattern. | |
29 | # directories listed by the variable SUBDIR or _SUBDIR_LIST. This | |
30 | # implements a simple aggregate pattern. | |
31 | 31 | # |
32 | 32 | # The logic is as follows: |
33 | 33 | # - for each target in _SUBDIR_TARGET, a do-${target}-subdir target is |
37 | 37 | # defined and if credential switch has not been required for |
38 | 38 | # ${target}, a rule with an empty recipe and depending on |
39 | 39 | # do-${target}-subdir is created for ${target}. |
40 | # - for each directory in ${SUBDIR} a ${directory} target is created, | |
40 | # - for each directory in _SUBDIR_LIST a ${directory} target is created, | |
41 | 41 | # requiring to make all in this subdirectory. |
42 | 42 | |
43 | 43 | |
48 | 48 | # Flag controlling the use of the subdir facility |
49 | 49 | # |
50 | 50 | # |
51 | # SUBDIR | |
51 | # SUBDIR [not set] | |
52 | # Directories in the aggregate | |
53 | # | |
54 | # | |
55 | # _SUBDIR_LIST [${SUBDIR}] | |
52 | 56 | # Directories in the aggregate |
53 | 57 | # |
54 | 58 | # |
66 | 70 | |
67 | 71 | ### IMPLEMENTATION |
68 | 72 | |
69 | .include "bps.init.mk" | |
70 | .include "bps.credentials.mk" | |
73 | .if !target(__<bps.init.mk>__) | |
74 | .error bps.subdir.mk cannot be included directly. | |
75 | .endif | |
71 | 76 | |
72 | 77 | .if !target(__<bps.subdir.mk>__) |
73 | 78 | __<bps.subdir.mk>__: |
76 | 81 | SUBDIR_PREFIX?= |
77 | 82 | |
78 | 83 | .if defined(SUBDIR) && !empty(SUBDIR) |
84 | _SUBDIR_LIST?= ${SUBDIR} | |
85 | .endif | |
86 | ||
87 | .if defined(_SUBDIR_LIST) && !empty(_SUBDIR_LIST) | |
79 | 88 | USE_SUBDIR?= yes |
80 | 89 | .else |
81 | 90 | USE_SUBDIR?= no |
82 | 91 | .endif |
83 | 92 | |
84 | 93 | .if ${USE_SUBDIR} == yes |
85 | .PHONY: ${SUBDIR} | |
94 | .PHONY: ${_SUBDIR_LIST} | |
86 | 95 | _SUBDIR: .USE |
87 | .for item in ${SUBDIR} | |
96 | .for item in ${_SUBDIR_LIST} | |
88 | 97 | ${INFO} "${SUBDIR_PREFIX}${item} (${.TARGET:S/^do-//:S/-subdir$//})" |
89 | 98 | @cd ${.CURDIR}/${item}\ |
90 | 99 | &&${MAKE} SUBDIR_PREFIX=${SUBDIR_PREFIX}${item}/ ${.TARGET:S/^do-//:S/-subdir$//} |
91 | 100 | .endfor |
92 | 101 | |
93 | ${SUBDIR}:: | |
102 | ${_SUBDIR_LIST}:: | |
94 | 103 | ${INFO} "${.TARGET} (all)" |
95 | 104 | @cd ${.CURDIR}/${.TARGET}; ${MAKE} all |
96 | 105 | |
99 | 108 | do-${target}-subdir: _SUBDIR |
100 | 109 | ${NOP} |
101 | 110 | .if !target(${target}) && !target(${target}-switch-credentials) |
102 | ${target}: do-${target}-subdir | |
111 | .for sub in pre-${target} do-${target}-subdir do-${target} post-${target} | |
112 | .if target(${sub}) | |
113 | ${target}: ${sub} | |
114 | .endif | |
115 | .endfor | |
116 | .ORDER: pre-${target} do-${target}-subdir do-${target} post-${target} | |
103 | 117 | .endif |
104 | 118 | .endfor |
105 | 119 | .endif |
115 | 129 | .endif # ${USE_SUBDIR} == yes |
116 | 130 | .endif #!target(__<bps.subdir.mk>__) |
117 | 131 | |
118 | .include "bps.clean.mk" | |
119 | ||
120 | 132 | ### End of file `bps.subdir.mk' |
0 | ### bps.test-expected.mk -- Implement got/expected tests | |
1 | ||
2 | # Author: Michael Grünewald | |
3 | # Date: Fri Dec 5 10:01:42 CET 2014 | |
4 | ||
5 | # BSD Owl Scripts (https://github.com/michipili/bsdowl) | |
6 | # This file is part of BSD Owl Scripts | |
7 | # | |
8 | # Copyright © 2005–2014 Michael Grünewald | |
9 | # | |
10 | # This file must be used under the terms of the CeCILL-B. | |
11 | # This source file is licensed as described in the file COPYING, which | |
12 | # you should have received as part of this distribution. The terms | |
13 | # are also available at | |
14 | # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt | |
15 | ||
16 | # Uses: | |
17 | # | |
18 | # | |
19 | # test:expected | |
20 | # This module defines got/expected tests | |
21 | ||
22 | .if !target(__<bps.init.mk>__) | |
23 | .error bps.test-expected.mk cannot be included directly. | |
24 | .endif | |
25 | ||
26 | .if !target(__<bps.test-expected.mk>__) | |
27 | __<bps.test-expected.mk>__: | |
28 | ||
29 | .if!empty(_USES_OPTIONS:Mtest)&&!empty(_USES_test_ARGS:Mexpected) | |
30 | install:: .PHONY | |
31 | ${NOP} | |
32 | ||
33 | .if defined(PRODUCT) | |
34 | TEST?= ${PRODUCT} | |
35 | .endif | |
36 | ||
37 | .if!defined(TEST) | |
38 | .error Cannot figure out how to run tests. | |
39 | .endif | |
40 | ||
41 | .if defined(TEST_ENV)&&!empty(TEST_ENV) | |
42 | .export ${TEST_ENV} | |
43 | .endif | |
44 | ||
45 | .for test in ${TEST} | |
46 | .if !target(${test}.got) | |
47 | ${test}.got: ${test} | |
48 | ./${test} > ${.TARGET} | |
49 | .endif | |
50 | CLEANFILES+= ${test}.got | |
51 | CLEANFILES+= ${test}.done | |
52 | ${test}.done: ${test}.got ${test}.expected | |
53 | diff -u ${.ALLSRC:M*.expected} ${.ALLSRC:M*.got}\ | |
54 | || (${RM} -f ${.ALLSRC:M*.got}; exit 1) | |
55 | ${TOUCH} ${.TARGET} | |
56 | ||
57 | do-test-expected: ${test}.done | |
58 | .endfor | |
59 | ||
60 | do-test: do-test-expected | |
61 | .endif | |
62 | ||
63 | .endif # !target(__<bps.test-expected.mk>__) | |
64 | ||
65 | ### End of file `bps.test-expected.mk' |
38 | 38 | # |
39 | 39 | # FDI [not set] |
40 | 40 | # Device information files for the HAL system |
41 | # | |
42 | # | |
43 | # PKLA [not set] | |
44 | # PolicyKit Local Authority | |
41 | 45 | # |
42 | 46 | # |
43 | 47 | # KERN [not set] |
159 | 163 | FDIGRP?= ${BASEGRP} |
160 | 164 | FDIMODE?= 444 |
161 | 165 | |
166 | # | |
167 | # PKLA, PolKit Local Authority | |
168 | # | |
169 | ||
170 | FILESGROUPS+= PKLA | |
171 | ||
172 | PKLADIR?= ${JAILDIR}${LOCALBASE}/etc/polkit-1/localauthority/50-local.d | |
173 | PKLAOWN?= ${BASEOWN} | |
174 | PKLAGRP?= ${BASEGRP} | |
175 | PKLAMODE?= 444 | |
176 | ||
162 | 177 | |
163 | 178 | # |
164 | 179 | # Kernel configuration files |
0 | 0 | dnl Process this file with autoconf to produce a configure script. |
1 | 1 | AC_INIT(bps/Makefile) |
2 | AC_SUBST([version], [3.0.0-20141203]) | |
2 | AC_SUBST([version], [3.0.0-20141228]) | |
3 | 3 | AC_CONFIG_AUX_DIR([Library/Autoconf]) |
4 | 4 | AC_CANONICAL_HOST |
5 | 5 | AC_NEED_BSDMAKE() |
200 | 200 | AC_SUBST([WITH_TESTSUITE_METAPOST]) |
201 | 201 | AC_SUBST([MINGW32CC]) |
202 | 202 | AC_SUBST([MINGW32AR]) |
203 | AC_CONFIG_FILES([Makefile.inc bps/bps.bpsconfig.mk testsuite/Makefile.inc]) | |
203 | AC_CONFIG_FILES([Makefile.config bps/bps.bpsconfig.mk testsuite/Makefile.inc]) | |
204 | 204 | AC_OUTPUT |
205 | 205 | |
206 | 206 | cat <<EOF |
0 | bsdowl (3.0.0-20141203-1) UNRELEASED; urgency=medium | |
0 | bsdowl (3.0.0-20141228-1) UNRELEASED; urgency=medium | |
1 | 1 | |
2 | 2 | * Update package to 3.0.0-20141203. |
3 | * Update package to 3.0.0-20141228. | |
3 | 4 | |
4 | -- Michael Grünewald <michipili@gmail.com> Fri, 20 Mar 2015 15:39:15 +0100 | |
5 | -- Michael Grünewald <michipili@gmail.com> Fri, 20 Mar 2015 15:56:09 +0100 | |
5 | 6 | |
6 | 7 | bsdowl (2.2.2-1) unstable; urgency=medium |
7 | 8 |
0 | extend-diff-ignore = "^(Makefile.inc|bps/bps.bpsconfig.mk|configure|support/mp2eps|support/mp2pdf|testsuite/Makefile.inc|texmf/tex.device.pdf.mk|texmf/tex.driver.pdftex.mk)$" | |
0 | extend-diff-ignore = "^(Makefile.config|bps/bps.bpsconfig.mk|configure|support/mp2eps|support/mp2pdf|testsuite/Makefile.inc|texmf/tex.device.pdf.mk|texmf/tex.driver.pdftex.mk)$" |
117 | 117 | .include "langc.init.mk" |
118 | 118 | |
119 | 119 | _USES_compile_ARGS?= static shared |
120 | ||
121 | .for product in ${PRODUCT} | |
122 | PRODUCT_ARGS.${product}+=${_USES_compile_ARGS} | |
123 | .endfor | |
120 | 124 | |
121 | 125 | .if defined(APIVERSION) |
122 | 126 | LIBVERSION?= ${APIVERSION} |
15 | 15 | |
16 | 16 | SHARE= elisp.lib.mk |
17 | 17 | SHARE+= generic.files.mk |
18 | SHARE+= generic.subdir.mk | |
19 | SHARE+= generic.project.mk | |
20 | SHARE+= generic.test.mk | |
18 | 21 | |
19 | 22 | .include "generic.files.mk" |
20 | 23 |
0 | ### generic.project.mk -- Preparation of projects | |
1 | ||
2 | # Author: Michael Grünewald | |
3 | # Date: Thu Dec 4 23:17:46 CET 2014 | |
4 | ||
5 | # BSD Owl Scripts (https://github.com/michipili/bsdowl) | |
6 | # This file is part of BSD Owl Scripts | |
7 | # | |
8 | # Copyright © 2005–2014 Michael Grünewald | |
9 | # | |
10 | # This file must be used under the terms of the CeCILL-B. | |
11 | # This source file is licensed as described in the file COPYING, which | |
12 | # you should have received as part of this distribution. The terms | |
13 | # are also available at | |
14 | # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt | |
15 | ||
16 | ||
17 | ### SYNOPSIS | |
18 | ||
19 | # PACKAGE= heat | |
20 | # VERSION = 1.1.0 | |
21 | # OFFICER= release-engineer@heat.org | |
22 | # | |
23 | # MODULE= langc.lib:librational | |
24 | # MODULE+= langc.lib:libfibonacci | |
25 | # MODULE+= langc.prog:heat | |
26 | # | |
27 | # .include "bps.project.mk" | |
28 | ||
29 | ||
30 | ### DESCRIPTION | |
31 | ||
32 | # This maintenance module for software projects should be the “master” | |
33 | # Makefile of a package source tree. | |
34 | # | |
35 | # Beyond supporting the build and test of the software project, it | |
36 | # also supports other functions like linting or the production of | |
37 | # GPG-signed tarballs, and the preparation of a developper's subshell. | |
38 | ||
39 | ||
40 | # Variables: | |
41 | # | |
42 | # | |
43 | # SRCDIR, WRKDIR, PACKAGE, PACKAGEDIR, VERSION, OFFICER, MODULE, EXTERNAL | |
44 | # See bps.package.mk | |
45 | # | |
46 | # | |
47 | # DISTDIR [${.OBJDIR}] | |
48 | # The folder used to publish distribution files and signatures | |
49 | # | |
50 | # A useful value could be 'DISTDIR=${HOME}/Distfiles/${PACKAGE}/${VERSION}'. | |
51 | # It can be set from the environment but special care has to be | |
52 | # taken to prevent the expansion of ${PACKAGE} and ${VERSION} by | |
53 | # the shell. | |
54 | # | |
55 | # | |
56 | # DISTNAME [${PACKAGENAME}-${VERSION}] | |
57 | # The name used to produce tarballs | |
58 | # | |
59 | # This name is also the name of the root directory appearing at the | |
60 | # root of the archive. | |
61 | # | |
62 | # | |
63 | # DISTSIGN | |
64 | # The list of extra distribution files which should be signed | |
65 | # | |
66 | # | |
67 | # DISTNOSIGN | |
68 | # The list of extra distribution files which do not need to be signed | |
69 | # | |
70 | # | |
71 | # DISTEXCLUDE [set by a strategy] | |
72 | # The list of files or directories which should not be distributed | |
73 | # | |
74 | # The files enumerated by the DISTEXCLUDE variable are excluded from | |
75 | # the tarball distribution. The list of files produced by autoconf | |
76 | # is automatically added to this list. | |
77 | # | |
78 | # | |
79 | # PROJECTENV | |
80 | # The list of variables passed to the environment of subshells | |
81 | # | |
82 | # | |
83 | # PROJECTLIBRARY [Library] | |
84 | # The folder used as project library | |
85 | # | |
86 | # | |
87 | # PROJECTLIBRARYMAKE [Library/Make] | |
88 | # The folder holding project specific makefiles | |
89 | # | |
90 | # | |
91 | # PROJECTLIBRARYSHELL [Library/Ancillary] | |
92 | # The folder holding project specific scripts | |
93 | # | |
94 | # | |
95 | # SUBSHELLDIR [not set] | |
96 | # A folder to change to before popping up a subshell | |
97 | ||
98 | ||
99 | # Targets: | |
100 | # | |
101 | # Each target has the classical decomposition “pre-do-post” which | |
102 | # eases their customisation. | |
103 | # | |
104 | # | |
105 | # dist | |
106 | # Create, sign and publish distribution files | |
107 | # | |
108 | # Important note fot GNU tar users: The GNU tar command does not | |
109 | # have an option “dereference symbolic links provided on the | |
110 | # command line”. It is therefore forbidden to use symbolic links in | |
111 | # the source tree of a project. | |
112 | # | |
113 | # | |
114 | # subshell | |
115 | # Pop up a user subshell | |
116 | ||
117 | ||
118 | ### IMPLEMENTATION | |
119 | ||
120 | .if defined(MODULE) | |
121 | _SUBDIR_LIST+= ${MODULE:C@.*\:@@} | |
122 | .endif | |
123 | ||
124 | .if defined(SUBDIR) | |
125 | _SUBDIR_LIST+= ${SUBDIR} | |
126 | .endif | |
127 | ||
128 | .include "bps.init.mk" | |
129 | .include "bps.project.mk" | |
130 | .include "bps.credentials.mk" | |
131 | .include "bps.subdir.mk" | |
132 | .include "bps.clean.mk" | |
133 | .include "bps.usertarget.mk" | |
134 | ||
135 | obj: do-obj-subdir | |
136 | ||
137 | ### End of file `generic.project.mk' |
0 | ### generic.subdir.mk -- Generic aggregate | |
1 | ||
2 | # Author: Michael Grünewald | |
3 | # Date: Thu Dec 4 23:47:57 CET 2014 | |
4 | ||
5 | # BSD Owl Scripts (https://github.com/michipili/bsdowl) | |
6 | # This file is part of BSD Owl Scripts | |
7 | # | |
8 | # Copyright © 2005–2014 Michael Grünewald | |
9 | # | |
10 | # This file must be used under the terms of the CeCILL-B. | |
11 | # This source file is licensed as described in the file COPYING, which | |
12 | # you should have received as part of this distribution. The terms | |
13 | # are also available at | |
14 | # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt | |
15 | ||
16 | .include "bps.init.mk" | |
17 | .include "bps.credentials.mk" | |
18 | .include "bps.subdir.mk" | |
19 | .include "bps.clean.mk" | |
20 | ||
21 | obj: do-obj-subdir | |
22 | ||
23 | ### End of file `generic.subdir.mk' |
0 | ### generic.test.mk -- Generic test facility | |
1 | ||
2 | # Author: Michael Grünewald | |
3 | # Date: Fri Mai 9 14:47:47 CEST 2008 | |
4 | ||
5 | # BSD Owl Scripts (https://github.com/michipili/bsdowl) | |
6 | # This file is part of BSD Owl Scripts | |
7 | # | |
8 | # Copyright © 2005–2014 Michael Grünewald | |
9 | # | |
10 | # This file must be used under the terms of the CeCILL-B. | |
11 | # This source file is licensed as described in the file COPYING, which | |
12 | # you should have received as part of this distribution. The terms | |
13 | # are also available at | |
14 | # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt | |
15 | ||
16 | # Variables: | |
17 | # | |
18 | # | |
19 | # TEST [not set] | |
20 | # The list of test to run | |
21 | # | |
22 | # | |
23 | # TEST_ENV_UNSET [not set] | |
24 | # List of variables to unset in test's environment | |
25 | # | |
26 | # | |
27 | # TEST_ENV [not set] | |
28 | # List of variables to export to test's environment | |
29 | # | |
30 | # | |
31 | # TEST_SEQUENCE [clean obj depend build] | |
32 | # List of targets to call for tests, before we call test itself | |
33 | ||
34 | ||
35 | THISMODULE= generic.test | |
36 | ||
37 | .if !defined(TEST)||empty(TEST) | |
38 | .error The generic.test.mk module expects you to set the TEST variable to a sensible value. | |
39 | .endif | |
40 | ||
41 | .include "bps.init.mk" | |
42 | ||
43 | all configure depend build doc: | |
44 | ${NOP} | |
45 | test: do-test | |
46 | clean: do-clean | |
47 | distclean: clean | |
48 | realclean: distclean | |
49 | ||
50 | .if defined(TEST_ENV_UNSET) | |
51 | .for variable in ${TEST_ENV_UNSET} | |
52 | TESTTOOL+= unset ${variable}; | |
53 | .endfor | |
54 | .endif | |
55 | ||
56 | .if defined(TEST_ENV) | |
57 | TESTTOOL+= ${ENVTOOL} | |
58 | .if!empty(TEST_ENV:M*=*) | |
59 | TESTTOOL+= ${TEST_ENV:M*=*} | |
60 | .endif | |
61 | .for variable in ${TEST_ENV:N*=*} | |
62 | TESTTOOL+= ${variable}=${${variable}:Q} | |
63 | .endfor | |
64 | .endif | |
65 | TESTTOOL+= ${MAKE} | |
66 | ||
67 | TEST_SEQUENCE?= realclean obj depend build | |
68 | ||
69 | .ORDER: ${TEST:C@^@do-test-@} | |
70 | .ORDER: ${TEST:C@$@.done@} | |
71 | ||
72 | .for test in ${TEST} | |
73 | .if exists(${test}.mk) | |
74 | do-test: do-test-${test} | |
75 | do-test-${test}: ${test}.done | |
76 | ${test}.done: ${test}.mk | |
77 | .for step in ${TEST_SEQUENCE} | |
78 | ${INFO} ${SUBDIR_PREFIX}${test} '(${step})' | |
79 | @${TESTTOOL} -f ${.ALLSRC:M*.mk} ${step} | |
80 | .endfor | |
81 | ${INFO} ${SUBDIR_PREFIX}${test} '(test)' | |
82 | @${TESTTOOL} -f ${.ALLSRC:M*.mk} test | |
83 | touch ${test}.done | |
84 | do-clean: do-clean-${test} | |
85 | do-clean-${test}: ${test}.mk .PHONY | |
86 | ${INFO} ${SUBDIR_PREFIX}${test} '(clean)' | |
87 | @${RM} -f ${test}.done | |
88 | @${TESTTOOL} -f ${.ALLSRC:M*.mk} realclean | |
89 | .else | |
90 | .error ${test}: Test is not defined. | |
91 | .endif | |
92 | .endfor | |
93 | ||
94 | .include "bps.usertarget.mk" | |
95 | ||
96 | ### End of file `bsdowl.test.mk' |
115 | 115 | _OCAML_CMXA.obj=_OCAML_CMXA |
116 | 116 | _OCAML_CMXA.var=OCAMLANFLAGS OCAMLAFLAGS OCAMLFLAGS OCAMLANADD |
117 | 117 | |
118 | _OCAML_CMXS.cmd=OCAMLCS | |
119 | _OCAML_CMXS.obj=_OCAML_CMXS | |
120 | _OCAML_CMXS.var=OCAMLCSFLAGS OCAMLCFLAGS OCAMLFLAGS OCAMLCSADD | |
121 | ||
118 | 122 | _OCAML_PKO.cmd= OCAMLPB |
119 | 123 | _OCAML_PKO.obj= _OCAML_PKO |
120 | 124 | _OCAML_PKO.var= OCAMLPBFLAGS OCAMLCFLAGS OCAMLFLAGS |
240 | 244 | .endif |
241 | 245 | .undef clib |
242 | 246 | .endif |
243 | .if (empty(_OCAML_CMO)||empty(_OCAML_CMO:M${obj}))&&(empty(_OCAML_CMX)||empty(_OCAML_CMX:M${obj})) | |
247 | .if (empty(_OCAML_CMO)||empty(_OCAML_CMO:M${obj}))\ | |
248 | &&(empty(_OCAML_CMX)||empty(_OCAML_CMX:M${obj}))\ | |
249 | &&(empty(_OCAML_CMXS)||empty(_OCAML_CMXS:M${obj})) | |
244 | 250 | # We are not building a CMO nor a CMX file |
245 | 251 | ${obj}: |
246 | 252 | ${_OCAML_BUILD.${obj:T}} ${.ALLSRC:N*.cmi} |
247 | 253 | .else |
248 | 254 | # We are building a CMO or a CMX file |
249 | if:=${obj:C/.cm[xo]/.cmi/} | |
255 | if:=${obj:C/.cm[xo]/.cmi/:C/.cmxs/.cmi/} | |
250 | 256 | .if !(empty(_OCAML_CMI)||empty(_OCAML_CMI:M${if})) |
251 | 257 | ${obj}: ${if} |
252 | 258 | ${obj}: |
16 | 16 | |
17 | 17 | ### SYNOPSIS |
18 | 18 | |
19 | # COMPILE = byte_code|native_code|both|bc|nc|byte|native | |
19 | # COMPILE = byte_code|native_code|both|byte|native | |
20 | 20 | # .include "ocaml.compile.mk" |
21 | 21 | |
22 | 22 |
59 | 59 | .if !target(__<ocaml.depend.mk>__) |
60 | 60 | __<ocaml.depend.mk>__: |
61 | 61 | |
62 | .for directory in ${DIRS} | |
63 | _OCAMLDEP_FILTER_SCRIPT+= -e "s@${directory}/*@@g" | |
64 | .endfor | |
65 | ||
66 | .if ("${.OBJDIR}" != "${.CURDIR}") && empty(DIRS:M${.CURDIR}) | |
67 | _OCAMLDEP_FILTER_SCRIPT+= -e "s@${.OBJDIR}/*@@g" | |
68 | OCAMLDEPFLAGS+= -I ${.OBJDIR} | |
69 | .endif | |
70 | ||
71 | _OCAMLDEP_FILTER= sh -c '${SED} ${_OCAMLDEP_FILTER_SCRIPT}'\ | |
72 | -- OCAMLDEP_FILTER | |
73 | ||
62 | 74 | .for thg in ${_OCAML_SRCS} |
63 | 75 | .for item in ${${thg}} |
64 | .depend: ${item:C/.ml[ly]/.ml/} | |
65 | .if exists(${item:.ml=.mli}) | |
66 | .depend: ${item:.ml=.mli} | |
76 | _OCAML_DEPEND+= ${item:C/.ml[ly]/.ml/} | |
77 | .if exists(${item:C/.ml[ly]/.ml/:.ml=.mli}) | |
78 | _OCAML_DEPEND+= ${item:C/.ml[ly]/.ml/:.ml=.mli} | |
67 | 79 | .endif |
68 | .if !empty(${thg}:M*mly) | |
69 | .for item in ${${thg}:M*.mly} | |
70 | .if !exists(${item:.mly=.mli}) | |
71 | .depend: ${item:.mly=.mli} | |
72 | .endif | |
73 | .endfor | |
74 | .endif | |
75 | .endfor | |
76 | # This logic adds implementation files associated to lexers when they | |
77 | # are defined. Does it belongs `ocaml.lex.mk`? | |
78 | .for item in ${${thg}:M*.mll} | |
79 | .if exists(${item:.mll=.mli}) | |
80 | .depend: ${item:.mll=.mli} | |
81 | .endif | |
82 | .endfor | |
83 | # This logic adds implementation files associated to parsers. Does it | |
84 | # belongs `ocaml.yacc.mk`? | |
85 | .for item in ${${thg}:M*.mly} | |
86 | .depend: ${item:.mly=.mli} | |
87 | 80 | .endfor |
88 | 81 | .endfor |
89 | 82 | |
90 | .depend: | |
91 | .if !defined(_OCAML_COMPILE_NATIVE_ONLY) | |
92 | ocamldep ${OCAMLDEPFLAGS} ${.ALLSRC} > ${.TARGET} | |
83 | .if defined(_OCAML_COMPILE_NATIVE_ONLY) | |
84 | OCAMLDEPFLAGS+= -native | |
85 | .endif | |
86 | ||
87 | .if defined(_OCAML_DEPEND) | |
88 | .depend: ${_OCAML_DEPEND} | |
89 | (cd ${.CURDIR} && ocamldep ${OCAMLDEPFLAGS} ${_OCAML_DEPEND})\ | |
90 | | ${_OCAMLDEP_FILTER} \ | |
91 | > ${.TARGET} | |
93 | 92 | .else |
94 | ocamldep -native ${OCAMLDEPFLAGS} ${.ALLSRC} > ${.TARGET} | |
93 | .depend: .PHONY | |
94 | ${NOP} | |
95 | 95 | .endif |
96 | 96 | |
97 | 97 | DISTCLEANFILES+= .depend |
56 | 56 | |
57 | 57 | .if defined(DIRS)&&!empty(DIRS) |
58 | 58 | _OCAML_DIRS=${DIRS:C/^/-I /} |
59 | # Compiled interfaces files probably never appear on the command line | |
60 | # and also probably do not need to be looked up by make, so the .cmi | |
61 | # suffix is omitted from the next list. | |
62 | #.PATH.cmi: ${DIRS} | |
59 | .PATH.cmi: ${DIRS} | |
63 | 60 | .PATH.cmo: ${DIRS} |
64 | 61 | .PATH.cmx: ${DIRS} |
65 | 62 | .PATH.cmxa: ${DIRS} |
69 | 66 | .endif |
70 | 67 | |
71 | 68 | .if !defined(OCAMLROOTDIR) |
72 | OCAMLROOTDIR!= ${OCAMLCI} -where | |
69 | OCAMLROOTDIR!= 2>/dev/null ${OCAMLCI} -where | |
73 | 70 | .endif |
74 | 71 | |
72 | .if defined(OCAMLROOTDIR) | |
73 | .PATH.cmi: ${OCAMLROOTDIR} | |
75 | 74 | .PATH.cmo: ${OCAMLROOTDIR} |
76 | 75 | .PATH.cmx: ${OCAMLROOTDIR} |
77 | 76 | .PATH.cmxa: ${OCAMLROOTDIR} |
78 | 77 | .PATH.cma: ${OCAMLROOTDIR} |
79 | 78 | .PATH.a: ${OCAMLROOTDIR} |
80 | 79 | .PATH.o: ${OCAMLROOTDIR} |
80 | .endif | |
81 | 81 | |
82 | 82 | .if defined(_OCAML_DIRS) && !empty(_OCAML_DIRS) |
83 | .for tool in OCAMLCI OCAMLCB OCAMLCN OCAMLLB OCAMLLN OCAMLDEP | |
83 | .for tool in OCAMLCI OCAMLCB OCAMLCN OCAMLCS OCAMLLB OCAMLLN OCAMLDEP | |
84 | 84 | ${tool}FLAGS+=${_OCAML_DIRS} |
85 | 85 | .endfor |
86 | 86 | .endif |
125 | 125 | # Profiling case |
126 | 126 | OCAMLCB?= ${OCAMLFIND} ocamlcp -c |
127 | 127 | OCAMLCN?= ${OCAMLFIND} ocamloptp -c |
128 | OCAMLCS?= ${OCAMLFIND} ocamloptp -shared | |
128 | 129 | .if defined(_OCAML_COMPILE_NATIVE_ONLY) |
129 | 130 | OCAMLCI?= ${OCAMLFIND} ocamloptp -c |
130 | 131 | .else |
136 | 137 | # Not profiling case |
137 | 138 | OCAMLCB?= ${OCAMLFIND} ocamlc -c |
138 | 139 | OCAMLCN?= ${OCAMLFIND} ocamlopt -c |
140 | OCAMLCS?= ${OCAMLFIND} ocamlopt -shared | |
139 | 141 | .if defined(_OCAML_COMPILE_NATIVE_ONLY) |
140 | 142 | OCAMLCI?= ${OCAMLFIND} ocamlopt -c |
141 | 143 | .else |
154 | 156 | .endif |
155 | 157 | |
156 | 158 | |
157 | .for pseudo in OCAMLCB OCAMLCN OCAMLCI OCAMLLB OCAMLLN OCAMLDOC OCAMLMKTOP | |
159 | .for pseudo in OCAMLCB OCAMLCN OCAMLCS OCAMLCI OCAMLLB OCAMLLN\ | |
160 | OCAMLDOC OCAMLMKTOP | |
158 | 161 | .if defined(PKGS)&&!empty(PKGS) |
159 | 162 | ${pseudo}+= -package "${PKGS}" |
160 | 163 | .endif |
86 | 86 | _OCAML_OBJECT+= _OCAML_CN |
87 | 87 | _OCAML_OBJECT+= _OCAML_CMA |
88 | 88 | _OCAML_OBJECT+= _OCAML_CMXA |
89 | _OCAML_OBJECT+= _OCAML_CMXS | |
89 | 90 | _OCAML_OBJECT+= _OCAML_PKO |
90 | 91 | _OCAML_OBJECT+= _OCAML_PKX |
91 | 92 |
87 | 87 | ${lexer:.mll=.ml}: ${lexer} |
88 | 88 | ${OCAMLLEX} -o ${.TARGET} ${.ALLSRC} |
89 | 89 | |
90 | .if !empty(_OCAML_MLI:M${lexer:.mll=.mli}) | |
91 | ${lexer:.mll=.cmo}: ${lexer:.mll=.cmi} | |
92 | ${lexer:.mll=.cmx}: ${lexer:.mll=.cmi} | |
93 | .endif | |
94 | ||
90 | 95 | .endfor |
91 | 96 | .endif |
92 | 97 |
68 | 68 | # |
69 | 69 | # site-lib: No argument allowed |
70 | 70 | # Use ${libdir}/ocaml/site-lib as default value for ocamllibdir |
71 | # | |
72 | # | |
73 | # dynlink: No argument allowed | |
74 | # Prepare dynlink plugins | |
71 | 75 | |
72 | 76 | |
73 | 77 | ### IMPLEMENTATION |
83 | 87 | |
84 | 88 | .include "ocaml.init.mk" |
85 | 89 | |
86 | _OCAML_SRCS?= | |
87 | _OCAML_CMA?= | |
88 | _OCAML_CMXA?= | |
89 | _OCAML_A?= | |
90 | ||
91 | 90 | _OCAML_LIB:= ${LIBRARY} |
92 | 91 | |
93 | 92 | .for lib in ${_OCAML_LIB} |
97 | 96 | _OCAML_SRCS+= SRCS.${lib}.cmxa |
98 | 97 | _OCAML_CMXA+= ${lib:T}.cmxa |
99 | 98 | _OCAML_A+= ${lib:T}.a |
99 | _OCAML_SRCS.${lib:T}.cmxa+=\ | |
100 | ${SRCS.${lib}.cmxa:C@\.ml[ly]@.ml@:M*.ml:.ml=.cmx} | |
101 | LIB+= ${lib}.cmxa ${lib}.a | |
102 | .endif | |
103 | .if defined(_OCAML_COMPILE_NATIVE)&&defined(_OCAML_COMPILE_PLUGIN) | |
104 | _OCAML_CMXS+= ${SRCS.${lib}.cmxa:C@\.ml[ly]@.ml@:M*.ml:.ml=.cmxs} | |
100 | 105 | .endif |
101 | 106 | .if defined(_OCAML_COMPILE_BYTE) |
102 | 107 | SRCS.${lib:T}.cma?= ${SRCS.${lib:T}} |
103 | 108 | _OCAML_SRCS+= SRCS.${lib}.cma |
104 | 109 | _OCAML_CMA+= ${lib:T}.cma |
110 | _OCAML_SRCS.${lib:T}.cma+=\ | |
111 | ${SRCS.${lib:T}.cma:C@\.ml[ly]@.ml@:M*.ml:.ml=.cmo} | |
112 | LIB+= ${lib}.cma | |
113 | .endif | |
114 | .if!empty(SRCS.${lib:T}:C@\.ml[ly]@.ml@:M*.ml) | |
115 | LIB+= ${SRCS.${lib:T}:C@\.ml[ly]@.ml@:M*.ml:.ml=.cmi} | |
105 | 116 | .endif |
106 | 117 | .endfor |
107 | 118 | |
119 | .if !empty(_OCAML_CMXS) | |
120 | LIB+= ${_OCAML_CMXS} | |
121 | CLEANFILES+= ${_OCAML_CMXS} | |
122 | .endif | |
108 | 123 | |
109 | 124 | .include "ocaml.main.mk" |
125 | ||
126 | .if !empty(_OCAML_CMXS) | |
127 | .for plugin in ${_OCAML_CMXS} | |
128 | ${plugin}: ${plugin:.cmxs=.ml} | |
129 | .endfor | |
130 | .endif | |
110 | 131 | |
111 | 132 | |
112 | 133 | .for lib in ${_OCAML_LIB} |
113 | 134 | .if defined(_OCAML_COMPILE_NATIVE) |
114 | LIB+= ${lib}.cmxa ${lib}.a | |
115 | _OCAML_SRCS.${lib}.cmxa=${.ALLSRC} | |
116 | ${lib}.cmxa: ${SRCS.${lib}.cmxa:C@\.ml[ly]@.ml@:M*.ml:.ml=.cmx} | |
135 | ${lib}.cmxa: ${_OCAML_SRCS.${lib}.cmxa} | |
117 | 136 | .endif |
118 | 137 | .if defined(_OCAML_COMPILE_BYTE) |
119 | LIB+= ${lib}.cma | |
120 | _OCAML_SRCS.${lib:T}.cma=${.ALLSRC} | |
121 | ${lib}.cma: ${SRCS.${lib:T}.cma:C@\.ml[ly]@.ml@:M*.ml:.ml=.cmo} | |
122 | .endif | |
123 | .if !empty(SRCS.${lib:T}:C@\.ml[ly]@.ml@:M*.ml) | |
124 | LIB+= ${SRCS.${lib:T}:C@\.ml[ly]@.ml@:M*.ml:.ml=.cmi} | |
138 | ${lib}.cma: ${_OCAML_SRCS.${lib:T}.cma} | |
125 | 139 | .endif |
126 | 140 | .endfor |
127 | 141 |
278 | 278 | |
279 | 279 | PRODUCT+= ${ODOC} |
280 | 280 | |
281 | do-product: do-product-odoc | |
282 | do-product-odoc: | |
283 | @${PRODUCTTOOL} '${ODOC}' '' | |
284 | ||
281 | 285 | .if !empty(ODOC_LOAD) |
282 | 286 | ${ODOC_HTML}: ${ODOC_LOAD} |
283 | 287 | .endif |
324 | 328 | _ODOC_HTML_TOOL+=-css-style ${ODOC_HTML_CSS_URL} |
325 | 329 | .endif |
326 | 330 | |
331 | .if defined(ODOC_HTML_CSS_FILE)&&!empty(ODOC_HTML_CSS_FILE) | |
332 | ${ODOC_HTML}: ${ODOC_HTML_CSS_FILE} | |
333 | .endif | |
334 | ||
327 | 335 | .if defined(ODOC_HTML_INTRO)&&!empty(ODOC_HTML_INTRO) |
328 | 336 | ${ODOC_HTML}: ${ODOC_HTML_INTRO} |
329 | _ODOC_HTML_TOOL+=-intro ${ODOC_HTML_INTRO} | |
337 | _ODOC_HTML_TOOL+=-intro ${.ALLSRC:M*${ODOC_HTML_INTRO}} | |
330 | 338 | .endif |
331 | 339 | |
332 | 340 | do-doc-odoc: ${ODOC_HTML} |
340 | 348 | ${ODOC_HTML}: |
341 | 349 | ${RM} -R -f ${ODOC_HTML}.temp ${ODOC_HTML} |
342 | 350 | ${MKDIR} ${ODOC_HTML}.temp |
343 | ${_ODOC_HTML_TOOL} -d ${ODOC_HTML}.temp ${.ALLSRC:N*.cmi:N*.odoc:N*.text} | |
351 | ${_ODOC_HTML_TOOL} -d ${ODOC_HTML}.temp\ | |
352 | ${.ALLSRC:N*.cmi:N*.odoc:N*.text:N*.css} | |
344 | 353 | .if defined(ODOC_HTML_CSS_FILE)&&!empty(ODOC_HTML_CSS_FILE) |
345 | ${CP} ${ODOC_HTML_CSS_FILE} ${ODOC_HTML}.temp/style.css | |
354 | ${CP} ${.ALLSRC:M*${ODOC_HTML_CSS_FILE}} ${ODOC_HTML}.temp/style.css | |
346 | 355 | .endif |
347 | 356 | ${MV} ${ODOC_HTML}.temp ${ODOC_HTML} |
348 | 357 |
34 | 34 | # |
35 | 35 | # OCAMLCN (ocamlopt) |
36 | 36 | # Native compiler |
37 | # | |
38 | # | |
39 | # OCAMLCS (ocamlopt) | |
40 | # Native plugin compiler | |
37 | 41 | # |
38 | 42 | # |
39 | 43 | # OCAMLCI (ocamlc or ocamlopt) |
96 | 100 | |
97 | 101 | _OCAML_TOOLS+= OCAMLCI |
98 | 102 | _OCAML_TOOLS+= OCAMLCB |
103 | _OCAML_TOOLS+= OCAMLCS | |
99 | 104 | _OCAML_TOOLS+= OCAMLCN |
100 | 105 | _OCAML_TOOLS+= OCAMLAB |
101 | 106 | _OCAML_TOOLS+= OCAMLAN |
115 | 120 | # Profiling case |
116 | 121 | OCAMLCB?= ocamlcp -c |
117 | 122 | OCAMLCN?= ocamloptp -c |
123 | OCAMLCS?= ocamloptp -shared | |
118 | 124 | .if defined(_OCAML_COMPILE_NATIVE_ONLY) |
119 | 125 | OCAMLCI?= ocamloptp -c |
120 | 126 | .else |
130 | 136 | # Optimized compiler case |
131 | 137 | OCAMLCB?= ocamlc.opt -c |
132 | 138 | OCAMLCN?= ocamlopt.opt -c |
139 | OCAMLCS?= ocamlopt.opt -shared | |
133 | 140 | .if defined(_OCAML_COMPILE_NATIVE_ONLY) |
134 | 141 | OCAMLCI?= ocamlopt.opt -c |
135 | 142 | .else |
145 | 152 | # Normal case |
146 | 153 | OCAMLCB?= ocamlc -c |
147 | 154 | OCAMLCN?= ocamlopt -c |
155 | OCAMLCS?= ocamlopt -shared | |
148 | 156 | .if defined(_OCAML_COMPILE_NATIVE_ONLY) |
149 | 157 | OCAMLCI?= ocamlopt -c |
150 | 158 | .else |
41 | 41 | .endfor |
42 | 42 | .endif |
43 | 43 | |
44 | .if !empty(_USES_OPTIONS:Mdynlink) | |
45 | .if !empty(_USES_ocamldoc_ARGS) | |
46 | .error Incorrect "USES+= dynlink:${_USES_ocamldoc_ARGS}" usage:\ | |
47 | arguments are not allowed. | |
48 | .endif | |
49 | _OCAML_COMPILE_PLUGIN= yes | |
50 | .endif | |
51 | ||
44 | 52 | .endif # !target(__<ocaml.uses.mk>__) |
45 | 53 | |
46 | 54 | ### End of file `ocaml.uses.mk' |
78 | 78 | ${OCAMLYACC} -b ${.TARGET:S/.mli$//:S/.ml$//} ${.ALLSRC} |
79 | 79 | |
80 | 80 | ${parser:.mly=.cmo}: ${parser:.mly=.cmi} |
81 | ${parser:.mly=.cmx}: ${parser:.mly=.cmi} | |
81 | 82 | |
82 | 83 | .endfor |
83 | 84 | .endif |
24 | 24 | all configure install build depend doc: |
25 | 25 | ${NOP} |
26 | 26 | |
27 | .include "bps.subdir.mk" | |
27 | .include "generic.subdir.mk" | |
28 | 28 | |
29 | 29 | ### End of file `Makefile' |
16 | 16 | TEST= AssertMakeOS |
17 | 17 | TEST+= AssertOneWord |
18 | 18 | |
19 | TESTSEQUENCE?= all | |
19 | TEST_SEQUENCE?= all | |
20 | 20 | |
21 | 21 | .include "bsdowl.test.mk" |
22 | 22 |
15 | 15 | |
16 | 16 | SUBDIR= dotfile |
17 | 17 | |
18 | .include "bps.subdir.mk" | |
18 | .include "generic.subdir.mk" | |
19 | 19 | |
20 | 20 | ### End of file `Makefile' |
18 | 18 | SUBDIR+= test_library |
19 | 19 | SUBDIR+= test_complex |
20 | 20 | |
21 | .include "bps.subdir.mk" | |
21 | .include "generic.subdir.mk" | |
22 | 22 | |
23 | 23 | ### End of file `Makefile' |
16 | 16 | TEST= TestComplex |
17 | 17 | TEST+= TestComplexMultiple |
18 | 18 | |
19 | TESTSEQUENCE= clean obj depend build install | |
19 | TEST_SEQUENCE= clean obj depend build install | |
20 | 20 | |
21 | 21 | .if "${WITH_TESTSUITE_GPG}" == "yes" |
22 | TESTSEQUENCE+= dist | |
22 | TEST_SEQUENCE+= dist | |
23 | 23 | .endif |
24 | 24 | |
25 | 25 | .include "bsdowl.test.mk" |
53 | 53 | test: test-dist |
54 | 54 | .endif |
55 | 55 | |
56 | .include "bps.project.mk" | |
56 | .include "generic.project.mk" | |
57 | 57 | |
58 | 58 | ### End of file `TestComplex.mk' |
18 | 18 | SUBDIR+= test_library |
19 | 19 | SUBDIR+= test_complex |
20 | 20 | |
21 | .include "bps.subdir.mk" | |
21 | .include "generic.subdir.mk" | |
22 | 22 | |
23 | 23 | ### End of file `Makefile' |
38 | 38 | |
39 | 39 | test: test-lib test-doc test-prog |
40 | 40 | |
41 | .include "bps.project.mk" | |
41 | .include "generic.project.mk" | |
42 | 42 | |
43 | 43 | ### End of file `TestComplex.mk' |
15 | 15 | |
16 | 16 | TEST= TestLibrary |
17 | 17 | TEST+= TestLibraryDoc |
18 | TEST+= TestLibraryDynlink | |
18 | 19 | |
19 | 20 | .if "${WITH_TESTSUITE_FINDLIB}" == "yes" |
20 | 21 | TEST+= TestLibraryFindlib |
0 | ### TestLibraryDynlink.mk -- Produce a simple library and install with findlib | |
1 | ||
2 | # Author: Michael Grünewald | |
3 | # Date: Sun Nov 30 12:18:24 CET 2014 | |
4 | ||
5 | # BSD Owl Scripts (https://github.com/michipili/bsdowl) | |
6 | # This file is part of BSD Owl Scripts | |
7 | # | |
8 | # Copyright © 2005–2014 Michael Grünewald | |
9 | # | |
10 | # This file must be used under the terms of the CeCILL-B. | |
11 | # This source file is licensed as described in the file COPYING, which | |
12 | # you should have received as part of this distribution. The terms | |
13 | # are also available at | |
14 | # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt | |
15 | ||
16 | LIBRARY= newton | |
17 | ||
18 | SRCS= newton.ml | |
19 | ||
20 | USES+= site-lib | |
21 | USES+= dynlink | |
22 | ||
23 | COMPILE= native | |
24 | ||
25 | .PATH: ${TESTSRCDIR}/ocaml/newton | |
26 | .PATH: ${TESTSRCDIR}/ocaml/newton-meta | |
27 | ||
28 | test: | |
29 | test -f ${DESTDIR}${LIBDIR}/newton.cmxa | |
30 | test -f ${DESTDIR}${LIBDIR}/newton.cmxs | |
31 | test -f ${DESTDIR}${LIBDIR}/newton.cmi | |
32 | test -f ${DESTDIR}${LIBDIR}/META | |
33 | ||
34 | .include "ocaml.lib.mk" | |
35 | ||
36 | ### End of file `TestLibraryDynlink.mk' |
17 | 17 | SUBDIR= test_shell |
18 | 18 | SUBDIR+= test_python |
19 | 19 | |
20 | .include "bps.subdir.mk" | |
20 | .include "generic.subdir.mk" | |
21 | 21 | |
22 | 22 | ### End of file `Makefile' |
19 | 19 | SUBDIR+= funniest |
20 | 20 | .endif |
21 | 21 | |
22 | .include "bps.subdir.mk" | |
22 | .include "generic.subdir.mk" | |
23 | 23 | |
24 | 24 | ### End of file `Makefile' |
31 | 31 | |
32 | 32 | USE_SUBDIR= yes |
33 | 33 | |
34 | .include "bps.subdir.mk" | |
34 | .include "generic.subdir.mk" | |
35 | 35 | |
36 | 36 | ### End of file `Makefile' |
35 | 35 | test -f ${DESTDIR}${DOCDIR}/complex.ps |
36 | 36 | test -f ${DESTDIR}${DOCDIR}/complex.pdf |
37 | 37 | |
38 | .include "bps.project.mk" | |
38 | .include "generic.project.mk" | |
39 | 39 | |
40 | 40 | ### End of file `TestComplex.mk' |
51 | 51 | |
52 | 52 | test: test-class test-example test-manual |
53 | 53 | |
54 | .include "bps.project.mk" | |
54 | .include "generic.project.mk" | |
55 | 55 | |
56 | 56 | ### End of file `TestNoweb.mk' |
143 | 143 | |
144 | 144 | |
145 | 145 | # |
146 | # Document names | |
147 | # | |
148 | ||
149 | .for document in ${_TEX_DOCUMENT} | |
150 | .for device in ${TEXDEVICE} | |
151 | .if defined(DOCNAME.${document:T})&&!defined(DOCNAME.${document:T}.${device}) | |
152 | DOCNAME.${document:T}.${device}= ${DOCNAME.${document:T}}.${device} | |
153 | .endif | |
154 | .endfor | |
155 | .endfor | |
156 | ||
157 | .for document in ${_MPOST_DOCUMENT} | |
158 | .for device in ${MPDEVICE} | |
159 | .if defined(DOCNAME.${document:T})&&!defined(DOCNAME.${document:T}.${device}) | |
160 | DOCNAME.${document:T}.${device}= ${DOCNAME.${document:T}}.${device} | |
161 | .endif | |
162 | .endfor | |
163 | .endfor | |
164 | ||
165 | ||
166 | # | |
146 | 167 | # Register cookiefiles |
147 | 168 | # |
148 | 169 |
43 | 43 | |
44 | 44 | .for document in ${_TEX_DOCUMENT} |
45 | 45 | .for device in ${TEXDEVICE} |
46 | .if defined(TEXDOCNAME.${document:T}.${device}) | |
47 | DOCNAME.${document:T}.${device}:= ${TEXDOCNAME.${document:T}}_${TEXDRAFTSTAMP}.${device} | |
46 | .if defined(DOCNAME.${document:T}.${device}) | |
47 | DOCNAME.${document:T}.${device}:= ${DOCNAME.${document:T}}_${TEXDRAFTSTAMP}.${device} | |
48 | 48 | .else |
49 | 49 | DOCNAME.${document:T}.${device}= ${document:T}_${TEXDRAFTSTAMP}.${device} |
50 | 50 | .endif |
20 | 20 | .if !target(__<texmf.module.mk>__) |
21 | 21 | __<texmf.module.mk>__: |
22 | 22 | |
23 | .for module_name in mpost.files mpost.doc\ | |
24 | tex.files tex.doc latex.files latex.doc | |
25 | .for path in MPINPUTS TEXINPUTS | |
26 | ||
27 | .for module_path in ${_MODULE_${module_name}_ARGS} | |
28 | .if empty(${module_path}:M${SRCDIR}/${module_path}) | |
29 | ${path}+= ${SRCDIR}/${module_path} | |
30 | .endif | |
31 | .if empty(${module_path}:M${WRKDIR}/${module_path}) | |
32 | ${path}+= ${WRKDIR}/${module_path} | |
33 | .endif | |
34 | .endfor | |
35 | ||
36 | .endfor | |
37 | .endfor | |
38 | ||
23 | 39 | .endif # !target(__<texmf.module.mk>__) |
24 | 40 | |
25 | 41 | ### End of file `texmf.module.mk' |