1 # Copyright (C) 1991-1999,2000,01,02 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, write to the Free
16 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 # Common rules for making the GNU C library. This file is included
21 # by the top-level Makefile and by all subdirectory makefiles
25 This makefile requires GNU Make.
28 REQUIRED_MAKE_VERSION = 3.74
29 REAL_MAKE_VERSION = $(firstword $(MAKE_VERSION))
31 ifneq ($(REQUIRED_MAKE_VERSION), \
32 $(firstword $(sort $(REAL_MAKE_VERSION) $(REQUIRED_MAKE_VERSION))))
33 Wrong GNU Make version. See above for the version needed.
41 # If `sources' was defined by the parent makefile, undefine it so
42 # we will later get it from wildcard search in this directory.
43 ifneq "$(findstring env,$(origin sources))" ""
48 PATH := this definition should take precedence over $(oPATH)
49 ifeq ($(PATH),$(oPATH))
50 You must not use the -e flag when building the GNU C library.
55 ifndef +included-Makeconfig
56 include $(..)Makeconfig
59 # `configure' writes a definition of `config-sysdirs' in `config.make'.
60 sysdirs = $(strip $(full_config_sysdirs))
62 +sysdir_pfx = $(common-objpfx)
64 export sysdirs := $(sysdirs)
66 +sysdep_dirs := $(full_config_sysdirs)
68 +sysdep_dirs := $(objdir) $(+sysdep_dirs)
71 # Add -I switches to get the right sysdep directories.
72 # `+includes' in Makeconfig references $(+sysdep-includes).
73 +sysdep-includes := $(addprefix -I,$(+sysdep_dirs))
75 # This variable is used in ``include $(o-iterator)'' after defining
76 # $(o-iterator-doit) to produce some desired rule using $o for the object
77 # suffix, and setting $(object-suffixes-left) to $(object-suffixes); a copy
78 # is produced for each object suffix in use.
79 o-iterator = $(patsubst %,$(..)o-iterator.mk,$(object-suffixes-left))
81 # Include any system-specific makefiles.
83 # This is here so things in sysdep Makefiles can easily depend on foo.h as
84 # appropriate and not worry about where foo.h comes from, which may be
85 # system dependent and not known by that Makefile.
86 vpath %.h $(subst $(empty) ,:,$(strip $(common-objpfx) $(objpfx) \
87 $(+sysdep_dirs) $(..)))
89 # The same is true for RPC source files.
90 vpath %.x $(subst $(empty) ,:,$(strip $(common-objpfx) $(objpfx) \
91 $(+sysdep_dirs) $(..)))
93 # Some sysdep makefiles use this to distinguish being included here from
94 # being included individually by a subdir makefile (hurd/Makefile needs this).
97 sysdep-makefiles := $(wildcard $(full_config_sysdirs:=/Makefile))
98 ifneq (,$(sysdep-makefiles))
99 include $(sysdep-makefiles)
103 # Reorder before-compile so that mach things come first, and hurd things
104 # second, before all else. The mach and hurd subdirectories have many
105 # generated header files which the much of rest of the library depends on,
106 # so it is best to build them first (and mach before hurd, at that).
107 before-compile := $(filter $(common-objpfx)mach% $(common-objpfx)hurd%,\
109 $(filter-out $(common-objpfx)mach% $(common-objpfx)hurd%,\
112 # Even before that, we need abi-versions.h which is generated right here.
113 ifeq ($(versioning),yes)
114 ifndef avoid-generated
115 before-compile := $(common-objpfx)abi-versions.h $(before-compile)
116 $(common-objpfx)abi-versions.h: $(..)scripts/abi-versions.awk \
117 $(common-objpfx)Versions.all
118 LC_ALL=C $(AWK) -v oldest_abi=$(oldest-abi) -f $^ > $@T
121 $(common-objpfx)%.latest: $(common-objpfx)abi-versions.h
122 sed -n '/ VERSION_$*_/{s/^.*_\([A-Z0-9_]*\).*$$/\1/;h;};$${g;p;}' \
123 $(common-objpfx)abi-versions.h > $@T
125 endif # avoid-generated
126 endif # $(versioning) = yes
128 # When we have no deps pass doing it, then make sure the subdirectory
129 # for object files gets created.
132 before-compile += $(objpfx).
134 $(make-target-directory)
138 # Remove existing files from `before-compile'. Things are added there when
139 # they must exist for dependency generation to work right, but once they
140 # exist there is no further need for every single file to depend on them,
141 # and those gratuitous dependencies result in many gratuitous
143 before-compile := $(filter-out $(wildcard $(before-compile)),$(before-compile))
145 # Don't let any before-compile file be an intermediate and get removed.
150 # If a makefile needs to do something conditional on something that
151 # can only be figured out from headers, write a FOO.make.c input
152 # file that uses cpp contructs and contains @@@ LINE @@@ for each LINE
153 # to emit in the generated makefile, and use -include $(common-objpfx)FOO.make.
154 $(common-objpfx)%.make: $(..)%.make.c $(..)Makerules
156 (echo '# Generated from $*.make.c by Makerules.'; \
157 SUNPRO_DEPENDENCIES='$@.dT $$(common-objpfx)$*.make' \
158 $(CC) $(CFLAGS) $(CPPFLAGS) -E $< \
159 | sed -n '/@@@/{s/@@@[ ]*\(.*\)@@@/\1/;s/[ ]*$$//p;}'; \
160 echo 'common-generated += $(@F)'; \
161 cat $@.dT; rm -f $@.dT) > $@T
164 # Generate an ordered list of implicit rules which find the source files in
165 # each sysdep directory. The old method was to use vpath to search all the
166 # sysdep directories. However, that had the problem that a .S file in a
167 # later directory would be chosen over a .c file in an earlier directory,
168 # which does not preserve the desired sysdeps ordering behavior.
170 # When making the list of .d files to include, we can't know which ones
171 # have source in .s files, and thus do not in fact need a .d file.
172 # So we must define rules to make .d files for .s files.
173 define make-dummy-dep
174 $(addprefix ln $(common-objpfx)dummy.d ,$(filter-out $(wildcard $@),$@))
176 $(common-objpfx)dummy.d:
177 echo '# .s files cannot contain includes, so they need no deps.' > $@
179 # It matters that this set of rules, for compiling from sources in
180 # the current directory (the $srcdir/$subdir) come before the
181 # generated sysdep rules in included from sysd-rules below. When
182 # compiling in the source tree, generated sources go into the current
183 # directory, and those should be chosen before any sources in sysdeps.
184 define o-iterator-doit
185 $(objpfx)%$o: %.S $(before-compile); $$(compile-command.S)
187 object-suffixes-left := $(all-object-suffixes)
188 include $(o-iterator)
189 $(objpfx)%.d: %.S $(before-compile); $(+make-deps)
191 define o-iterator-doit
192 $(objpfx)%$o: %.s $(before-compile); $$(compile-command.s)
194 object-suffixes-left := $(all-object-suffixes)
195 include $(o-iterator)
196 $(objpfx)%.d: %.s $(common-objpfx)dummy.d; $(make-dummy-dep)
198 define o-iterator-doit
199 $(objpfx)%$o: %.c $(before-compile); $$(compile-command.c)
201 object-suffixes-left := $(all-object-suffixes)
202 include $(o-iterator)
203 $(objpfx)%.d: %.c $(before-compile); $(+make-deps)
205 # Omit the objpfx rules when building in the source tree, because
206 # objpfx is empty and so these rules just override the ones above.
208 # Define first rules to find the source files in $(objpfx).
209 # Generated source files will end up there.
210 define o-iterator-doit
211 $(objpfx)%$o: $(objpfx)%.S $(before-compile); $$(compile-command.S)
213 object-suffixes-left := $(all-object-suffixes)
214 include $(o-iterator)
215 $(objpfx)%.d: $(objpfx)%.S $(before-compile); $(+make-deps)
217 define o-iterator-doit
218 $(objpfx)%$o: $(objpfx)%.s $(before-compile); $$(compile-command.s)
220 object-suffixes-left := $(all-object-suffixes)
221 include $(o-iterator)
222 $(objpfx)%.d: $(objpfx)%.s $(common-objpfx)dummy.d; $(make-dummy-dep)
224 define o-iterator-doit
225 $(objpfx)%$o: $(objpfx)%.c $(before-compile); $$(compile-command.c)
227 object-suffixes-left := $(all-object-suffixes)
228 include $(o-iterator)
229 $(objpfx)%.d: $(objpfx)%.c $(before-compile); $(+make-deps)
232 # System-dependent makefiles can put in `inhibit-sysdep-asm' wildcard
233 # patterns matching sysdep directories whose assembly source files should
235 ifdef inhibit-sysdep-asm
236 define open-check-inhibit-asm
237 case $$sysdir in $(subst $(empty) ,|,$(inhibit-sysdep-asm))) : ;; *)
239 close-check-inhibit-asm = ;; esac ;
242 -include $(+sysdir_pfx)sysd-rules
243 ifneq ($(sysd-rules-sysdirs),$(config-sysdirs))
244 # The value of $(+sysdep_dirs) the sysd-rules was computed for
245 # differs from the one we are using now. So force a rebuild of sysd-rules.
246 sysd-rules-force = FORCE
249 $(+sysdir_pfx)sysd-rules: $(+sysdir_pfx)config.make $(..)Makerules \
250 $(wildcard $(foreach dir,$(sysdirs),\
254 (echo 'sysd-rules-sysdirs := $(config-sysdirs)'; \
255 for dir in $(config-sysdirs:%='$$(..)%'); do \
256 for o in $(all-object-suffixes); do \
257 $(open-check-inhibit-asm) \
258 echo "\$$(objpfx)%$$o: $$dir/%.S \$$(before-compile); \
259 \$$(compile-command.S)"; \
260 echo "\$$(objpfx)%$$o: $$dir/%.s \$$(before-compile); \
261 \$$(compile-command.s)"; \
262 echo "\$$(objpfx)rtld-%$$o: $$dir/%.S \$$(before-compile); \
263 \$$(compile-command.S)"; \
264 echo "\$$(objpfx)rtld-%$$o: $$dir/%.s \$$(before-compile); \
265 \$$(compile-command.s)"; \
266 $(close-check-inhibit-asm) \
267 echo "\$$(objpfx)%$$o: $$dir/%.c \$$(before-compile); \
268 \$$(compile-command.c)"; \
269 echo "\$$(objpfx)rtld-%$$o: $$dir/%.c \$$(before-compile); \
270 \$$(compile-command.c)"; \
272 $(open-check-inhibit-asm) \
273 echo "\$$(objpfx)%.d: $$dir/%.s \$$(common-objpfx)dummy.d; \
274 \$$(make-dummy-dep)"; \
275 echo "\$$(objpfx)rtld-%.d: $$dir/%.s \$$(common-objpfx)dummy.d; \
276 \$$(make-dummy-dep)"; \
277 echo "\$$(objpfx)%.d: $$dir/%.S \$$(before-compile); \
279 echo "\$$(objpfx)rtld-%.d: $$dir/%.S \$$(before-compile); \
281 $(close-check-inhibit-asm) \
282 echo "\$$(objpfx)%.d: $$dir/%.c \$$(before-compile); \
284 echo "\$$(objpfx)rtld-%.d: $$dir/%.c \$$(before-compile); \
287 echo 'sysd-rules-done = t') > $@T
290 ifndef sysd-rules-done
291 # Don't do deps until this exists, because it provides rules to make the deps.
295 # Generate version maps, but wait until sysdep-subdirs is known
296 ifeq ($(sysd-sorted-done),t)
297 ifeq ($(versioning),yes)
298 -include $(common-objpfx)sysd-versions
299 $(addprefix $(common-objpfx),$(version-maps)): $(common-objpfx)sysd-versions
300 common-generated += $(version-maps)
301 postclean-generated += sysd-versions Versions.all abi-versions.h \
302 Versions.def.v.i Versions.def.v Versions.v.i Versions.v
304 ifndef avoid-generated
305 ifneq ($(sysd-versions-subdirs),$(all-subdirs) $(config-sysdirs))
306 sysd-versions-force = FORCE
309 # See %.v/%.v.i implicit rules in Makeconfig.
310 $(common-objpfx)Versions.def.v.i: $(..)Versions.def \
311 $(wildcard $(add-ons:%=$(..)%/Versions.def))
312 $(common-objpfx)Versions.all: $(..)scripts/firstversions.awk \
313 $(common-objpfx)soversions.i \
314 $(common-objpfx)Versions.def.v
315 { while read lib version setname; do \
316 test -z "$$setname" || echo "$$lib : $$setname"; \
317 done < $(word 2,$^); \
319 } | LC_ALL=C $(AWK) -f $< > $@T
321 # See %.v/%.v.i implicit rules in Makeconfig.
322 $(common-objpfx)Versions.v.i: $(wildcard $(all-subdirs:%=$(..)%/Versions)) \
323 $(wildcard $(sysdirs:%=%/Versions)) \
324 $(common-objpfx)abi-versions.h \
325 $(sysd-versions-force)
326 $(common-objpfx)sysd-versions: $(common-objpfx)Versions.all \
327 $(common-objpfx)Versions.v \
328 $(..)scripts/versions.awk
329 ( echo 'sysd-versions-subdirs = $(all-subdirs) $(config-sysdirs)' ; \
331 | LC_ALL=C $(AWK) -v buildroot=$(common-objpfx) -v defsfile=$< \
332 -v move_if_change='$(move-if-change)' \
336 endif # avoid-generated
337 endif # $(versioning) = yes
338 endif # sysd-sorted-done
341 ifndef compile-command.S
342 compile-command.S = $(compile.S) $(OUTPUT_OPTION)
344 ifndef compile-command.s
345 compile-command.s = $(COMPILE.s) $< $(OUTPUT_OPTION)
347 ifndef compile-command.c
348 compile-command.c = $(compile.c) $(OUTPUT_OPTION)
351 # GCC can grok options after the file name, and it looks nicer that way.
352 compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS)
354 $(CC) $< -c $(CPPFLAGS) -DASSEMBLER $(asm-CPPFLAGS) $(ASFLAGS-$(suffix $@))
356 $(CC) -c $(CPPFLAGS) -DASSEMBLER $(asm-CPPFLAGS) $(ASFLAGS-$(suffix $@))
357 COMPILE.s = $(filter-out -pipe,$(CC)) -c $(ASFLAGS)
359 # If we want to generate MD5 checksums for the sources do this now.
361 generate-md5 = ; rm -f $(@:.d=.md5); \
362 $(CC) -E $< $(CFLAGS) $(CPPFLAGS) $($(<:$*.%=%)-CPPFLAGS) | \
363 sed '/^\#/d;/^[[:space:]]*$$/d' | md5sum > $(@:.d=.md5)
368 # We need this for the output to go in the right place. It will default to
369 # empty if make was configured to work with a cc that can't grok -c and -o
370 # together. You can't compile the C library with such a compiler.
371 OUTPUT_OPTION = -o $@
373 # We need the $(CFLAGS) to be in there to have the right predefines during
374 # the dependency run for C sources. But having it for assembly sources can
375 # get the wrong predefines.
376 S-CPPFLAGS = $(asm-CPPFLAGS)
378 $(make-target-directory)
379 $(+mkdep) $< $(if $(filter %.c,$<),$(CFLAGS)) \
380 $(CPPFLAGS) $($(<:$*.%=%)-CPPFLAGS) | sed \
381 -e 's,$(subst .,\.,$*)\.o,$(foreach o,$(all-object-suffixes),$(@:.d=$o)) $@,' \
382 $(sed-remove-objpfx) > $(@:.d=.T)
383 mv -f $(@:.d=.T) $@ $(generate-md5)
386 # Continuation lines here are dangerous because they introduce spaces!
387 define sed-remove-objpfx
388 -e 's@ $(subst .,\.,$(subst @,\@,$(common-objpfx)))@ $$(common-objpfx)@g' \
389 -e 's@^$(subst .,\.,$(subst @,\@,$(common-objpfx)))@$$(common-objpfx)@g'
393 # Modify the list of routines we build for different targets
395 ifeq (yesyes,$(build-shared)$(elf))
396 ifndef libc.so-version
397 # Undefine this because it can't work when we libc.so is unversioned.
398 static-only-routines =
402 # Bounded pointer thunks are only built for *.ob
403 elide-bp-thunks = $(addprefix $(bppfx),$(bp-thunks))
405 elide-routines.oS += $(filter-out $(static-only-routines),\
406 $(routines) $(aux) $(sysdep_routines)) \
408 elide-routines.os += $(static-only-routines) $(elide-bp-thunks)
410 # If we have versioned code we don't need the old versions in any of the
412 elide-routines.o += $(shared-only-routines) $(elide-bp-thunks)
413 elide-routines.op += $(shared-only-routines) $(elide-bp-thunks)
414 elide-routines.og += $(shared-only-routines) $(elide-bp-thunks)
415 elide-routines.ob += $(shared-only-routines)
417 # Shared library building.
419 ifeq (yes,$(build-shared))
421 # Reference map file only when versioning is selected and a map file name
423 ifeq ($(versioning),yes)
424 map-file = $(firstword $($(@F:.so=-map)) \
425 $(addprefix $(common-objpfx), \
426 $(filter $(@F:.so=.map),$(version-maps))))
427 load-map-file = $(map-file:%=-Wl,--version-script=%)
430 # Pattern rule to build a shared object from an archive of PIC objects.
431 # This must come after the installation rules so Make doesn't try to
432 # build shared libraries in place from the installed *_pic.a files.
433 # $(LDLIBS-%.so) may contain -l switches to generate run-time dependencies
434 # on other shared objects.
435 lib%.so: lib%_pic.a $(+preinit) $(+postinit) $(+interp)
436 ifneq (,$(findstring aix,$(config-os)))
438 dump -g $< | sed '1,6d' | cut -f2 | sort | uniq) > $(<:a=exp)
443 define build-shlib-helper
444 $(LINK.o) -shared $(static-libgcc) -Wl,-O1 $(sysdep-LDFLAGS) $(config-LDFLAGS) \
445 $(extra-B-$(@F:lib%.so=%).so) -B$(csu-objpfx) \
446 $(extra-B-$(@F:lib%.so=%).so) $(load-map-file) \
447 -Wl,-soname=lib$(libprefix)$(@F:lib%.so=%).so$($(@F)-version) \
448 $(LDFLAGS.so) $(LDFLAGS-$(@F:lib%.so=%).so) \
449 -L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link)
452 ifneq (,$(findstring aix,$(config-os)))
453 define build-shlib-helper
454 $(LINK.o) -Wl,-G,-bM:SRE,-bnoentry,-bE:$(<:a=exp) \
455 $(sysdep-LDFLAGS) $(config-LDFLAGS) $(extra-B-$(@F:lib%.so=%).so) \
456 $(extra-B-$(@F:lib%.so=%).so) $(load-map-file) \
457 $(LDFLAGS.so) $(LDFLAGS-$(@F:lib%.so=%).so) \
458 -L$(subst :, -L,$(rpath-link))
465 # binutils only position loadable notes into the first page for binaries,
466 # not for shared objects
468 $(build-shlib-helper) \
469 -o $@.new $(csu-objpfx)abi-note.o -Wl,--verbose \
470 $(LDLIBS-$(@F:lib%.so=%).so) 2>&1 | \
471 sed -e '/^=========/,/^=========/!d;/^=========/d' \
472 -e 's/^.*\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \
473 $(LDSEDCMD-$(@F:lib%.so=%).so) > $@.lds
475 $(build-shlib-helper) -o $@ -T $@.lds \
476 $(csu-objpfx)abi-note.o $(build-shlib-objlist)
480 ifneq (,$(findstring aix,$(config-os)))
482 $(build-shlib-helper) \
484 $(filter-out $(map-file) $(+preinit) $(+postinit),$^) \
485 $(no-whole-archive) $(LDLIBS-$(@F:lib%.so=%).so)
488 $(build-shlib-helper) \
489 $(build-shlib-objlist)
494 ifneq (,$(findstring aix,$(config-os)))
495 define build-module-helper
496 $(LINK.o) -Wl,-G -Wl,-bM:SRE -Wl,-bnoentry -Wl,-bexpall \
497 $(sysdep-LDFLAGS) $(config-LDFLAGS) \
499 $(LDFLAGS.so) $(LDFLAGS-$(@F:%.so=%).so) \
500 -L$(subst :, -L,$(rpath-link)) -Wl,-L=$(rpath-link)
503 define build-module-helper
504 $(LINK.o) -shared $(static-libgcc) $(sysdep-LDFLAGS) $(config-LDFLAGS) \
505 -B$(csu-objpfx) $(load-map-file) \
506 $(LDFLAGS.so) $(LDFLAGS-$(@F:%.so=%).so) \
507 -L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link)
511 # This macro is similar to build-shlib but it does not define a soname
512 # and it does not depend on the destination name to start with `lib'.
514 # binutils only position loadable notes into the first page for binaries,
515 # not for shared objects
517 $(build-module-helper) \
518 -o $@.new $(csu-objpfx)abi-note.o -Wl,--verbose \
519 $(LDLIBS-$(@F:lib%.so=%).so) 2>&1 | \
520 sed -e '/^=========/,/^=========/!d;/^=========/d' \
521 -e 's/^.*\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \
524 $(build-module-helper) -o $@ -T $@.lds \
525 $(csu-objpfx)abi-note.o $(build-module-objlist)
529 ifneq (,$(findstring aix,$(config-os)))
531 $(build-module-helper) \
533 $(filter-out $(map-file) $(+preinit) $(+postinit),$^) \
534 $(no-whole-archive) $(LDLIBS-$(@F:%.so=%).so)
539 $(build-module-helper) \
541 $(build-module-objlist)
546 build-module-helper-objlist = \
547 $(patsubst %_pic.a,$(whole-archive) %_pic.a $(no-whole-archive),\
548 $(filter-out $(map-file) $(+preinit) $(+postinit),$^))
549 whole-archive := -Wl,--whole-archive
551 build-module-objlist = $(build-module-helper-objlist) $(LDLIBS-$(@F:%.so=%).so)
552 build-shlib-objlist = $(build-module-helper-objlist) \
553 $(LDLIBS-$(@F:lib%.so=%).so)
555 # Don't try to use -lc when making libc.so itself.
556 # Also omits crti.o and crtn.o, which we do not want
557 # since we define our own `.init' section specially.
558 LDFLAGS-c.so = -nostdlib -nostartfiles
559 # But we still want to link libc.so against $(gnulib).
560 LDLIBS-c.so += $(gnulib)
561 # Give libc.so an entry point and make it directly runnable itself.
562 LDFLAGS-c.so += -e __libc_main
563 # Force the backward compatibility EH functions to be linked.
564 LDFLAGS-c.so += -u __register_frame
565 # Pre-link the objects of libc_pic.a so that we can locally resolve
566 # COMMON symbols before we link against ld.so. This is because ld.so
567 # contains some of libc_pic.a already, which will prevent the COMMONs
568 # from being allocated in libc.so, which introduces evil dependencies
569 # between libc.so and ld.so, which can make it impossible to upgrade.
571 $(common-objpfx)libc_pic.os: $(common-objpfx)libc_pic.a
572 $(LINK.o) -nostdlib -nostartfiles -r -o $@ \
573 $(LDFLAGS-c_pic.os) -Wl,-d -Wl,--whole-archive $^
574 LDSEDCMD-c.so = -e 's/^.*\*(\.dynbss).*$$/& __start___libc_freeres_ptrs = .; *(__libc_freeres_ptrs) __stop___libc_freeres_ptrs = .;/'
575 # Use our own special initializer and finalizer files for libc.so.
576 $(common-objpfx)libc.so: $(elfobjdir)/soinit.os \
577 $(common-objpfx)libc_pic.os \
578 $(elfobjdir)/sofini.os \
579 $(elfobjdir)/interp.os $(elfobjdir)/ld.so
581 ifeq ($(versioning),yes)
582 $(common-objpfx)libc.so: $(common-objpfx)libc.map
584 common-generated += libc.so libc_pic.os
585 ifdef libc.so-version
586 $(common-objpfx)libc.so$(libc.so-version): $(common-objpfx)libc.so
588 common-generated += libc.so$(libc.so-version)
592 ifneq (,$(findstring aix,$(config-os)))
593 $(common-objpfx)libc.so: $(common-objpfx)libc_pic.a
596 dump -g $^ | sed '1,6d' | cut -f2 | sort | uniq) > $(^:a=exp)
597 sed '/__mulh/d;/__mull/d;/__divss/d;/__divus/d;/__quoss/d;/__quous/d' \
598 /lib/syscalls.exp > $(common-objpfx)syscalls.exp
599 $(LINK.o) -G -bM:SRE -bnoentry -bE:$(^:a=exp) \
600 -bE:$(common-objpfx)syscalls.exp \
601 -bI:$(common-objpfx)syscalls.exp \
602 -L$(common-objpfx) -o $@ $^
603 # AIX runtime ld wants libc.so to be libc.a(shr.o) hardwired
604 cp $@ $(common-objpfx)shr.o
605 $(AR) $(ARFLAGS) $(common-objpfx)libc.a $(common-objpfx)shr.o
609 # Figure out the source filenames in this directory.
611 override sources := $(addsuffix .c,\
612 $(filter-out $(elided-routines),\
615 sysdep_routines := $(sysdep_routines)
617 headers := $(headers) $(sysdep_headers)
619 # This is the list of all object files, gotten by
620 # replacing every ".c" in `sources' with a ".o".
621 # We also add bounded-pointer thunks, which are later
622 # elided for all suffixes except for `.ob'.
623 override objects := $(addprefix $(objpfx),$(sources:.c=.o) \
624 $(patsubst %,$(bppfx)%.o,\
625 $(filter $(routines) $(sysdep_routines),$(bp-thunks))))
628 # The makefile may define $(extra-libs) with `libfoo libbar'
629 # to build libfoo.a et al from the modules listed in $(libfoo-routines).
631 # extra-lib.mk is included once for each extra lib to define rules
632 # to build it, and to add its objects to the various variables.
633 # During its evaluation, $(lib) is set to the name of the library.
634 extra-libs-left := $(extra-libs)
635 include $(patsubst %,$(..)extra-lib.mk,$(extra-libs))
638 +depfiles := $(sources:.c=.d) \
639 $(patsubst %.o,%.d,$(filter %.o,$(extra-objs:.os=.o))) \
640 $(addsuffix .d,$(tests) $(xtests) $(test-srcs))
641 ifeq ($(build-programs),yes)
642 +depfiles += $(addsuffix .d,$(others) $(sysdep-others))
644 +depfiles := $(addprefix $(objpfx),\
645 $(filter-out $(addsuffix .d,$(omit-deps)),\
650 -include $(+depfiles)
654 # Maximize efficiency by minimizing the number of rules.
655 .SUFFIXES: # Clear the suffix list. We don't use suffix rules.
656 # Don't define any builtin rules.
657 MAKEFLAGS := $(MAKEFLAGS)r
659 # Generic rule for making directories.
661 # mkdir isn't smart enough to strip a trailing /.
664 # Make sure that object files are not removed
665 # when they are intermediates between sources and library members.
666 .PRECIOUS: $(addprefix $(objpfx)%,$(all-object-suffixes))
668 # Make sure that the parent library archive is never removed.
669 .PRECIOUS: $(foreach l,$(libtypes),$(patsubst %,$(common-objpfx)$l,c))
671 # Use the verbose option of ar and tar when not running silently.
672 ifeq "$(findstring s,$(MAKEFLAGS))" "" # if not -s
678 ARFLAGS := r$(verbose)
679 CREATE_ARFLAGS := cru$(verbose)
681 # This makes all the object files in the parent library archive.
683 .PHONY: lib lib-noranlib
684 lib: lib-noranlib $(foreach l,$(libtypes),$(patsubst %,$(common-objpfx)$l,c))
685 lib-noranlib: libobjs
687 # For object-suffix $o, the list of objects with that suffix.
688 # Makefiles can define `elide-routines.so = foo' to leave foo.so out.
689 o-objects = $(patsubst %.o,%$o,$(filter-out $(patsubst %,$(objpfx)%.o,\
690 $(elide-routines$o)),\
692 $(addprefix $(objpfx),$(o-objects$o))
694 others: $(addprefix $(objpfx),$(install-lib))
698 # Create the stamp$o files to keep the parent makefile happy.
699 subdir_lib: $(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$o)
700 $(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$o):
701 $(make-target-directory)
705 # Define explicit rules to update each $(objpfx)stamp.SUFFIX
706 # timestamp file; these rules (one explicit rule is generated for each
707 # object suffix) write a list of objects to update in the stamp file.
708 # The parent will then actually add them all to the archive in the
709 # archive rule, below.
710 define o-iterator-doit
711 $(objpfx)stamp$o: $(o-objects); $$(do-stamp)
714 echo '$(patsubst $(objpfx)%,$(addsuffix /,$(subdir))%,$^)' > $@T
717 object-suffixes-left := $(object-suffixes-for-libc)
718 include $(o-iterator)
722 # Now define explicit rules to build the library archives; these depend
723 # on the stamp files built above.
724 define o-iterator-doit
725 $(common-objpfx)$(patsubst %,$(libtype$o),c): \
726 $(subdirs-stamp-o) $(common-objpfx)stamp$o; $$(do-makelib)
729 cd $(common-objdir) && \
730 $(AR) $(CREATE_ARFLAGS) $(@F) `cat $(patsubst $(common-objpfx)%,%,$^)`
733 subdirs-stamps := $(foreach d,$(subdirs),$(common-objpfx)$d/stamp%)
734 subdirs-stamp-o = $(subst %,$o,$(subdirs-stamps))
736 $(subdirs-stamps): subdir_lib;
738 object-suffixes-left = $(object-suffixes-for-libc)
739 include $(o-iterator)
742 # This makes all the object files.
743 .PHONY: objects objs libobjs extra-objs
744 objects objs: libobjs extra-objs
745 libobjs: $(foreach o,$(object-suffixes-for-libc),$(objpfx)stamp$o)
746 extra-objs: $(addprefix $(objpfx),$(extra-objs))
748 # Canned sequence for building an extra library archive.
749 define build-extra-lib
750 $(patsubst %/,cd % &&,$(objpfx)) \
751 $(AR) $(CREATE_ARFLAGS) $(@:$(objpfx)%=%) \
752 $(patsubst $(objpfx)%,%,$^)
758 .PHONY: force-install
761 # $(install-lib) are installed from the object directory into $(libdir);
762 # files in $(install-lib) matching `lib%.a' are ranlib'd after installation
763 # unless they also appear in $(non-lib.a). $(install-data) are installed
764 # as they are into $(datadir). $(headers) are installed as they are in
765 # $(includedir). $(install-bin), $(install-bin-script) and $(install-sbin)
766 # are installed from the object directory into $(bindir), $(bindir) and
767 # $(sbindir), respectively. $(install-others) are absolute path names of
768 # files to install; rules to install them are defined elsewhere.
770 # The simple library name to install libc.a under.
771 # This could be defined by a sysdep Makefile.
777 $(make-target-directory)
778 $(INSTALL_DATA) $< $@
781 # Make the target directory if it doesn't exist, using the `mkinstalldirs'
782 # script that does `mkdir -p' even if `mkdir' doesn't support that flag.
783 define make-target-directory
784 $(addprefix $(..)./scripts/mkinstalldirs ,\
785 $(filter-out $(wildcard $(@D:%/=%)),$(@D:%/=%)))
788 # Any directory (parent or subdir) should install libc.a; this way
789 # "make install" in a subdir is guaranteed to install everything it changes.
790 installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\
791 $(inst_libdir)/$(patsubst %,$(libtype$o),\
792 $(libprefix)$(libc-name)))
793 install: $(installed-libcs)
794 $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force)
795 $(make-target-directory)
796 $(INSTALL_DATA) $(common-objpfx)lib$(*:$(libc-name)%=c%) $@
797 # Running ranlib after installing makes the __.SYMDEF time stamp up to
798 # date, which avoids messages from some linkers.
801 define do-install-program
802 $(make-target-directory)
803 $(INSTALL_PROGRAM) $< $@.new
807 define do-install-script
808 $(make-target-directory)
809 $(INSTALL_SCRIPT) $< $@.new
813 install-lib.so := $(filter %.so,$(install-lib:%_pic.a=%.so))
814 install-lib := $(filter-out %.so %_pic.a,$(install-lib))
816 ifeq (yes,$(build-shared))
817 # Find which .so's have versions.
818 versioned := $(strip $(foreach so,$(install-lib.so),\
819 $(patsubst %,$(so),$($(so)-version))))
821 install-lib.so-versioned := $(filter $(versioned), $(install-lib.so))
822 install-lib.so-unversioned := $(filter-out $(versioned), $(install-lib.so))
824 install-lib-nosubdir: $(install-lib.so-versioned:%=$(inst_libdir)/%) \
825 $(install-lib.so-unversioned:%=$(inst_slibdir)/%)
827 # Install all the unversioned shared libraries.
828 $(install-lib.so-unversioned:%=$(inst_slibdir)/%): $(inst_slibdir)/%.so: \
829 $(objpfx)%.so $(+force)
830 $(do-install-program)
832 ifneq ($(findstring -s,$(LN_S)),)
835 $(SHELL) $(..)scripts/rellns-sh $< $@.new
839 # If we have no symbolic links don't bother with rellns-sh.
847 ifeq (yes,$(build-shared))
848 ifeq (no,$(cross-compiling))
849 symbolic-link-prog := $(common-objpfx)elf/sln
850 symbolic-link-list := $(common-objpfx)elf/symlink.list
851 define make-shlib-link
852 echo $(<F) $@ >> $(symbolic-link-list)
854 else # cross-compiling
855 # We need a definition that can be used by elf/Makefile's install rules.
856 symbolic-link-prog = $(LN_S)
859 ifndef make-shlib-link
860 define make-shlib-link
866 ifdef libc.so-version
867 # For a library specified to be version N, install three files:
868 # libc.so -> libc.so.N (e.g. libc.so.6)
869 # libc.so.6 -> libc-VERSION.so (e.g. libc-1.10.so)
871 $(inst_slibdir)/libc.so$(libc.so-version): $(inst_slibdir)/libc-$(version).so \
874 $(inst_slibdir)/libc-$(version).so: $(common-objpfx)libc.so $(+force)
875 $(do-install-program)
876 install: $(inst_slibdir)/libc.so$(libc.so-version)
879 # What we install as libc.so for programs to link against is in fact a
880 # link script. It contains references for the various libraries we need.
881 # The libc.so object is not complete since some functions are only defined
882 # in libc_nonshared.a.
883 # We need to use absolute paths since otherwise local copies (if they exist)
884 # of the files are taken by the linker.
885 install: $(inst_libdir)/libc.so
886 $(inst_libdir)/libc.so: $(common-objpfx)libc.so$(libc.so-version) \
887 $(inst_libdir)/$(patsubst %,$(libtype.oS),\
888 $(libprefix)$(libc-name)) \
890 (echo '/* GNU ld script';\
891 echo ' Use the shared library, but some functions are only in';\
892 echo ' the static library, so try that secondarily. */';\
893 echo 'GROUP ( $(slibdir)/libc.so$(libc.so-version)' \
894 '$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
902 install: $(inst_slibdir)/libc.so
903 $(inst_slibdir)/libc.so: $(common-objpfx)libc.so $(+force)
904 $(do-install-program)
907 ifneq (,$(versioned))
908 # Produce three sets of rules as above for all the smaller versioned libraries.
910 define o-iterator-doit
911 $(inst_libdir)/$o: $(inst_slibdir)/$o$($o-version) $(+force); $$(make-link)
913 object-suffixes-left := $(versioned)
914 include $(o-iterator)
916 # Make symlinks in the build directory, because the versioned names might
917 # be referenced by a DT_NEEDED in another library.
918 define o-iterator-doit
919 $(objpfx)$o$($o-version): $(objpfx)$o; $$(make-link)
921 object-suffixes-left := $(versioned)
922 include $(o-iterator)
924 generated += $(foreach o,$(versioned),$o$($o-version))
926 ifeq (,$($(subdir)-version))
927 define o-iterator-doit
928 $(inst_slibdir)/$o$($o-version): $(inst_slibdir)/$(o:.so=)-$(version).so \
932 object-suffixes-left := $(versioned)
933 include $(o-iterator)
935 define o-iterator-doit
936 $(inst_slibdir)/$(o:.so=)-$(version).so: $(objpfx)$o $(+force);
937 $$(do-install-program)
939 object-suffixes-left := $(versioned)
940 include $(o-iterator)
942 define o-iterator-doit
943 $(inst_slibdir)/$o$($o-version): \
944 $(inst_slibdir)/$(o:.so=)-$($(subdir)-version).so $(+force);
947 object-suffixes-left := $(versioned)
948 include $(o-iterator)
950 define o-iterator-doit
951 $(inst_slibdir)/$(o:.so=)-$($(subdir)-version).so: $(objpfx)$o $(+force);
952 $$(do-install-program)
954 object-suffixes-left := $(versioned)
955 include $(o-iterator)
960 $(do-install-program)
961 $(patsubst %,ln -s -f $(@F) $(@D)/$(patsubst %$*.so,%,$(<F))$(libprefix)$*.so,\
962 $(filter-out %.so,$@))
965 so-versions := $(sort $(foreach so,$(install-lib.so),.so$($(so)-version)))
966 $(foreach v,$(so-versions),\
967 $(inst_slibdir)/lib$(libprefix)%$v): $(common-objpfx)lib%.so \
970 $(foreach v,$(so-versions),\
971 $(inst_slibdir)/$(libprefix)%$v): $(common-objpfx)%.so $(+force)
976 $(addprefix $(inst_bindir)/,$(install-bin)): \
977 $(inst_bindir)/%: $(objpfx)% $(+force)
978 $(do-install-program)
980 ifdef install-bin-script
981 $(addprefix $(inst_bindir)/,$(install-bin-script)): \
982 $(inst_bindir)/%: $(objpfx)% $(+force)
985 ifdef install-rootsbin
986 $(addprefix $(inst_rootsbindir)/,$(install-rootsbin)): \
987 $(inst_rootsbindir)/%: $(objpfx)% $(+force)
988 $(do-install-program)
991 $(addprefix $(inst_sbindir)/,$(install-sbin)): \
992 $(inst_sbindir)/%: $(objpfx)% $(+force)
993 $(do-install-program)
996 install-lib.a := $(filter lib%.a,$(install-lib))
997 install-lib-non.a := $(filter-out lib%.a,$(install-lib))
998 ifdef install-lib-non.a
999 $(addprefix $(inst_libdir)/$(libprefix),$(install-lib-non.a)): \
1000 $(inst_libdir)/$(libprefix)%: $(objpfx)% $(+force)
1004 $(install-lib.a:lib%.a=$(inst_libdir)/lib$(libprefix)%.a): \
1005 $(inst_libdir)/lib$(libprefix)%.a: $(objpfx)lib%.a $(+force)
1007 $(patsubst %,$(RANLIB) $@,$(filter-out $(non-lib.a),$(<F)))
1011 $(addprefix $(inst_datadir)/,$(install-data)): $(inst_datadir)/%: % $(+force)
1014 headers := $(strip $(headers))
1016 $(addprefix $(inst_includedir)/,$(headers)): $(inst_includedir)/%: % $(+force)
1020 .PHONY: install-bin-nosubdir install-bin-script-nosubdir \
1021 install-rootsbin-nosubdir install-sbin-nosubdir install-lib-nosubdir \
1022 install-data-nosubdir install-headers-nosubdir
1023 install-bin-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin))
1024 install-bin-script-nosubdir: $(addprefix $(inst_bindir)/,$(install-bin-script))
1025 install-rootsbin-nosubdir: \
1026 $(addprefix $(inst_rootsbindir)/,$(install-rootsbin))
1027 install-sbin-nosubdir: $(addprefix $(inst_sbindir)/,$(install-sbin))
1028 install-lib-nosubdir: $(addprefix $(inst_libdir)/,\
1029 $(patsubst lib%.a,lib$(libprefix)%.a,$(install-lib.a)) \
1030 $(addprefix $(libprefix),$(install-lib-non.a)))
1031 install-data-nosubdir: $(addprefix $(inst_datadir)/,$(install-data))
1032 install-headers-nosubdir: $(addprefix $(inst_includedir)/,$(headers))
1033 install-others-nosubdir: $(install-others)
1035 # We need all the `-nosubdir' targets so that `install' in the parent
1036 # doesn't depend on several things which each iterate over the subdirs.
1037 # This rule makes `install-FOO' always use `install-FOO-nosubdir' as a
1038 # subroutine. Then in the parent `install-FOO' also causes subdir makes.
1039 install-%:: install-%-nosubdir ;
1041 .PHONY: install install-no-libc.a-nosubdir
1042 ifeq ($(build-programs),yes)
1043 install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir\
1044 install-bin-nosubdir install-bin-script-nosubdir \
1045 install-lib-nosubdir install-others-nosubdir \
1046 install-rootsbin-nosubdir install-sbin-nosubdir
1048 install-no-libc.a-nosubdir: install-headers-nosubdir install-data-nosubdir\
1049 install-lib-nosubdir install-others-nosubdir
1051 install: install-no-libc.a-nosubdir
1053 # Command to compile $< in $(objdir) using the native libraries.
1054 define native-compile
1055 $(make-target-directory)
1056 $(patsubst %/,cd % &&,$(objpfx)) \
1057 $(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS) \
1058 $(firstword $(filter /%,$< $(shell pwd)/$<)) -o $(@F)
1061 # Command to compile $< in $(common-objdir) using the native libraries.
1062 # We must cd to $(objdir) anyway so that $(..)config.h is valid.
1063 define common-objdir-compile
1064 $(patsubst %/,cd % &&,$(objpfx)) \
1065 $(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS) \
1066 $(firstword $(filter /%,$< $(shell pwd)/$<)) -o $(..)$(@F)
1069 # We always want to use configuration definitions.
1070 # Note that this is only used for commands running in $(objpfx).
1071 ALL_BUILD_CFLAGS = $(BUILD_CFLAGS) -include $(..)config.h
1073 # Support the GNU standard name for this target.
1076 # Special target to run tests which cannot be run unconditionally.
1077 # Maintainers should use this target.
1081 all-nonlib = $(strip $(tests) $(xtests) $(test-srcs) $(test-extras) $(others))
1082 ifneq (,$(all-nonlib))
1083 cpp-srcs-left = $(all-nonlib:=.c)
1085 include $(patsubst %,$(..)cppflags-iterator.mk,$(all-nonlib))
1088 # The include magic above causes those files to use this variable for flags.
1089 CPPFLAGS-nonlib = -DNOT_IN_libc=1
1092 ifeq ($(versioning),yes)
1093 # Generate normalized lists of symbols, versions, and data sizes.
1094 # This is handy for checking against existing library binaries.
1096 %.symlist: $(..)scripts/abilist.awk %.dynsym
1101 $(OBJDUMP) --dynamic-syms $< > $@T
1104 tests: $(patsubst %.so,$(objpfx)%.symlist,$(install-lib.so-versioned))
1105 generated += $(install-lib.so-versioned:.so=.symlist)
1107 ifeq ($(subdir),elf)
1108 tests: $(common-objpfx)libc.symlist
1109 common-generated += libc.symlist
1114 TAGS: $(objpfx)distinfo $(..)MakeTAGS
1115 $(MAKE) $(addprefix -f ,$^) $@
1117 $(..)po/%.pot: $(objpfx)distinfo $(..)MakeTAGS FORCE
1118 $(MAKE) $(addprefix -f ,$(filter-out FORCE,$^)) $@
1122 .PHONY: echo-headers
1127 # Common cleaning targets.
1129 .PHONY: common-mostlyclean common-clean mostlyclean clean do-tests-clean
1131 mostlyclean: common-mostlyclean
1134 -rm -f $(addprefix $(objpfx),$(addsuffix .out,$(tests) $(xtests) \
1136 $(addsuffix -bp.out,$(tests) $(xtests) \
1139 # Remove the object files.
1141 -rm -f $(addprefix $(objpfx),$(tests) $(xtests) $(test-srcs) \
1142 $(others) $(sysdep-others) stubs \
1143 $(addsuffix .o,$(tests) $(xtests) \
1144 $(test-srcs) $(others) \
1146 $(addsuffix -bp,$(tests) $(xtests) \
1148 $(addsuffix .out,$(tests) $(xtests) \
1150 $(addsuffix -bp.out,$(tests) $(xtests) \
1152 -rm -f $(addprefix $(objpfx),$(extra-objs) $(install-lib) \
1154 $(install-lib.so:%.so=%_pic.a))
1156 -rm -f $(objpfx)rtld-*.os
1159 $(foreach o,$(object-suffixes-for-libc),
1160 -rm -f $(objpfx)stamp$o $(o-objects))
1163 # Also remove the dependencies and generated source files.
1164 common-clean: common-mostlyclean
1165 -rm -f $(addprefix $(objpfx),$(generated)) $(+depfiles)
1166 -rm -f $(objpfx)rtld-*.d
1167 -rm -fr $(addprefix $(objpfx),$(generated-dirs))
1168 -rm -f $(addprefix $(common-objpfx),$(common-generated))
1169 -rm -f $(objpfx)distinfo
1171 # Produce a file `stubs' which contains `#define __stub_FUNCTION'
1172 # for each function which is a stub. We grovel over all the .d files
1173 # looking for references to <stub-tag.h>. Then we grovel over each
1174 # referenced source file to see what stub function it defines.
1177 .PHONY: stubs # The parent Makefile calls this target.
1178 stubs: $(objpfx)stubs
1180 s = $(sysdep_dir)/generic
1181 $(objpfx)stubs: $(+depfiles)
1182 # Use /dev/null since `...` might expand to empty.
1183 (s=`cd $s && $(PWD_P)`; \
1184 $(patsubst %/,cd % &&,$(objpfx)) \
1185 sed -n 's/^stub_warning *(\([^)]*\).*$$/#define __stub_\1/p' \
1186 `sed -n -e '\@ $s/[^ ]*\.c@{; s@^.* $s/\([^ ]*\.c\).*$$@'"$$s"'/\1@; h; }' \
1187 -e '/stub-tag\.h/{; g; p; }' \
1188 $(patsubst $(objpfx)%,%,$^) /dev/null` \
1192 # Make the distribution tar file.
1195 dist: $(objpfx)distinfo $(..)Make-dist
1196 $(MAKE) -f $< -f $(word 2,$^) $(Make-dist-args)
1198 # Avoid depending on source files found in sysdeps dirs,
1199 # because the references affect implicit rule selection.
1200 dist: $(filter-out %.c %.S %.s,$(distribute))
1202 # We used to simply export all these variables, but that frequently made the
1203 # environment get too large. Instead, we write all the information into
1204 # a generated makefile fragment `distinfo', and then include it with -f in
1205 # the sub-make that makes the distribution (above).
1206 $(objpfx)distinfo: Makefile $(..)Makerules \
1207 $(wildcard $(foreach dir,$(sysdirs),$(dir)/Makefile))
1208 $(make-target-directory)
1211 .PHONY: subdir_distinfo
1212 subdir_distinfo: $(objpfx)distinfo
1214 define distinfo-vars
1216 echo > $@.new 'subdir := $(subdir)'
1217 $(foreach var,subdir-dirs sources elided-routines sysdep_routines \
1218 headers sysdep_headers distribute dont_distribute generated \
1219 others tests xtests test-srcs extra-libs versioned \
1220 $(extra-libs:%=%-routines) \
1221 $(addprefix install-,lib lib.so data bin bin-script sbin others),
1222 echo >> $@.new '$(subdir)-$(var) := $($(var))'
1223 echo >> $@.new '$(var) = $$($(subdir)-$(var))')
1226 ifneq (,$(strip $(gpl2lgpl)))
1227 ifneq (,$(wildcard $(..)gpl2lgpl.sed))
1228 # Snarf from the master source and frob the copying notice.
1229 $(gpl2lgpl): %: $(..)gpl2lgpl.sed /home/gd/gnu/lib/%
1231 # So I don't edit them by mistake.
1234 ifeq ($(with-cvs),yes)
1235 test ! -d CVS || cvs $(CVSOPTS) commit -m'Updated from $^' $@