Debian Codegraph @

posix/Makefile

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 # Copyright (C) 1991-2026 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
3
4 # The GNU C Library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
8
9 # The GNU C Library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
13
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with the GNU C Library; if not, see
16 # <https://www.gnu.org/licenses/>.
17
18 #
19 # Sub-makefile for POSIX portion of the library.
20 #
21 subdir := posix
22
23 include ../Makeconfig
24
25 headers := \
26 bits/confname.h \
27 bits/cpu-set.h \
28 bits/environments.h \
29 bits/getopt_core.h \
30 bits/getopt_ext.h \
31 bits/getopt_posix.h \
32 bits/local_lim.h \
33 bits/mman_ext.h \
34 bits/posix1_lim.h \
35 bits/posix2_lim.h \
36 bits/posix_opt.h \
37 bits/pthreadtypes-arch.h \
38 bits/pthreadtypes.h \
39 bits/sched.h \
40 bits/spawn_ext.h \
41 bits/thread-shared-types.h \
42 bits/types.h \
43 bits/types/idtype_t.h \
44 bits/types/struct_sched_param.h \
45 bits/typesizes.h \
46 bits/unistd-decl.h \
47 bits/unistd.h \
48 bits/unistd_ext.h \
49 bits/utsname.h \
50 bits/waitflags.h \
51 bits/waitstatus.h \
52 cpio.h \
53 fnmatch.h \
54 getopt.h \
55 glob.h \
56 re_comp.h \
57 regex.h \
58 sched.h \
59 spawn.h \
60 sys/times.h \
61 sys/types.h \
62 sys/unistd.h \
63 sys/utsname.h \
64 sys/wait.h \
65 tar.h \
66 unistd.h \
67 wait.h \
68 wordexp.h \
69 # headers
70
71 routines := \
72 _Fork \
73 _exit \
74 alarm \
75 bsd-getpgrp \
76 confstr \
77 execl \
78 execle \
79 execlp \
80 execv \
81 execve \
82 execveat \
83 execvp \
84 execvpe \
85 fexecve \
86 fnmatch \
87 fork \
88 fpathconf \
89 gai_strerror \
90 get_child_max \
91 getegid \
92 geteuid \
93 getgid \
94 getgroups \
95 getopt \
96 getopt1 \
97 getpgid \
98 getpgrp \
99 getpid \
100 getppid \
101 getresgid \
102 getresuid \
103 getsid \
104 getuid \
105 glob \
106 glob-lstat-compat \
107 glob64 \
108 glob64-lstat-compat \
109 glob64-time64 \
110 glob_pattern_p \
111 globfree \
112 globfree64 \
113 globfree64-time64 \
114 group_member \
115 nanosleep \
116 pathconf \
117 pause \
118 posix_madvise \
119 pread \
120 pread64 \
121 pwrite \
122 pwrite64 \
123 regex \
124 register-atfork \
125 sched_cpualloc \
126 sched_cpucount \
127 sched_cpufree \
128 sched_getaffinity \
129 sched_getp \
130 sched_gets \
131 sched_primax \
132 sched_primin \
133 sched_rr_gi \
134 sched_setaffinity \
135 sched_setp \
136 sched_sets \
137 sched_yield \
138 setgid \
139 setgroups \
140 setpgid \
141 setpgrp \
142 setresgid \
143 setresuid \
144 setsid \
145 setuid \
146 shm-directory \
147 sleep \
148 spawn \
149 spawn_faction_addchdir \
150 spawn_faction_addclose \
151 spawn_faction_addclosefrom \
152 spawn_faction_adddup2 \
153 spawn_faction_addfchdir \
154 spawn_faction_addopen \
155 spawn_faction_addtcsetpgrp_np \
156 spawn_faction_destroy \
157 spawn_faction_init \
158 spawn_valid_fd \
159 spawnattr_destroy \
160 spawnattr_getdefault \
161 spawnattr_getflags \
162 spawnattr_getpgroup \
163 spawnattr_getschedparam \
164 spawnattr_getschedpolicy \
165 spawnattr_getsigmask \
166 spawnattr_init \
167 spawnattr_setdefault \
168 spawnattr_setflags \
169 spawnattr_setpgroup \
170 spawnattr_setschedparam \
171 spawnattr_setschedpolicy \
172 spawnattr_setsigmask \
173 spawni \
174 spawnp \
175 streams-compat \
176 sysconf \
177 times \
178 uname \
179 vfork \
180 wait \
181 wait3 \
182 wait4 \
183 waitid \
184 waitpid \
185 wordexp \
186 # routines
187
188 # Exclude fortified routines from being built with _FORTIFY_SOURCE
189 routines_no_fortify += \
190 confstr \
191 getgroups \
192 pread \
193 pread64 \
194 # routines_no_fortify
195
196 aux := \
197 environ \
198 init-posix \
199 # aux
200
201 tests := \
202 bug-ga1 \
203 bug-getopt1 \
204 bug-getopt2 \
205 bug-getopt3 \
206 bug-getopt4 \
207 bug-getopt5 \
208 bug-glob2 \
209 bug-glob3 \
210 bug-regex1 \
211 bug-regex2 \
212 bug-regex3 \
213 bug-regex4 \
214 bug-regex6 \
215 bug-regex7 \
216 bug-regex8 \
217 bug-regex9 \
218 bug-regex10 \
219 bug-regex11 \
220 bug-regex12 \
221 bug-regex13 \
222 bug-regex14 \
223 bug-regex15 \
224 bug-regex16 \
225 bug-regex17 \
226 bug-regex18 \
227 bug-regex19 \
228 bug-regex21 \
229 bug-regex22 \
230 bug-regex23 \
231 bug-regex24 \
232 bug-regex25 \
233 bug-regex26 \
234 bug-regex27 \
235 bug-regex28 \
236 bug-regex29 \
237 bug-regex30 \
238 bug-regex31 \
239 bug-regex32 \
240 bug-regex34 \
241 bug-regex35 \
242 bug-regex36 \
243 bug-regex37 \
244 bug-regex38 \
245 regexbug1 \
246 runptests \
247 runtests \
248 test-errno \
249 test-ssize-max \
250 test-vfork \
251 testfnm \
252 transbug \
253 tst-boost \
254 tst-chmod \
255 tst-cpucount \
256 tst-cpuset-dynamic \
257 tst-cpuset-static \
258 tst-dir \
259 tst-execl1 \
260 tst-execl2 \
261 tst-execle1 \
262 tst-execle2 \
263 tst-execlp1 \
264 tst-execlp2 \
265 tst-execv1 \
266 tst-execv2 \
267 tst-execve1 \
268 tst-execve2 \
269 tst-execveat \
270 tst-execvp1 \
271 tst-execvp2 \
272 tst-execvp3 \
273 tst-execvp4 \
274 tst-execvpe1 \
275 tst-execvpe2 \
276 tst-execvpe3 \
277 tst-execvpe4 \
278 tst-execvpe5 \
279 tst-execvpe6 \
280 tst-fexecve \
281 tst-fnmatch \
282 tst-fnmatch2 \
283 tst-fnmatch3 \
284 tst-fnmatch4 \
285 tst-fnmatch5 \
286 tst-fnmatch6 \
287 tst-fnmatch7 \
288 tst-fork \
289 tst-gai_strerror \
290 tst-getopt_long1 \
291 tst-glob-bz30635 \
292 tst-glob-tilde \
293 tst-glob_symlinks \
294 tst-gnuglob \
295 tst-gnuglob64 \
296 tst-mmap \
297 tst-mmap-offset \
298 tst-nanosleep \
299 tst-nice \
300 tst-pathconf \
301 tst-pcre \
302 tst-posix_fadvise \
303 tst-posix_fadvise64 \
304 tst-posix_spawn-fd \
305 tst-posix_spawn-setsid \
306 tst-preadwrite \
307 tst-preadwrite64 \
308 tst-regcomp-bracket-free \
309 tst-regcomp-truncated \
310 tst-regex \
311 tst-regex2 \
312 tst-regexloc \
313 tst-rxspencer \
314 tst-rxspencer-no-utf8 \
315 tst-sched_getaffinity \
316 tst-spawn-chdir \
317 tst-spawn4 \
318 tst-spawn5 \
319 tst-spawn6 \
320 tst-spawn7 \
321 tst-sysconf \
322 tst-sysconf-empty-chroot \
323 tst-truncate \
324 tst-truncate64 \
325 tst-vfork1 \
326 tst-vfork2 \
327 tst-wait3 \
328 tst-wait4 \
329 tst-waitid \
330 tst-wordexp-nocmd \
331 tst-wordexp-reuse \
332 tstgetopt \
333 # tests
334
335 # Test for the glob symbol version that was replaced in glibc 2.27.
336 ifeq ($(have-GLIBC_2.26)$(build-shared),yesyes)
337 tests += \
338 tst-glob_lstat_compat
339 # tests
340 endif
341
342 # Test for the posix_spawn, posix_spawnp symbol versions replaced in
343 # glibc 2.15.
344 ifeq ($(have-GLIBC_2.14)$(build-shared),yesyes)
345 tests += \
346 tst-spawn4-compat \
347 # tests
348 endif
349
350 tests-internal := \
351 bug-regex5 \
352 bug-regex20 \
353 bug-regex33 \
354 tst-libc-message \
355 # tests-internal
356
357 tests-container := \
358 bug-ga2 \
359 tst-vfork3 \
360 # tests-container
361
362 tests-time64 := \
363 tst-gnuglob64-time64 \
364 tst-wait3-time64 \
365 tst-wait4-time64 \
366 # tests-time64
367
368 xtests := \
369 tst-sched_rr_get_interval \
370 # xtests
371
372 xtests-time64 := \
373 tst-sched_rr_get_interval-time64 \
374 # xtests-time64
375
376 ifeq (yes,$(build-shared))
377 test-srcs := \
378 globtest
379 # tests-src
380 tests += \
381 tst-exec \
382 tst-spawn \
383 tst-spawn2 \
384 tst-spawn3 \
385 wordexp-test \
386 # tests
387 endif
388
389 ifeq (yesyes,$(build-shared)$(have-thread-library))
390 tests += \
391 tst-_Fork \
392 tst-getopt-cancel \
393 # tests
394 endif
395
396 tests-static = \
397 tst-exec-static \
398 tst-libc-message \
399 tst-spawn-static \
400 # tests-static
401
402 tests += \
403 $(tests-static)
404 # tests
405
406 others := \
407 getconf \
408 # others
409
410 install-bin := \
411 getconf \
412 # getconf
413
414 install-others-programs := \
415 $(inst_libexecdir)/getconf \
416 # install-others-programs
417
418 before-compile += \
419 $(objpfx)posix-conf-vars-def.h \
420 # before-compile
421
422 # So they get cleaned up.
423 generated += \
424 $(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \
425 annexc \
426 annexc.out \
427 getconf.speclist \
428 ptestcases.h \
429 testcases.h \
430 tst-getconf.out \
431 wordexp-tst.out \
432 # generated
433
434 ifeq ($(run-built-tests),yes)
435 ifeq (yes,$(build-shared))
436 ifneq ($(PERL),no)
437 generated += \
438 bug-ga2-mem.out \
439 bug-ga2.mtrace \
440 bug-glob2-mem.out \
441 bug-glob2.mtrace \
442 bug-regex14-mem.out \
443 bug-regex14.mtrace \
444 bug-regex2-mem.out \
445 bug-regex2.mtrace \
446 bug-regex21-mem.out \
447 bug-regex21.mtrace \
448 bug-regex31-mem.out \
449 bug-regex31.mtrace \
450 bug-regex36-mem.out \
451 bug-regex36.mtrace \
452 tst-boost-mem.out \
453 tst-boost.mtrace \
454 tst-fnmatch-mem.out \
455 tst-fnmatch.mtrace \
456 tst-pcre-mem.out \
457 tst-pcre.mtrace \
458 tst-rxspencer-no-utf8-mem.out \
459 tst-rxspencer-no-utf8.mtrace \
460 tst-vfork3-mem.out \
461 tst-vfork3.mtrace \
462 tst-wordexp-reuse-mem.out \
463 tst-wordexp-reuse.mtrace \
464 # generated
465 endif
466 endif
467 endif
468
469 ifeq ($(run-built-tests),yes)
470 ifeq (yes,$(build-shared))
471 tests-special += \
472 $(objpfx)globtest.out \
473 $(objpfx)wordexp-tst.out \
474 # tests-special
475 endif
476 endif
477
478 # Run a test on the header files we use.
479 # XXX Please note that for now we ignore the result of this test.
480 tests-special += $(objpfx)annexc.out
481 ifeq ($(run-built-tests),yes)
482 tests-special += \
483 $(objpfx)tst-getconf-limits.out \
484 $(objpfx)tst-getconf.out \
485 # tests-special
486 ifeq (yes,$(build-shared))
487 ifneq ($(PERL),no)
488 tests-special += \
489 $(objpfx)bug-ga2-mem.out \
490 $(objpfx)bug-glob2-mem.out \
491 $(objpfx)bug-regex14-mem.out \
492 $(objpfx)bug-regex2-mem.out \
493 $(objpfx)bug-regex21-mem.out \
494 $(objpfx)bug-regex31-mem.out \
495 $(objpfx)bug-regex36-mem.out \
496 $(objpfx)tst-boost-mem.out \
497 $(objpfx)tst-fnmatch-mem.out \
498 $(objpfx)tst-glob-tilde-mem.out \
499 $(objpfx)tst-pcre-mem.out \
500 $(objpfx)tst-rxspencer-no-utf8-mem.out \
501 $(objpfx)tst-vfork3-mem.out \
502 $(objpfx)tst-wordexp-reuse.out \
503 # tests-special
504 endif
505 endif
506 endif
507
508 include ../Rules
509
510 ifeq ($(run-built-tests),yes)
511 # globtest and wordexp-test currently only works with shared libraries
512 ifeq (yes,$(build-shared))
513 $(objpfx)globtest.out: globtest.sh $(objpfx)globtest
514 $(SHELL) $< $(common-objpfx) '$(test-via-rtld-prefix)' \
515 '$(test-program-prefix)' '$(test-wrapper-env)'; \
516 $(evaluate-test)
517 $(objpfx)wordexp-tst.out: wordexp-tst.sh $(objpfx)wordexp-test
518 $(SHELL) $< $(common-objpfx) '$(test-program-prefix-before-env)' \
519 '$(run-program-env)' '$(test-program-prefix-after-env)'; \
520 $(evaluate-test)
521 endif
522
523 LOCALES := \
524 C.UTF-8 \
525 cs_CZ.ISO-8859-2 \
526 cs_CZ.UTF-8 \
527 da_DK.ISO-8859-1 \
528 de_DE.ISO-8859-1 \
529 de_DE.UTF-8 \
530 en_US.UTF-8 \
531 es_US.ISO-8859-1 \
532 es_US.UTF-8 \
533 ja_JP.EUC-JP \
534 tr_TR.UTF-8 \
535 # LOCALES
536 include ../gen-locales.mk
537
538 $(objpfx)bug-regex1.out: $(gen-locales)
539 $(objpfx)bug-regex4.out: $(gen-locales)
540 $(objpfx)bug-regex5.out: $(gen-locales)
541 $(objpfx)bug-regex6.out: $(gen-locales)
542 $(objpfx)bug-regex17.out: $(gen-locales)
543 $(objpfx)bug-regex18.out: $(gen-locales)
544 $(objpfx)bug-regex19.out: $(gen-locales)
545 $(objpfx)bug-regex20.out: $(gen-locales)
546 $(objpfx)bug-regex22.out: $(gen-locales)
547 $(objpfx)bug-regex23.out: $(gen-locales)
548 $(objpfx)bug-regex25.out: $(gen-locales)
549 $(objpfx)bug-regex26.out: $(gen-locales)
550 $(objpfx)bug-regex30.out: $(gen-locales)
551 $(objpfx)bug-regex32.out: $(gen-locales)
552 $(objpfx)bug-regex33.out: $(gen-locales)
553 $(objpfx)bug-regex34.out: $(gen-locales)
554 $(objpfx)bug-regex35.out: $(gen-locales)
555 $(objpfx)tst-fnmatch.out: $(gen-locales)
556 $(objpfx)tst-fnmatch4.out: $(gen-locales)
557 $(objpfx)tst-fnmatch5.out: $(gen-locales)
558 $(objpfx)tst-fnmatch6.out: $(gen-locales)
559 $(objpfx)tst-regex.out: $(gen-locales)
560 $(objpfx)tst-regex2.out: $(gen-locales)
561 $(objpfx)tst-regexloc.out: $(gen-locales)
562 $(objpfx)tst-rxspencer.out: $(gen-locales)
563 $(objpfx)tst-rxspencer-no-utf8.out: $(gen-locales)
564 $(objpfx)tst-regcomp-truncated.out: $(gen-locales)
565 endif
566
567 # If we will use the generic uname implementation, we must figure out what
568 # it will say by examining the system, and write the results in config-name.h.
569 uname.c: $(objpfx)config-name.h
570 $(objpfx)config-name.h: $(..)scripts/config-uname.sh $(common-objpfx)config.make
571 $(make-target-directory)
572 $< '$(config-os)' '$(config-release)' \
573 '$(config-machine)-$(config-vendor)' > [email protected]
574 mv -f [email protected] $@
575
576 CFLAGS-pause.c += -fexceptions -fasynchronous-unwind-tables
577 CFLAGS-pread.c += -fexceptions -fasynchronous-unwind-tables
578 CFLAGS-pread64.c += -fexceptions -fasynchronous-unwind-tables
579 CFLAGS-pwrite.c += -fexceptions -fasynchronous-unwind-tables
580 CFLAGS-pwrite64.c += -fexceptions -fasynchronous-unwind-tables
581 CFLAGS-sleep.c += -fexceptions
582 CFLAGS-wait.c += -fexceptions -fasynchronous-unwind-tables
583 CFLAGS-waitid.c += -fexceptions -fasynchronous-unwind-tables
584 CFLAGS-waitpid.c += -fexceptions -fasynchronous-unwind-tables
585 CFLAGS-wait4.c += -fexceptions -fasynchronous-unwind-tables
586 CFLAGS-getopt.c += -fexceptions
587 CFLAGS-wordexp.c += -fexceptions
588 CFLAGS-wordexp.os = -fomit-frame-pointer
589 CFLAGS-sysconf.c += -fexceptions -DGETCONF_DIR='"$(libexecdir)/getconf"'
590 CFLAGS-pathconf.c += -fexceptions
591 CFLAGS-fpathconf.c += -fexceptions
592 CFLAGS-spawn.c += -fexceptions
593 CFLAGS-spawn.os = -fomit-frame-pointer
594 CFLAGS-spawnp.c += -fexceptions
595 CFLAGS-spawnp.os = -fomit-frame-pointer
596 CFLAGS-spawni.c += -fexceptions
597 CFLAGS-spawni.os = -fomit-frame-pointer
598 CFLAGS-glob.c += $(uses-callbacks) -fexceptions
599 CFLAGS-glob64.c += $(uses-callbacks) -fexceptions
600 CFLAGS-getconf.c += -DGETCONF_DIR='"$(libexecdir)/getconf"'
601 CFLAGS-execve.os = -fomit-frame-pointer
602 CFLAGS-fexecve.os = -fomit-frame-pointer
603 CFLAGS-execv.os = -fomit-frame-pointer
604 CFLAGS-execle.os = -fomit-frame-pointer
605 CFLAGS-execl.os = -fomit-frame-pointer
606 CFLAGS-execvp.os = -fomit-frame-pointer
607 CFLAGS-execlp.os = -fomit-frame-pointer
608 CFLAGS-nanosleep.c += -fexceptions -fasynchronous-unwind-tables
609 CFLAGS-fork.c = $(libio-mtsafe)
610
611 tstgetopt-ARGS = -a -b -cfoobar --required foobar --optional=bazbug \
612 --none random --col --color --colour
613
614 tst-exec-ARGS = -- $(host-test-program-cmd)
615 tst-exec-static-ARGS = $(tst-exec-ARGS)
616 tst-execvpe5-ARGS = -- $(host-test-program-cmd)
617 tst-spawn-ARGS = -- $(host-test-program-cmd)
618 tst-spawn-static-ARGS = $(tst-spawn-ARGS)
619 tst-spawn5-ARGS = -- $(host-test-program-cmd)
620 tst-spawn6-ARGS = -- $(host-test-program-cmd)
621 tst-spawn7-ARGS = -- $(host-test-program-cmd)
622 tst-posix_spawn-setsid-ARGS = -- $(host-test-program-cmd)
623 tst-dir-ARGS = `pwd` `cd $(common-objdir)/$(subdir); pwd` `cd $(common-objdir); pwd` $(objpfx)tst-dir
624 tst-chmod-ARGS = $(objdir)
625 tst-vfork3-ARGS = --test-dir=$(objpfx)
626
627 tst-rxspencer-ARGS = --utf8 rxspencer/tests
628 tst-rxspencer-no-utf8-ARGS = rxspencer/tests
629 tst-pcre-ARGS = PCRE.tests
630 tst-boost-ARGS = BOOST.tests
631 bug-glob1-ARGS = "$(objpfx)"
632 tst-execvp3-ARGS = --test-dir=$(objpfx)
633 CFLAGS-tst-spawn3.c += -DOBJPFX=\"$(objpfx)\"
634
635 # Test voluntarily overflows struct dirent
636 CFLAGS-bug-glob2.c += $(no-fortify-source)
637
638 $(objpfx)testcases.h: TESTS TESTS2C.sed
639 LC_ALL=C sed -f TESTS2C.sed < $< > $@T
640 mv $@T $@
641 $(objpfx)runtests.o: $(objpfx)testcases.h
642
643 $(objpfx)ptestcases.h: PTESTS PTESTS2C.sed
644 LC_ALL=C sed -f PTESTS2C.sed < $< > $@T
645 mv $@T $@
646 $(objpfx)runptests.o: $(objpfx)ptestcases.h
647
648 $(objpfx)tst-getopt-cancel: $(shared-thread-library)
649 $(objpfx)tst-_Fork: $(shared-thread-library)
650
651 test-xfail-annexc = yes
652 $(objpfx)annexc.out: $(objpfx)annexc
653 $(dir $<)$(notdir $<) '$(CC)' \
654 '$(patsubst %,-I../%,$(sorted-subdirs)) -I../include $(+sysdep-includes) $(sysincludes) -I..' > $@; \
655 $(evaluate-test)
656
657 annexc-CFLAGS = -O
658 $(objpfx)annexc: annexc.c
659 $(native-compile)
660
661 tst-fnmatch-ENV += MALLOC_TRACE=$(objpfx)tst-fnmatch.mtrace \
662 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
663
664 $(objpfx)tst-fnmatch-mem.out: $(objpfx)tst-fnmatch.out
665 $(common-objpfx)malloc/mtrace $(objpfx)tst-fnmatch.mtrace > $@; \
666 $(evaluate-test)
667
668 bug-regex2-ENV = MALLOC_TRACE=$(objpfx)bug-regex2.mtrace \
669 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
670
671 $(objpfx)bug-regex2-mem.out: $(objpfx)bug-regex2.out
672 $(common-objpfx)malloc/mtrace $(objpfx)bug-regex2.mtrace > $@; \
673 $(evaluate-test)
674
675 bug-regex14-ENV = MALLOC_TRACE=$(objpfx)bug-regex14.mtrace \
676 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
677
678 $(objpfx)bug-regex14-mem.out: $(objpfx)bug-regex14.out
679 $(common-objpfx)malloc/mtrace $(objpfx)bug-regex14.mtrace > $@; \
680 $(evaluate-test)
681
682 bug-regex21-ENV = MALLOC_TRACE=$(objpfx)bug-regex21.mtrace \
683 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
684
685 $(objpfx)bug-regex21-mem.out: $(objpfx)bug-regex21.out
686 $(common-objpfx)malloc/mtrace $(objpfx)bug-regex21.mtrace > $@; \
687 $(evaluate-test)
688
689 bug-regex31-ENV = MALLOC_TRACE=$(objpfx)bug-regex31.mtrace \
690 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
691
692 $(objpfx)bug-regex31-mem.out: $(objpfx)bug-regex31.out
693 $(common-objpfx)malloc/mtrace $(objpfx)bug-regex31.mtrace > $@; \
694 $(evaluate-test)
695
696 bug-regex36-ENV = MALLOC_TRACE=$(objpfx)bug-regex36.mtrace \
697 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
698
699 $(objpfx)bug-regex36-mem.out: $(objpfx)bug-regex36.out
700 $(common-objpfx)malloc/mtrace $(objpfx)bug-regex36.mtrace > $@; \
701 $(evaluate-test)
702
703 tst-vfork3-ENV = MALLOC_TRACE=$(objpfx)tst-vfork3.mtrace \
704 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
705
706 $(objpfx)tst-vfork3-mem.out: $(objpfx)tst-vfork3.out
707 { test -r $(objpfx)tst-vfork3.mtrace \
708 || ( echo "tst-vfork3.mtrace does not exist"; exit 77; ) \
709 && $(common-objpfx)malloc/mtrace $(objpfx)tst-vfork3.mtrace; } > $@; \
710 $(evaluate-test)
711
712 # tst-rxspencer.mtrace is not generated, only
713 # tst-rxspencer-no-utf8.mtrace, since otherwise the file has almost
714 # 100M and takes very long time to process.
715 tst-rxspencer-no-utf8-ENV += \
716 MALLOC_TRACE=$(objpfx)tst-rxspencer-no-utf8.mtrace \
717 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
718 $(objpfx)tst-rxspencer-no-utf8-mem.out: $(objpfx)tst-rxspencer-no-utf8.out
719 $(common-objpfx)malloc/mtrace $(objpfx)tst-rxspencer-no-utf8.mtrace \
720 > $@; \
721 $(evaluate-test)
722
723 tst-pcre-ENV = MALLOC_TRACE=$(objpfx)tst-pcre.mtrace \
724 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
725 $(objpfx)tst-pcre-mem.out: $(objpfx)tst-pcre.out
726 $(common-objpfx)malloc/mtrace $(objpfx)tst-pcre.mtrace > $@; \
727 $(evaluate-test)
728
729 tst-boost-ENV = MALLOC_TRACE=$(objpfx)tst-boost.mtrace \
730 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
731 $(objpfx)tst-boost-mem.out: $(objpfx)tst-boost.out
732 $(common-objpfx)malloc/mtrace $(objpfx)tst-boost.mtrace > $@; \
733 $(evaluate-test)
734
735 $(objpfx)tst-getconf.out: tst-getconf.sh $(objpfx)getconf
736 $(SHELL) $< $(common-objpfx) '$(built-program-cmd)'; \
737 $(evaluate-test)
738
739 $(objpfx)tst-getconf-limits.out: tst-getconf-limits.py $(objpfx)getconf
740 PYTHONPATH=../scripts \
741 $(PYTHON) tst-getconf-limits.py \
742 --cc="$(CC) $(patsubst -DMODULE_NAME=%, \
743 -DMODULE_NAME=testsuite, \
744 $(CPPFLAGS)) -D_ISOMAC" \
745 '$(built-program-cmd)' \
746 < /dev/null > $@ 2>&1; $(evaluate-test)
747
748
749 $(objpfx)bug-ga2-mem.out: $(objpfx)bug-ga2.out
750 { test -r $(objpfx)bug-ga2.mtrace \
751 || ( echo "bug-ga2.mtrace does not exist"; exit 77; ) \
752 && $(common-objpfx)malloc/mtrace $(objpfx)bug-ga2.mtrace; } > $@; \
753 $(evaluate-test)
754
755 bug-ga2-ENV = MALLOC_TRACE=$(objpfx)bug-ga2.mtrace \
756 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
757
758 bug-glob2-ENV = MALLOC_TRACE=$(objpfx)bug-glob2.mtrace \
759 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
760
761 $(objpfx)bug-glob2-mem.out: $(objpfx)bug-glob2.out
762 $(common-objpfx)malloc/mtrace $(objpfx)bug-glob2.mtrace > $@; \
763 $(evaluate-test)
764
765 tst-glob-tilde-ENV = MALLOC_TRACE=$(objpfx)tst-glob-tilde.mtrace \
766 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
767
768 $(objpfx)tst-glob-tilde-mem.out: $(objpfx)tst-glob-tilde.out
769 $(common-objpfx)malloc/mtrace $(objpfx)tst-glob-tilde.mtrace > $@; \
770 $(evaluate-test)
771
772 $(inst_libexecdir)/getconf: $(inst_bindir)/getconf \
773 $(objpfx)getconf.speclist FORCE
774 $(addprefix $(..)./scripts/mkinstalldirs ,\
775 $(filter-out $(wildcard $@),$@))
776 while read spec; do \
777 ln -f $< $@/$$spec.new || $(INSTALL_PROGRAM) $< $@/$$spec.new; \
778 mv -f $@/$$spec.new $@/$$spec; \
779 done < $(objpfx)getconf.speclist
780
781 $(objpfx)getconf.speclist: getconf-speclist.c posix-envs.def
782 $(compile.c) -E -o - \
783 | sed -n -e '/@@@PRESENT_/s/@@@PRESENT_//p' > [email protected]
784 mv -f [email protected] $@
785
786 # This file is only actually needed at install time. But forcing it to
787 # be built both makes it available for eyeball inspection and avoids the
788 # surprise of things that look like compilation being done by 'make install'.
789 others: $(objpfx)getconf.speclist
790
791 $(objpfx)posix-conf-vars-def.h: $(..)scripts/gen-posix-conf-vars.awk \
792 posix-conf-vars.list Makefile
793 $(make-target-directory)
794 $(AWK) -f $(filter-out Makefile, $^) > [email protected]
795 mv -f [email protected] $@
796
797 tst-wordexp-reuse-ENV += MALLOC_TRACE=$(objpfx)tst-wordexp-reuse.mtrace \
798 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
799
800 $(objpfx)tst-wordexp-reuse-mem.out: $(objpfx)tst-wordexp-reuse.out
801 $(common-objpfx)malloc/mtrace $(objpfx)tst-wordexp-reuse.mtrace > $@; \
802 $(evaluate-test)