Translations: Add new ro support and update others.
[glibc.git] / posix / Makefile
blob3d368b91f6ca6acc6fdcfba51dcdf76f025f7778
1 # Copyright (C) 1991-2023 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
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.
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.
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/>.
19 # Sub-makefile for POSIX portion of the library.
21 subdir := posix
23 include ../Makeconfig
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/thread-shared-types.h \
41 bits/types.h \
42 bits/types/idtype_t.h \
43 bits/types/struct_sched_param.h \
44 bits/typesizes.h \
45 bits/unistd-decl.h \
46 bits/unistd.h \
47 bits/unistd_ext.h \
48 bits/utsname.h \
49 bits/waitflags.h \
50 bits/waitstatus.h \
51 cpio.h \
52 fnmatch.h \
53 getopt.h \
54 glob.h \
55 re_comp.h \
56 regex.h \
57 sched.h \
58 spawn.h \
59 sys/times.h \
60 sys/types.h \
61 sys/unistd.h \
62 sys/utsname.h \
63 sys/wait.h \
64 tar.h \
65 unistd.h \
66 wait.h \
67 wordexp.h \
68 # headers
70 routines := \
71 _Fork \
72 _exit \
73 alarm \
74 bsd-getpgrp \
75 confstr \
76 execl \
77 execle \
78 execlp \
79 execv \
80 execve \
81 execveat \
82 execvp \
83 execvpe \
84 fexecve \
85 fnmatch \
86 fork \
87 fpathconf \
88 gai_strerror \
89 get_child_max \
90 getaddrinfo \
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 setpgid \
140 setpgrp \
141 setresgid \
142 setresuid \
143 setsid \
144 setuid \
145 shm-directory \
146 sleep \
147 spawn \
148 spawn_faction_addchdir \
149 spawn_faction_addclose \
150 spawn_faction_addclosefrom \
151 spawn_faction_adddup2 \
152 spawn_faction_addfchdir \
153 spawn_faction_addopen \
154 spawn_faction_addtcsetpgrp_np \
155 spawn_faction_destroy \
156 spawn_faction_init \
157 spawn_valid_fd \
158 spawnattr_destroy \
159 spawnattr_getdefault \
160 spawnattr_getflags \
161 spawnattr_getpgroup \
162 spawnattr_getschedparam \
163 spawnattr_getschedpolicy \
164 spawnattr_getsigmask \
165 spawnattr_init \
166 spawnattr_setdefault \
167 spawnattr_setflags \
168 spawnattr_setpgroup \
169 spawnattr_setschedparam \
170 spawnattr_setschedpolicy \
171 spawnattr_setsigmask \
172 spawni \
173 spawnp \
174 streams-compat \
175 sysconf \
176 times \
177 uname \
178 vfork \
179 wait \
180 wait3 \
181 wait4 \
182 waitid \
183 waitpid \
184 wordexp \
185 # routines
187 # Exclude fortified routines from being built with _FORTIFY_SOURCE
188 routines_no_fortify += \
189 confstr \
190 getgroups \
191 pread \
192 pread64 \
193 # routines_no_fortify
195 aux := \
196 environ \
197 init-posix \
198 # aux
200 tests := \
201 bug-ga1 \
202 bug-getopt1 \
203 bug-getopt2 \
204 bug-getopt3 \
205 bug-getopt4 \
206 bug-getopt5 \
207 bug-glob2 \
208 bug-glob3 \
209 bug-regex1 \
210 bug-regex2 \
211 bug-regex3 \
212 bug-regex4 \
213 bug-regex6 \
214 bug-regex7 \
215 bug-regex8 \
216 bug-regex9 \
217 bug-regex10 \
218 bug-regex11 \
219 bug-regex12 \
220 bug-regex13 \
221 bug-regex14 \
222 bug-regex15 \
223 bug-regex16 \
224 bug-regex17 \
225 bug-regex18 \
226 bug-regex19 \
227 bug-regex21 \
228 bug-regex22 \
229 bug-regex23 \
230 bug-regex24 \
231 bug-regex25 \
232 bug-regex26 \
233 bug-regex27 \
234 bug-regex28 \
235 bug-regex29 \
236 bug-regex30 \
237 bug-regex31 \
238 bug-regex32 \
239 bug-regex34 \
240 bug-regex35 \
241 bug-regex36 \
242 bug-regex37 \
243 bug-regex38 \
244 regexbug1 \
245 runptests \
246 runtests \
247 test-errno \
248 test-ssize-max \
249 test-vfork \
250 testfnm \
251 transbug \
252 tst-boost \
253 tst-chmod \
254 tst-cpucount \
255 tst-cpuset \
256 tst-dir \
257 tst-execl1 \
258 tst-execl2 \
259 tst-execle1 \
260 tst-execle2 \
261 tst-execlp1 \
262 tst-execlp2 \
263 tst-execv1 \
264 tst-execv2 \
265 tst-execve1 \
266 tst-execve2 \
267 tst-execveat \
268 tst-execvp1 \
269 tst-execvp2 \
270 tst-execvp3 \
271 tst-execvp4 \
272 tst-execvpe1 \
273 tst-execvpe2 \
274 tst-execvpe3 \
275 tst-execvpe4 \
276 tst-execvpe5 \
277 tst-execvpe6 \
278 tst-fexecve \
279 tst-fnmatch \
280 tst-fnmatch2 \
281 tst-fnmatch3 \
282 tst-fnmatch4 \
283 tst-fnmatch5 \
284 tst-fnmatch6 \
285 tst-fnmatch7 \
286 tst-fork \
287 tst-gai_strerror \
288 tst-getaddrinfo \
289 tst-getaddrinfo2 \
290 tst-getaddrinfo3 \
291 tst-getopt_long1 \
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-truncated \
309 tst-regex \
310 tst-regex2 \
311 tst-regexloc \
312 tst-rxspencer \
313 tst-rxspencer-no-utf8 \
314 tst-sched_getaffinity \
315 tst-spawn-chdir \
316 tst-spawn4 \
317 tst-spawn5 \
318 tst-spawn6 \
319 tst-spawn7 \
320 tst-sysconf \
321 tst-sysconf-empty-chroot \
322 tst-truncate \
323 tst-truncate64 \
324 tst-vfork1 \
325 tst-vfork2 \
326 tst-wait3 \
327 tst-wait4 \
328 tst-waitid \
329 tst-wordexp-nocmd \
330 tstgetopt \
331 # tests
333 # Test for the glob symbol version that was replaced in glibc 2.27.
334 ifeq ($(have-GLIBC_2.26)$(build-shared),yesyes)
335 tests += \
336 tst-glob_lstat_compat
337 # tests
338 endif
340 # Test for the posix_spawn, posix_spawnp symbol versions replaced in
341 # glibc 2.15.
342 ifeq ($(have-GLIBC_2.14)$(build-shared),yesyes)
343 tests += \
344 tst-spawn4-compat \
345 # tests
346 endif
348 tests-internal := \
349 bug-regex5 \
350 bug-regex20 \
351 bug-regex33 \
352 tst-rfc3484 \
353 tst-rfc3484-2 \
354 tst-rfc3484-3 \
355 # tests-internal
357 tests-container := \
358 bug-ga2 \
359 tst-vfork3 \
360 # tests-container
362 tests-time64 := \
363 tst-gnuglob64-time64 \
364 tst-wait3-time64 \
365 tst-wait4-time64 \
366 # tests-time64
368 xtests := \
369 tst-getaddrinfo4 \
370 tst-getaddrinfo5 \
371 tst-sched_rr_get_interval \
372 # xtests
374 xtests-time64 := \
375 tst-sched_rr_get_interval-time64 \
376 # xtests-time64
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
391 ifeq (yesyes,$(build-shared)$(have-thread-library))
392 tests += \
393 tst-_Fork \
394 tst-getopt-cancel \
395 # tests
396 endif
398 tests-static = \
399 tst-exec-static \
400 tst-spawn-static \
401 # tests-static
403 tests += \
404 $(tests-static)
405 # tests
407 others := \
408 getconf \
409 # others
411 install-bin := \
412 getconf \
413 # getconf
415 install-others-programs := \
416 $(inst_libexecdir)/getconf \
417 # install-others-programs
419 before-compile += \
420 $(objpfx)posix-conf-vars-def.h \
421 # before-compile
423 # So they get cleaned up.
424 generated += \
425 $(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \
426 annexc \
427 annexc.out \
428 bug-ga2-mem.out \
429 bug-ga2.mtrace \
430 bug-glob2-mem.out \
431 bug-glob2.mtrace \
432 bug-regex14-mem.out \
433 bug-regex14.mtrace \
434 bug-regex2-mem.out \
435 bug-regex2.mtrace \
436 bug-regex21-mem.out \
437 bug-regex21.mtrace \
438 bug-regex31-mem.out \
439 bug-regex31.mtrace \
440 bug-regex36.mtrace \
441 getconf.speclist \
442 ptestcases.h \
443 testcases.h \
444 tst-boost-mem.out \
445 tst-boost.mtrace \
446 tst-fnmatch-mem.out \
447 tst-fnmatch.mtrace \
448 tst-getconf.out \
449 tst-pcre-mem.out \
450 tst-pcre.mtrace \
451 tst-rxspencer-no-utf8-mem.out \
452 tst-rxspencer-no-utf8.mtrace \
453 tst-vfork3-mem.out \
454 tst-vfork3.mtrace \
455 wordexp-tst.out \
456 # generated
458 ifeq ($(run-built-tests),yes)
459 ifeq (yes,$(build-shared))
460 tests-special += \
461 $(objpfx)globtest.out \
462 $(objpfx)wordexp-tst.out \
463 # tests-special
464 endif
465 endif
467 # Run a test on the header files we use.
468 # XXX Please note that for now we ignore the result of this test.
469 tests-special += $(objpfx)annexc.out
470 ifeq ($(run-built-tests),yes)
471 tests-special += \
472 $(objpfx)bug-ga2-mem.out \
473 $(objpfx)bug-glob2-mem.out \
474 $(objpfx)bug-regex14-mem.out \
475 $(objpfx)bug-regex2-mem.out \
476 $(objpfx)bug-regex21-mem.out \
477 $(objpfx)bug-regex31-mem.out \
478 $(objpfx)bug-regex36-mem.out \
479 $(objpfx)tst-boost-mem.out \
480 $(objpfx)tst-fnmatch-mem.out \
481 $(objpfx)tst-getconf.out \
482 $(objpfx)tst-glob-tilde-mem.out \
483 $(objpfx)tst-pcre-mem.out \
484 $(objpfx)tst-rxspencer-no-utf8-mem.out \
485 $(objpfx)tst-vfork3-mem.out \
486 # tests-special
487 endif
489 include ../Rules
491 ifeq ($(run-built-tests),yes)
492 # globtest and wordexp-test currently only works with shared libraries
493 ifeq (yes,$(build-shared))
494 $(objpfx)globtest.out: globtest.sh $(objpfx)globtest
495 $(SHELL) $< $(common-objpfx) '$(test-via-rtld-prefix)' \
496 '$(test-program-prefix)' '$(test-wrapper-env)'; \
497 $(evaluate-test)
498 $(objpfx)wordexp-tst.out: wordexp-tst.sh $(objpfx)wordexp-test
499 $(SHELL) $< $(common-objpfx) '$(test-program-prefix-before-env)' \
500 '$(run-program-env)' '$(test-program-prefix-after-env)'; \
501 $(evaluate-test)
502 endif
504 LOCALES := \
505 C.UTF-8 \
506 cs_CZ.ISO-8859-2 \
507 cs_CZ.UTF-8 \
508 da_DK.ISO-8859-1 \
509 de_DE.ISO-8859-1 \
510 de_DE.UTF-8 \
511 en_US.UTF-8 \
512 es_US.ISO-8859-1 \
513 es_US.UTF-8 \
514 ja_JP.EUC-JP \
515 tr_TR.UTF-8 \
516 # LOCALES
517 include ../gen-locales.mk
519 $(objpfx)bug-regex1.out: $(gen-locales)
520 $(objpfx)bug-regex4.out: $(gen-locales)
521 $(objpfx)bug-regex5.out: $(gen-locales)
522 $(objpfx)bug-regex6.out: $(gen-locales)
523 $(objpfx)bug-regex17.out: $(gen-locales)
524 $(objpfx)bug-regex18.out: $(gen-locales)
525 $(objpfx)bug-regex19.out: $(gen-locales)
526 $(objpfx)bug-regex20.out: $(gen-locales)
527 $(objpfx)bug-regex22.out: $(gen-locales)
528 $(objpfx)bug-regex23.out: $(gen-locales)
529 $(objpfx)bug-regex25.out: $(gen-locales)
530 $(objpfx)bug-regex26.out: $(gen-locales)
531 $(objpfx)bug-regex30.out: $(gen-locales)
532 $(objpfx)bug-regex32.out: $(gen-locales)
533 $(objpfx)bug-regex33.out: $(gen-locales)
534 $(objpfx)bug-regex34.out: $(gen-locales)
535 $(objpfx)bug-regex35.out: $(gen-locales)
536 $(objpfx)tst-fnmatch.out: $(gen-locales)
537 $(objpfx)tst-fnmatch4.out: $(gen-locales)
538 $(objpfx)tst-fnmatch5.out: $(gen-locales)
539 $(objpfx)tst-fnmatch6.out: $(gen-locales)
540 $(objpfx)tst-regex.out: $(gen-locales)
541 $(objpfx)tst-regex2.out: $(gen-locales)
542 $(objpfx)tst-regexloc.out: $(gen-locales)
543 $(objpfx)tst-rxspencer.out: $(gen-locales)
544 $(objpfx)tst-rxspencer-no-utf8.out: $(gen-locales)
545 $(objpfx)tst-regcomp-truncated.out: $(gen-locales)
546 endif
548 # If we will use the generic uname implementation, we must figure out what
549 # it will say by examining the system, and write the results in config-name.h.
550 uname.c: $(objpfx)config-name.h
551 $(objpfx)config-name.h: $(..)scripts/config-uname.sh $(common-objpfx)config.make
552 $(make-target-directory)
553 $< '$(config-os)' '$(config-release)' \
554 '$(config-machine)-$(config-vendor)' > $@.new
555 mv -f $@.new $@
557 CFLAGS-getaddrinfo.c += -DRESOLVER -fexceptions
558 CFLAGS-pause.c += -fexceptions -fasynchronous-unwind-tables
559 CFLAGS-pread.c += -fexceptions -fasynchronous-unwind-tables
560 CFLAGS-pread64.c += -fexceptions -fasynchronous-unwind-tables $(config-cflags-wno-ignored-attributes)
561 CFLAGS-pwrite.c += -fexceptions -fasynchronous-unwind-tables
562 CFLAGS-pwrite64.c += -fexceptions -fasynchronous-unwind-tables $(config-cflags-wno-ignored-attributes)
563 CFLAGS-sleep.c += -fexceptions
564 CFLAGS-wait.c += -fexceptions -fasynchronous-unwind-tables
565 CFLAGS-waitid.c += -fexceptions -fasynchronous-unwind-tables
566 CFLAGS-waitpid.c += -fexceptions -fasynchronous-unwind-tables
567 CFLAGS-wait4.c += -fexceptions -fasynchronous-unwind-tables
568 CFLAGS-getopt.c += -fexceptions
569 CFLAGS-wordexp.c += -fexceptions
570 CFLAGS-wordexp.os = -fomit-frame-pointer
571 CFLAGS-sysconf.c += -fexceptions -DGETCONF_DIR='"$(libexecdir)/getconf"'
572 CFLAGS-pathconf.c += -fexceptions
573 CFLAGS-fpathconf.c += -fexceptions
574 CFLAGS-spawn.c += -fexceptions
575 CFLAGS-spawn.os = -fomit-frame-pointer
576 CFLAGS-spawnp.c += -fexceptions
577 CFLAGS-spawnp.os = -fomit-frame-pointer
578 CFLAGS-spawni.c += -fexceptions
579 CFLAGS-spawni.os = -fomit-frame-pointer
580 CFLAGS-glob.c += $(uses-callbacks) -fexceptions
581 CFLAGS-glob64.c += $(uses-callbacks) -fexceptions
582 CFLAGS-getconf.c += -DGETCONF_DIR='"$(libexecdir)/getconf"'
583 CFLAGS-execve.os = -fomit-frame-pointer
584 CFLAGS-fexecve.os = -fomit-frame-pointer
585 CFLAGS-execv.os = -fomit-frame-pointer
586 CFLAGS-execle.os = -fomit-frame-pointer
587 CFLAGS-execl.os = -fomit-frame-pointer
588 CFLAGS-execvp.os = -fomit-frame-pointer
589 CFLAGS-execlp.os = -fomit-frame-pointer
590 CFLAGS-nanosleep.c += -fexceptions -fasynchronous-unwind-tables
591 CFLAGS-fork.c = $(libio-mtsafe) $(config-cflags-wno-ignored-attributes)
593 tstgetopt-ARGS = -a -b -cfoobar --required foobar --optional=bazbug \
594 --none random --col --color --colour
596 tst-exec-ARGS = -- $(host-test-program-cmd)
597 tst-exec-static-ARGS = $(tst-exec-ARGS)
598 tst-execvpe5-ARGS = -- $(host-test-program-cmd)
599 tst-spawn-ARGS = -- $(host-test-program-cmd)
600 tst-spawn-static-ARGS = $(tst-spawn-ARGS)
601 tst-spawn5-ARGS = -- $(host-test-program-cmd)
602 tst-spawn6-ARGS = -- $(host-test-program-cmd)
603 tst-spawn7-ARGS = -- $(host-test-program-cmd)
604 tst-dir-ARGS = `pwd` `cd $(common-objdir)/$(subdir); pwd` `cd $(common-objdir); pwd` $(objpfx)tst-dir
605 tst-chmod-ARGS = $(objdir)
606 tst-vfork3-ARGS = --test-dir=$(objpfx)
608 tst-rxspencer-ARGS = --utf8 rxspencer/tests
609 tst-rxspencer-no-utf8-ARGS = rxspencer/tests
610 tst-pcre-ARGS = PCRE.tests
611 tst-boost-ARGS = BOOST.tests
612 bug-glob1-ARGS = "$(objpfx)"
613 tst-execvp3-ARGS = --test-dir=$(objpfx)
614 CFLAGS-tst-spawn3.c += -DOBJPFX=\"$(objpfx)\"
616 # Test voluntarily overflows struct dirent
617 CFLAGS-bug-glob2.c += $(no-fortify-source)
619 $(objpfx)testcases.h: TESTS TESTS2C.sed
620 LC_ALL=C sed -f TESTS2C.sed < $< > $@T
621 mv $@T $@
622 $(objpfx)runtests.o: $(objpfx)testcases.h
624 $(objpfx)ptestcases.h: PTESTS PTESTS2C.sed
625 LC_ALL=C sed -f PTESTS2C.sed < $< > $@T
626 mv $@T $@
627 $(objpfx)runptests.o: $(objpfx)ptestcases.h
629 $(objpfx)tst-getopt-cancel: $(shared-thread-library)
630 $(objpfx)tst-_Fork: $(shared-thread-library)
632 test-xfail-annexc = yes
633 $(objpfx)annexc.out: $(objpfx)annexc
634 $(dir $<)$(notdir $<) '$(CC)' \
635 '$(patsubst %,-I../%,$(sorted-subdirs)) -I../include $(+sysdep-includes) $(sysincludes) -I..' > $@; \
636 $(evaluate-test)
638 annexc-CFLAGS = -O
639 $(objpfx)annexc: annexc.c
640 $(native-compile)
642 tst-fnmatch-ENV += MALLOC_TRACE=$(objpfx)tst-fnmatch.mtrace \
643 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
645 $(objpfx)tst-fnmatch-mem.out: $(objpfx)tst-fnmatch.out
646 $(common-objpfx)malloc/mtrace $(objpfx)tst-fnmatch.mtrace > $@; \
647 $(evaluate-test)
649 bug-regex2-ENV = MALLOC_TRACE=$(objpfx)bug-regex2.mtrace \
650 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
652 $(objpfx)bug-regex2-mem.out: $(objpfx)bug-regex2.out
653 $(common-objpfx)malloc/mtrace $(objpfx)bug-regex2.mtrace > $@; \
654 $(evaluate-test)
656 bug-regex14-ENV = MALLOC_TRACE=$(objpfx)bug-regex14.mtrace \
657 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
659 $(objpfx)bug-regex14-mem.out: $(objpfx)bug-regex14.out
660 $(common-objpfx)malloc/mtrace $(objpfx)bug-regex14.mtrace > $@; \
661 $(evaluate-test)
663 bug-regex21-ENV = MALLOC_TRACE=$(objpfx)bug-regex21.mtrace \
664 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
666 $(objpfx)bug-regex21-mem.out: $(objpfx)bug-regex21.out
667 $(common-objpfx)malloc/mtrace $(objpfx)bug-regex21.mtrace > $@; \
668 $(evaluate-test)
670 bug-regex31-ENV = MALLOC_TRACE=$(objpfx)bug-regex31.mtrace \
671 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
673 $(objpfx)bug-regex31-mem.out: $(objpfx)bug-regex31.out
674 $(common-objpfx)malloc/mtrace $(objpfx)bug-regex31.mtrace > $@; \
675 $(evaluate-test)
677 bug-regex36-ENV = MALLOC_TRACE=$(objpfx)bug-regex36.mtrace \
678 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
680 $(objpfx)bug-regex36-mem.out: $(objpfx)bug-regex36.out
681 $(common-objpfx)malloc/mtrace $(objpfx)bug-regex36.mtrace > $@; \
682 $(evaluate-test)
684 tst-vfork3-ENV = MALLOC_TRACE=$(objpfx)tst-vfork3.mtrace \
685 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
687 $(objpfx)tst-vfork3-mem.out: $(objpfx)tst-vfork3.out
688 { test -r $(objpfx)tst-vfork3.mtrace \
689 || ( echo "tst-vfork3.mtrace does not exist"; exit 77; ) \
690 && $(common-objpfx)malloc/mtrace $(objpfx)tst-vfork3.mtrace; } > $@; \
691 $(evaluate-test)
693 # tst-rxspencer.mtrace is not generated, only
694 # tst-rxspencer-no-utf8.mtrace, since otherwise the file has almost
695 # 100M and takes very long time to process.
696 tst-rxspencer-no-utf8-ENV += \
697 MALLOC_TRACE=$(objpfx)tst-rxspencer-no-utf8.mtrace \
698 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
699 $(objpfx)tst-rxspencer-no-utf8-mem.out: $(objpfx)tst-rxspencer-no-utf8.out
700 $(common-objpfx)malloc/mtrace $(objpfx)tst-rxspencer-no-utf8.mtrace \
701 > $@; \
702 $(evaluate-test)
704 tst-pcre-ENV = MALLOC_TRACE=$(objpfx)tst-pcre.mtrace \
705 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
706 $(objpfx)tst-pcre-mem.out: $(objpfx)tst-pcre.out
707 $(common-objpfx)malloc/mtrace $(objpfx)tst-pcre.mtrace > $@; \
708 $(evaluate-test)
710 tst-boost-ENV = MALLOC_TRACE=$(objpfx)tst-boost.mtrace \
711 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
712 $(objpfx)tst-boost-mem.out: $(objpfx)tst-boost.out
713 $(common-objpfx)malloc/mtrace $(objpfx)tst-boost.mtrace > $@; \
714 $(evaluate-test)
716 $(objpfx)tst-getconf.out: tst-getconf.sh $(objpfx)getconf
717 $(SHELL) $< $(common-objpfx) '$(built-program-cmd)'; \
718 $(evaluate-test)
720 $(objpfx)bug-ga2-mem.out: $(objpfx)bug-ga2.out
721 { test -r $(objpfx)bug-ga2.mtrace \
722 || ( echo "bug-ga2.mtrace does not exist"; exit 77; ) \
723 && $(common-objpfx)malloc/mtrace $(objpfx)bug-ga2.mtrace; } > $@; \
724 $(evaluate-test)
726 bug-ga2-ENV = MALLOC_TRACE=$(objpfx)bug-ga2.mtrace \
727 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
729 bug-glob2-ENV = MALLOC_TRACE=$(objpfx)bug-glob2.mtrace \
730 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
732 $(objpfx)bug-glob2-mem.out: $(objpfx)bug-glob2.out
733 $(common-objpfx)malloc/mtrace $(objpfx)bug-glob2.mtrace > $@; \
734 $(evaluate-test)
736 tst-glob-tilde-ENV = MALLOC_TRACE=$(objpfx)tst-glob-tilde.mtrace \
737 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
739 $(objpfx)tst-glob-tilde-mem.out: $(objpfx)tst-glob-tilde.out
740 $(common-objpfx)malloc/mtrace $(objpfx)tst-glob-tilde.mtrace > $@; \
741 $(evaluate-test)
743 $(inst_libexecdir)/getconf: $(inst_bindir)/getconf \
744 $(objpfx)getconf.speclist FORCE
745 $(addprefix $(..)./scripts/mkinstalldirs ,\
746 $(filter-out $(wildcard $@),$@))
747 while read spec; do \
748 ln -f $< $@/$$spec.new || $(INSTALL_PROGRAM) $< $@/$$spec.new; \
749 mv -f $@/$$spec.new $@/$$spec; \
750 done < $(objpfx)getconf.speclist
752 $(objpfx)getconf.speclist: getconf-speclist.c posix-envs.def
753 $(compile.c) -E -o - \
754 | sed -n -e '/@@@PRESENT_/s/@@@PRESENT_//p' > $@.new
755 mv -f $@.new $@
757 # This file is only actually needed at install time. But forcing it to
758 # be built both makes it available for eyeball inspection and avoids the
759 # surprise of things that look like compilation being done by 'make install'.
760 others: $(objpfx)getconf.speclist
762 $(objpfx)posix-conf-vars-def.h: $(..)scripts/gen-posix-conf-vars.awk \
763 posix-conf-vars.list Makefile
764 $(make-target-directory)
765 $(AWK) -f $(filter-out Makefile, $^) > $@.tmp
766 mv -f $@.tmp $@