Debian Codegraph @

posix/Makefile

raw symbols ◀ ▶ SCIP
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-append \
331 tst-wordexp-nocmd \
332 tst-wordexp-reuse \
333 tstgetopt \
334 # tests
335
336 # Test for the glob symbol version that was replaced in glibc 2.27.
337 ifeq ($(have-GLIBC_2.26)$(build-shared),yesyes)
338 tests += \
339 tst-glob_lstat_compat
340 # tests
341 endif
342
343 # Test for the posix_spawn, posix_spawnp symbol versions replaced in
344 # glibc 2.15.
345 ifeq ($(have-GLIBC_2.14)$(build-shared),yesyes)
346 tests += \
347 tst-spawn4-compat \
348 # tests
349 endif
350
351 tests-internal := \
352 bug-regex5 \
353 bug-regex20 \
354 bug-regex33 \
355 tst-libc-message \
356 # tests-internal
357
358 tests-container := \
359 bug-ga2 \
360 tst-vfork3 \
•361 tst-wordexp-tilde \
362 # tests-container
363
364 tests-time64 := \
365 tst-gnuglob64-time64 \
366 tst-wait3-time64 \
367 tst-wait4-time64 \
368 # tests-time64
369
370 xtests := \
371 tst-sched_rr_get_interval \
372 # xtests
373
374 xtests-time64 := \
375 tst-sched_rr_get_interval-time64 \
376 # xtests-time64
377
378 ifeq (yes,$(build-shared))
379 test-srcs := \
380 globtest
381 # tests-src
382 tests += \
383 tst-exec \
384 tst-spawn \
385 tst-spawn2 \
386 tst-spawn3 \
387 wordexp-test \
388 # tests
389 endif
390
391 ifeq (yesyes,$(build-shared)$(have-thread-library))
392 tests += \
393 tst-_Fork \
394 tst-getopt-cancel \
395 # tests
396 endif
397
398 tests-static = \
399 tst-exec-static \
400 tst-libc-message \
401 tst-spawn-static \
402 # tests-static
403
404 tests += \
405 $(tests-static)
406 # tests
407
408 others := \
409 getconf \
410 # others
411
412 install-bin := \
413 getconf \
414 # getconf
415
416 install-others-programs := \
417 $(inst_libexecdir)/getconf \
418 # install-others-programs
419
420 before-compile += \
421 $(objpfx)posix-conf-vars-def.h \
422 # before-compile
423
424 # So they get cleaned up.
425 generated += \
426 $(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \
427 annexc \
428 annexc.out \
429 getconf.speclist \
430 ptestcases.h \
431 testcases.h \
432 tst-getconf.out \
433 wordexp-tst.out \
434 # generated
435
436 ifeq ($(run-built-tests),yes)
437 ifeq (yes,$(build-shared))
438 ifneq ($(PERL),no)
439 generated += \
440 bug-ga2-mem.out \
441 bug-ga2.mtrace \
442 bug-glob2-mem.out \
443 bug-glob2.mtrace \
444 bug-regex14-mem.out \
445 bug-regex14.mtrace \
446 bug-regex2-mem.out \
447 bug-regex2.mtrace \
448 bug-regex21-mem.out \
449 bug-regex21.mtrace \
450 bug-regex31-mem.out \
451 bug-regex31.mtrace \
452 bug-regex36-mem.out \
453 bug-regex36.mtrace \
454 tst-boost-mem.out \
455 tst-boost.mtrace \
456 tst-fnmatch-mem.out \
457 tst-fnmatch.mtrace \
458 tst-pcre-mem.out \
459 tst-pcre.mtrace \
460 tst-rxspencer-no-utf8-mem.out \
461 tst-rxspencer-no-utf8.mtrace \
462 tst-vfork3-mem.out \
463 tst-vfork3.mtrace \
464 tst-wordexp-reuse-mem.out \
465 tst-wordexp-reuse.mtrace \
466 # generated
467 endif
468 endif
469 endif
470
471 ifeq ($(run-built-tests),yes)
472 ifeq (yes,$(build-shared))
473 tests-special += \
474 $(objpfx)globtest.out \
475 $(objpfx)wordexp-tst.out \
476 # tests-special
477 endif
478 endif
479
480 # Run a test on the header files we use.
481 # XXX Please note that for now we ignore the result of this test.
482 tests-special += $(objpfx)annexc.out
483 ifeq ($(run-built-tests),yes)
484 tests-special += \
485 $(objpfx)tst-getconf-limits.out \
486 $(objpfx)tst-getconf.out \
487 # tests-special
488 ifeq (yes,$(build-shared))
489 ifneq ($(PERL),no)
490 tests-special += \
491 $(objpfx)bug-ga2-mem.out \
492 $(objpfx)bug-glob2-mem.out \
493 $(objpfx)bug-regex14-mem.out \
494 $(objpfx)bug-regex2-mem.out \
495 $(objpfx)bug-regex21-mem.out \
496 $(objpfx)bug-regex31-mem.out \
497 $(objpfx)bug-regex36-mem.out \
498 $(objpfx)tst-boost-mem.out \
499 $(objpfx)tst-fnmatch-mem.out \
500 $(objpfx)tst-glob-tilde-mem.out \
501 $(objpfx)tst-pcre-mem.out \
502 $(objpfx)tst-rxspencer-no-utf8-mem.out \
503 $(objpfx)tst-vfork3-mem.out \
•504 $(objpfx)tst-wordexp-reuse-mem.out \
505 # tests-special
506 endif
507 endif
508 endif
509
510 include ../Rules
511
512 ifeq ($(run-built-tests),yes)
513 # globtest and wordexp-test currently only works with shared libraries
514 ifeq (yes,$(build-shared))
515 $(objpfx)globtest.out: globtest.sh $(objpfx)globtest
516 $(SHELL) $< $(common-objpfx) '$(test-via-rtld-prefix)' \
517 '$(test-program-prefix)' '$(test-wrapper-env)'; \
518 $(evaluate-test)
519 $(objpfx)wordexp-tst.out: wordexp-tst.sh $(objpfx)wordexp-test
520 $(SHELL) $< $(common-objpfx) '$(test-program-prefix-before-env)' \
521 '$(run-program-env)' '$(test-program-prefix-after-env)'; \
522 $(evaluate-test)
523 endif
524
525 LOCALES := \
526 C.UTF-8 \
527 cs_CZ.ISO-8859-2 \
528 cs_CZ.UTF-8 \
529 da_DK.ISO-8859-1 \
530 de_DE.ISO-8859-1 \
531 de_DE.UTF-8 \
532 en_US.UTF-8 \
533 es_US.ISO-8859-1 \
534 es_US.UTF-8 \
535 ja_JP.EUC-JP \
536 tr_TR.UTF-8 \
537 # LOCALES
538 include ../gen-locales.mk
539
540 $(objpfx)bug-regex1.out: $(gen-locales)
541 $(objpfx)bug-regex4.out: $(gen-locales)
542 $(objpfx)bug-regex5.out: $(gen-locales)
543 $(objpfx)bug-regex6.out: $(gen-locales)
544 $(objpfx)bug-regex17.out: $(gen-locales)
545 $(objpfx)bug-regex18.out: $(gen-locales)
546 $(objpfx)bug-regex19.out: $(gen-locales)
547 $(objpfx)bug-regex20.out: $(gen-locales)
548 $(objpfx)bug-regex22.out: $(gen-locales)
549 $(objpfx)bug-regex23.out: $(gen-locales)
550 $(objpfx)bug-regex25.out: $(gen-locales)
551 $(objpfx)bug-regex26.out: $(gen-locales)
552 $(objpfx)bug-regex30.out: $(gen-locales)
553 $(objpfx)bug-regex32.out: $(gen-locales)
554 $(objpfx)bug-regex33.out: $(gen-locales)
555 $(objpfx)bug-regex34.out: $(gen-locales)
556 $(objpfx)bug-regex35.out: $(gen-locales)
557 $(objpfx)tst-fnmatch.out: $(gen-locales)
558 $(objpfx)tst-fnmatch4.out: $(gen-locales)
559 $(objpfx)tst-fnmatch5.out: $(gen-locales)
560 $(objpfx)tst-fnmatch6.out: $(gen-locales)
561 $(objpfx)tst-regex.out: $(gen-locales)
562 $(objpfx)tst-regex2.out: $(gen-locales)
563 $(objpfx)tst-regexloc.out: $(gen-locales)
564 $(objpfx)tst-rxspencer.out: $(gen-locales)
565 $(objpfx)tst-rxspencer-no-utf8.out: $(gen-locales)
566 $(objpfx)tst-regcomp-truncated.out: $(gen-locales)
567 endif
568
569 # If we will use the generic uname implementation, we must figure out what
570 # it will say by examining the system, and write the results in config-name.h.
571 uname.c: $(objpfx)config-name.h
572 $(objpfx)config-name.h: $(..)scripts/config-uname.sh $(common-objpfx)config.make
573 $(make-target-directory)
574 $< '$(config-os)' '$(config-release)' \
575 '$(config-machine)-$(config-vendor)' > [email protected]
576 mv -f [email protected] $@
577
578 CFLAGS-pause.c += -fexceptions -fasynchronous-unwind-tables
579 CFLAGS-pread.c += -fexceptions -fasynchronous-unwind-tables
580 CFLAGS-pread64.c += -fexceptions -fasynchronous-unwind-tables
581 CFLAGS-pwrite.c += -fexceptions -fasynchronous-unwind-tables
582 CFLAGS-pwrite64.c += -fexceptions -fasynchronous-unwind-tables
583 CFLAGS-sleep.c += -fexceptions
584 CFLAGS-wait.c += -fexceptions -fasynchronous-unwind-tables
585 CFLAGS-waitid.c += -fexceptions -fasynchronous-unwind-tables
586 CFLAGS-waitpid.c += -fexceptions -fasynchronous-unwind-tables
587 CFLAGS-wait4.c += -fexceptions -fasynchronous-unwind-tables
588 CFLAGS-getopt.c += -fexceptions
589 CFLAGS-wordexp.c += -fexceptions
590 CFLAGS-wordexp.os = -fomit-frame-pointer
591 CFLAGS-sysconf.c += -fexceptions -DGETCONF_DIR='"$(libexecdir)/getconf"'
592 CFLAGS-pathconf.c += -fexceptions
593 CFLAGS-fpathconf.c += -fexceptions
594 CFLAGS-spawn.c += -fexceptions
595 CFLAGS-spawn.os = -fomit-frame-pointer
596 CFLAGS-spawnp.c += -fexceptions
597 CFLAGS-spawnp.os = -fomit-frame-pointer
598 CFLAGS-spawni.c += -fexceptions
599 CFLAGS-spawni.os = -fomit-frame-pointer
600 CFLAGS-glob.c += $(uses-callbacks) -fexceptions
601 CFLAGS-glob64.c += $(uses-callbacks) -fexceptions
602 CFLAGS-getconf.c += -DGETCONF_DIR='"$(libexecdir)/getconf"'
603 CFLAGS-execve.os = -fomit-frame-pointer
604 CFLAGS-fexecve.os = -fomit-frame-pointer
605 CFLAGS-execv.os = -fomit-frame-pointer
606 CFLAGS-execle.os = -fomit-frame-pointer
607 CFLAGS-execl.os = -fomit-frame-pointer
608 CFLAGS-execvp.os = -fomit-frame-pointer
609 CFLAGS-execlp.os = -fomit-frame-pointer
610 CFLAGS-nanosleep.c += -fexceptions -fasynchronous-unwind-tables
611 CFLAGS-fork.c = $(libio-mtsafe)
612
613 tstgetopt-ARGS = -a -b -cfoobar --required foobar --optional=bazbug \
614 --none random --col --color --colour
615
616 tst-exec-ARGS = -- $(host-test-program-cmd)
617 tst-exec-static-ARGS = $(tst-exec-ARGS)
618 tst-execvpe5-ARGS = -- $(host-test-program-cmd)
619 tst-spawn-ARGS = -- $(host-test-program-cmd)
620 tst-spawn-static-ARGS = $(tst-spawn-ARGS)
621 tst-spawn5-ARGS = -- $(host-test-program-cmd)
622 tst-spawn6-ARGS = -- $(host-test-program-cmd)
623 tst-spawn7-ARGS = -- $(host-test-program-cmd)
624 tst-posix_spawn-setsid-ARGS = -- $(host-test-program-cmd)
625 tst-dir-ARGS = `pwd` `cd $(common-objdir)/$(subdir); pwd` `cd $(common-objdir); pwd` $(objpfx)tst-dir
626 tst-chmod-ARGS = $(objdir)
627 tst-vfork3-ARGS = --test-dir=$(objpfx)
628
629 tst-rxspencer-ARGS = --utf8 rxspencer/tests
630 tst-rxspencer-no-utf8-ARGS = rxspencer/tests
631 tst-pcre-ARGS = PCRE.tests
632 tst-boost-ARGS = BOOST.tests
633 bug-glob1-ARGS = "$(objpfx)"
634 tst-execvp3-ARGS = --test-dir=$(objpfx)
635 CFLAGS-tst-spawn3.c += -DOBJPFX=\"$(objpfx)\"
636
637 # Test voluntarily overflows struct dirent
638 CFLAGS-bug-glob2.c += $(no-fortify-source)
639
640 $(objpfx)testcases.h: TESTS TESTS2C.sed
641 LC_ALL=C sed -f TESTS2C.sed < $< > $@T
642 mv $@T $@
643 $(objpfx)runtests.o: $(objpfx)testcases.h
644
645 $(objpfx)ptestcases.h: PTESTS PTESTS2C.sed
646 LC_ALL=C sed -f PTESTS2C.sed < $< > $@T
647 mv $@T $@
648 $(objpfx)runptests.o: $(objpfx)ptestcases.h
649
650 $(objpfx)tst-getopt-cancel: $(shared-thread-library)
651 $(objpfx)tst-_Fork: $(shared-thread-library)
652
653 test-xfail-annexc = yes
654 $(objpfx)annexc.out: $(objpfx)annexc
655 $(dir $<)$(notdir $<) '$(CC)' \
656 '$(patsubst %,-I../%,$(sorted-subdirs)) -I../include $(+sysdep-includes) $(sysincludes) -I..' > $@; \
657 $(evaluate-test)
658
659 annexc-CFLAGS = -O
660 $(objpfx)annexc: annexc.c
661 $(native-compile)
662
663 tst-fnmatch-ENV += MALLOC_TRACE=$(objpfx)tst-fnmatch.mtrace \
664 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
665
666 $(objpfx)tst-fnmatch-mem.out: $(objpfx)tst-fnmatch.out
667 $(common-objpfx)malloc/mtrace $(objpfx)tst-fnmatch.mtrace > $@; \
668 $(evaluate-test)
669
670 bug-regex2-ENV = MALLOC_TRACE=$(objpfx)bug-regex2.mtrace \
671 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
672
673 $(objpfx)bug-regex2-mem.out: $(objpfx)bug-regex2.out
674 $(common-objpfx)malloc/mtrace $(objpfx)bug-regex2.mtrace > $@; \
675 $(evaluate-test)
676
677 bug-regex14-ENV = MALLOC_TRACE=$(objpfx)bug-regex14.mtrace \
678 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
679
680 $(objpfx)bug-regex14-mem.out: $(objpfx)bug-regex14.out
681 $(common-objpfx)malloc/mtrace $(objpfx)bug-regex14.mtrace > $@; \
682 $(evaluate-test)
683
684 bug-regex21-ENV = MALLOC_TRACE=$(objpfx)bug-regex21.mtrace \
685 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
686
687 $(objpfx)bug-regex21-mem.out: $(objpfx)bug-regex21.out
688 $(common-objpfx)malloc/mtrace $(objpfx)bug-regex21.mtrace > $@; \
689 $(evaluate-test)
690
691 bug-regex31-ENV = MALLOC_TRACE=$(objpfx)bug-regex31.mtrace \
692 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
693
694 $(objpfx)bug-regex31-mem.out: $(objpfx)bug-regex31.out
695 $(common-objpfx)malloc/mtrace $(objpfx)bug-regex31.mtrace > $@; \
696 $(evaluate-test)
697
698 bug-regex36-ENV = MALLOC_TRACE=$(objpfx)bug-regex36.mtrace \
699 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
700
701 $(objpfx)bug-regex36-mem.out: $(objpfx)bug-regex36.out
702 $(common-objpfx)malloc/mtrace $(objpfx)bug-regex36.mtrace > $@; \
703 $(evaluate-test)
704
705 tst-vfork3-ENV = MALLOC_TRACE=$(objpfx)tst-vfork3.mtrace \
706 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
707
708 $(objpfx)tst-vfork3-mem.out: $(objpfx)tst-vfork3.out
709 { test -r $(objpfx)tst-vfork3.mtrace \
710 || ( echo "tst-vfork3.mtrace does not exist"; exit 77; ) \
711 && $(common-objpfx)malloc/mtrace $(objpfx)tst-vfork3.mtrace; } > $@; \
712 $(evaluate-test)
713
714 # tst-rxspencer.mtrace is not generated, only
715 # tst-rxspencer-no-utf8.mtrace, since otherwise the file has almost
716 # 100M and takes very long time to process.
717 tst-rxspencer-no-utf8-ENV += \
718 MALLOC_TRACE=$(objpfx)tst-rxspencer-no-utf8.mtrace \
719 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
720 $(objpfx)tst-rxspencer-no-utf8-mem.out: $(objpfx)tst-rxspencer-no-utf8.out
721 $(common-objpfx)malloc/mtrace $(objpfx)tst-rxspencer-no-utf8.mtrace \
722 > $@; \
723 $(evaluate-test)
724
725 tst-pcre-ENV = MALLOC_TRACE=$(objpfx)tst-pcre.mtrace \
726 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
727 $(objpfx)tst-pcre-mem.out: $(objpfx)tst-pcre.out
728 $(common-objpfx)malloc/mtrace $(objpfx)tst-pcre.mtrace > $@; \
729 $(evaluate-test)
730
731 tst-boost-ENV = MALLOC_TRACE=$(objpfx)tst-boost.mtrace \
732 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
733 $(objpfx)tst-boost-mem.out: $(objpfx)tst-boost.out
734 $(common-objpfx)malloc/mtrace $(objpfx)tst-boost.mtrace > $@; \
735 $(evaluate-test)
736
737 $(objpfx)tst-getconf.out: tst-getconf.sh $(objpfx)getconf
738 $(SHELL) $< $(common-objpfx) '$(built-program-cmd)'; \
739 $(evaluate-test)
740
741 $(objpfx)tst-getconf-limits.out: tst-getconf-limits.py $(objpfx)getconf
742 PYTHONPATH=../scripts \
743 $(PYTHON) tst-getconf-limits.py \
744 --cc="$(CC) $(patsubst -DMODULE_NAME=%, \
745 -DMODULE_NAME=testsuite, \
746 $(CPPFLAGS)) -D_ISOMAC" \
747 '$(built-program-cmd)' \
748 < /dev/null > $@ 2>&1; $(evaluate-test)
749
750
751 $(objpfx)bug-ga2-mem.out: $(objpfx)bug-ga2.out
752 { test -r $(objpfx)bug-ga2.mtrace \
753 || ( echo "bug-ga2.mtrace does not exist"; exit 77; ) \
754 && $(common-objpfx)malloc/mtrace $(objpfx)bug-ga2.mtrace; } > $@; \
755 $(evaluate-test)
756
757 bug-ga2-ENV = MALLOC_TRACE=$(objpfx)bug-ga2.mtrace \
758 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
759
760 bug-glob2-ENV = MALLOC_TRACE=$(objpfx)bug-glob2.mtrace \
761 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
762
763 $(objpfx)bug-glob2-mem.out: $(objpfx)bug-glob2.out
764 $(common-objpfx)malloc/mtrace $(objpfx)bug-glob2.mtrace > $@; \
765 $(evaluate-test)
766
767 tst-glob-tilde-ENV = MALLOC_TRACE=$(objpfx)tst-glob-tilde.mtrace \
768 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
769
770 $(objpfx)tst-glob-tilde-mem.out: $(objpfx)tst-glob-tilde.out
771 $(common-objpfx)malloc/mtrace $(objpfx)tst-glob-tilde.mtrace > $@; \
772 $(evaluate-test)
773
774 $(inst_libexecdir)/getconf: $(inst_bindir)/getconf \
775 $(objpfx)getconf.speclist FORCE
776 $(addprefix $(..)./scripts/mkinstalldirs ,\
777 $(filter-out $(wildcard $@),$@))
778 while read spec; do \
779 ln -f $< $@/$$spec.new || $(INSTALL_PROGRAM) $< $@/$$spec.new; \
780 mv -f $@/$$spec.new $@/$$spec; \
781 done < $(objpfx)getconf.speclist
782
783 $(objpfx)getconf.speclist: getconf-speclist.c posix-envs.def
784 $(compile.c) -E -o - \
785 | sed -n -e '/@@@PRESENT_/s/@@@PRESENT_//p' > [email protected]
786 mv -f [email protected] $@
787
788 # This file is only actually needed at install time. But forcing it to
789 # be built both makes it available for eyeball inspection and avoids the
790 # surprise of things that look like compilation being done by 'make install'.
791 others: $(objpfx)getconf.speclist
792
793 $(objpfx)posix-conf-vars-def.h: $(..)scripts/gen-posix-conf-vars.awk \
794 posix-conf-vars.list Makefile
795 $(make-target-directory)
796 $(AWK) -f $(filter-out Makefile, $^) > [email protected]
797 mv -f [email protected] $@
798
799 tst-wordexp-reuse-ENV += MALLOC_TRACE=$(objpfx)tst-wordexp-reuse.mtrace \
800 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
801
802 $(objpfx)tst-wordexp-reuse-mem.out: $(objpfx)tst-wordexp-reuse.out
803 $(common-objpfx)malloc/mtrace $(objpfx)tst-wordexp-reuse.mtrace > $@; \
804 $(evaluate-test)