summaryrefslogtreecommitdiff
path: root/gcc/config/avr/t-avr
diff options
context:
space:
mode:
authorgjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4>2013-01-07 12:45:13 +0000
committergjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4>2013-01-07 12:45:13 +0000
commit8d0c391e4ec04bf5d4768228c38e284f2a00dccf (patch)
tree9da3d73b0897c7ce9c12ceb521f089a7452a6c77 /gcc/config/avr/t-avr
parente655d10efc1b2bb406286818241879c15d4a43c1 (diff)
downloadgcc-8d0c391e4ec04bf5d4768228c38e284f2a00dccf.tar.gz
PR55243
* config/avr/t-avr: Don't automatically rebuild $(srcdir)/config/avr/t-multilib $(srcdir)/config/avr/avr-tables.opt $(srcdir)/doc/avr-mmcu.texi (avr-mcus): New phony target to build them on request. (s-avr-mlib, s-avr-mmcu-texi): Remove. * avr/avr-mcus.def: Adjust comments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194968 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/avr/t-avr')
-rw-r--r--gcc/config/avr/t-avr46
1 files changed, 17 insertions, 29 deletions
diff --git a/gcc/config/avr/t-avr b/gcc/config/avr/t-avr
index c7fffd7abe8..3d3b817ffdb 100644
--- a/gcc/config/avr/t-avr
+++ b/gcc/config/avr/t-avr
@@ -40,48 +40,36 @@ avr.o avr-c.o: $(srcdir)/config/avr/builtins.def
AVR_MCUS = $(srcdir)/config/avr/avr-mcus.def
+# Run `avr-mcus' after you changed or added devices in avr-mcus.def
+
+.PHONY: avr-mcus
+
+avr-mcus: $(srcdir)/config/avr/t-multilib \
+ $(srcdir)/config/avr/avr-tables.opt \
+ $(srcdir)/doc/avr-mmcu.texi ; @true
+
+# Make sure that -mmcu= is supported for devices from avr-mcus.def and
+# is displaed all -mmcu= values are displayed on the help screen
$(srcdir)/config/avr/avr-tables.opt: $(srcdir)/config/avr/genopt.sh $(AVR_MCUS)
$(SHELL) $< $(AVR_MCUS) > $@
+# Make sure that -mmcu= support is in sync with -mmcu= documentation.
gen-avr-mmcu-texi$(build_exeext): $(srcdir)/config/avr/gen-avr-mmcu-texi.c \
$(AVR_MCUS) $(srcdir)/config/avr/avr-devices.c \
$(srcdir)/config/avr/avr-arch.h
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $< -o $@
-# Make sure that the -mmcu= documentation is in sync with the compiler.
-$(srcdir)/doc/avr-mmcu.texi: s-avr-mmcu-texi; @true
-
-# invoke.texi @includes avr-mmcu.texi. Put this dependency here instead
-# of in the global Makefile so that developers of other backends are not
-# bothered with AVR stuff.
-$(srcdir)/doc/invoke.texi: $(srcdir)/doc/avr-mmcu.texi
-
-# Ensure that device support is in sync with -mmcu= documentation.
-s-avr-mmcu-texi: gen-avr-mmcu-texi$(build_exeext)
- $(RUN_GEN) ./$< > tmp-avr-mmcu.texi
- $(SHELL) $(srcdir)/../move-if-change tmp-avr-mmcu.texi avr-mmcu.texi
- @if cmp -s $(srcdir)/doc/avr-mmcu.texi avr-mmcu.texi; then \
- $(STAMP) $@; \
- else \
- echo >&2 ; \
- echo "***" >&2 ; \
- echo "*** Verify that you have permission to grant a" >&2 ; \
- echo "*** GFDL license for all new text in" >&2 ; \
- echo "*** avr-mmcu.texi, then copy it to $(srcdir)/doc/avr-mmcu.texi" >&2 ; \
- echo "***" >&2 ; \
- false; \
- fi
+$(srcdir)/doc/avr-mmcu.texi: gen-avr-mmcu-texi$(build_exeext)
+ $(RUN_GEN) ./$< > $@
+# Map -mmcu= to the right multilib variant
# MULTILIB_OPTIONS
# MULTILIB_DIRNAMES
# MULTILIB_EXCEPTIONS
# MULTILIB_MATCHES
-$(srcdir)/config/avr/t-multilib: s-avr-mlib; @true
s-mlib: $(srcdir)/config/avr/t-multilib
-s-avr-mlib: $(srcdir)/config/avr/genmultilib.awk $(AVR_MCUS)
- $(AWK) -f $< -v FORMAT=Makefile $< $(AVR_MCUS) > tmp-avr-mlib
- $(SHELL) $(srcdir)/../move-if-change \
- tmp-avr-mlib $(srcdir)/config/avr/t-multilib
- $(STAMP) $@
+$(srcdir)/config/avr/t-multilib: $(srcdir)/config/avr/genmultilib.awk \
+ $(AVR_MCUS)
+ $(AWK) -f $< -v FORMAT=Makefile $< $(AVR_MCUS) > $@