aboutsummaryrefslogtreecommitdiff
path: root/Makeconfig
blob: 92158bef1c131087148111ea075ee30825036383 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# Makeconfig fragment for glibc ports add-on.

# These rules make sure that sysdeps/CPU/preconfigure changes are noticed.
# preconfigure fragments can be written by hand, or they can be generated
# from preconfigure.in by autoconf like sysdeps/.../configure.in files.

# Figure out the name of this add-on.  The ports add-on infrastructure
# scripts can be copied into separate add-on packages by any name.
ports-sysdeps = $(..)$(Makeconfig-add-on)/sysdeps

$(common-objpfx)config.status: $(wildcard $(ports-sysdeps)/*/preconfigure)

ifneq ($(AUTOCONF),no)

ifeq ($(with-cvs),yes)
define autoconf-it-cvs
test ! -d CVS || cvs $(CVSOPTS) commit -m'Regenerated: autoconf $(ACFLAGS) $<' $@
endef
else
autoconf-it-cvs =
endif

define autoconf-it
@-rm -f $@.new
$(AUTOCONF) $(ACFLAGS) $< > $@.new
chmod a-w,a+x $@.new
mv -f $@.new $@
$(autoconf-it-cvs)
endef

$(..)ports/sysdeps/%/preconfigure: $(..)ports/sysdeps/%/preconfigure.in \
				   aclocal.m4
	$(autoconf-it)

endif # $(AUTOCONF) = no

# This allows e.g. `make ports/dist' from a build directory.
ifndef subdir
ports/%:
	$(MAKE) $(PARALLELMFLAGS) -C $(@D) $(@F)
endif