-# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
+# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
# Cambridge, MA 02139, USA.
#
-# Propagated rules for making the GNU C library
+# Rules for making a subdirectory in the GNU C library.
+# Each subdirectory Makefile defines some variables and includes this.
#
ifneq (,)
This makefile requires GNU Make.
endif
+all: # Don't let the default goal come from Makeconfig.
+
include ../Makeconfig
ifndef subdir
headers :=
endif
+ifneq "$(findstring env,$(origin generated))" ""
+generated :=
+endif
+
ifeq "$(strip $(headers))" ""
ifneq "$(wildcard $(subdir).h)" ""
override headers := $(subdir).h
$(dir $<)$(notdir $<) > $@
endif # tests
+# Because the link above depends on libc.a, which I don't want built
+# automatically, this is necessary. -mib
+ifdef mib_hacks
+others :=
+endif
+
export others := $(others)
export tests := $(tests)
\f
.PHONY: subdir_echo-distinfo
subdir_echo-distinfo:
@echo $(addprefix +header+,$(headers)) \
- $(addprefix +nodist+,$(generated))
-\f
+ $(addprefix +nodist+,$(generated) $(dont_distribute))
+
+# We want to install everything except the library itself, but update all
+# our portions of the library because the parent make will install it later
+# (likewise the stubs file).
.PHONY: subdir_install
-subdir_install: install
+subdir_install: install-no-libc.a lib-noranlib stubs
.PHONY: subdir_TAGS
subdir_TAGS: TAGS
# Make the distribution tarfile for the parent makefile.
export distribute := $(distribute)
+export dont_distribute := $(dont_distribute)
export generated := $(generated)
.PHONY: subdir_dist dist
subdir_dist: dist
dist: ../Make-dist
$(MAKE) -f $< $(Make-dist-args)
+
+# Convenient target to update all the generated source files.
+.PHONY: generated
+generated: $(generated)