[BZ #1358]
[glibc.git] / Makeconfig
blob92158bef1c131087148111ea075ee30825036383
1 # Makeconfig fragment for glibc ports add-on.
3 # These rules make sure that sysdeps/CPU/preconfigure changes are noticed.
4 # preconfigure fragments can be written by hand, or they can be generated
5 # from preconfigure.in by autoconf like sysdeps/.../configure.in files.
7 # Figure out the name of this add-on.  The ports add-on infrastructure
8 # scripts can be copied into separate add-on packages by any name.
9 ports-sysdeps = $(..)$(Makeconfig-add-on)/sysdeps
11 $(common-objpfx)config.status: $(wildcard $(ports-sysdeps)/*/preconfigure)
13 ifneq ($(AUTOCONF),no)
15 ifeq ($(with-cvs),yes)
16 define autoconf-it-cvs
17 test ! -d CVS || cvs $(CVSOPTS) commit -m'Regenerated: autoconf $(ACFLAGS) $<' $@
18 endef
19 else
20 autoconf-it-cvs =
21 endif
23 define autoconf-it
24 @-rm -f $@.new
25 $(AUTOCONF) $(ACFLAGS) $< > $@.new
26 chmod a-w,a+x $@.new
27 mv -f $@.new $@
28 $(autoconf-it-cvs)
29 endef
31 $(..)ports/sysdeps/%/preconfigure: $(..)ports/sysdeps/%/preconfigure.in \
32                                    aclocal.m4
33         $(autoconf-it)
35 endif # $(AUTOCONF) = no
37 # This allows e.g. `make ports/dist' from a build directory.
38 ifndef subdir
39 ports/%:
40         $(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
41 endif