diff options
author | Olivier Hainque <hainque@adacore.com> | 2012-05-16 13:37:14 +0000 |
---|---|---|
committer | Olivier Hainque <hainque@gcc.gnu.org> | 2012-05-16 13:37:14 +0000 |
commit | 8294b6fe4d3311b335dfddc90eeeee2ebd1ddb12 (patch) | |
tree | be711dac68bf3af2ce970b6947498365e1f8376a /gcc | |
parent | 6b18b1a37a763b2830f1448e5a17cd3225f78eb3 (diff) | |
download | gcc-8294b6fe4d3311b335dfddc90eeeee2ebd1ddb12.zip gcc-8294b6fe4d3311b335dfddc90eeeee2ebd1ddb12.tar.gz gcc-8294b6fe4d3311b335dfddc90eeeee2ebd1ddb12.tar.bz2 |
Makefile.tpl (gcc-no-fixedincludes): Rename into ...
toplevel/
* Makefile.tpl (gcc-no-fixedincludes): Rename into ...
(gcc-install-no-fixedincludes): Now forwarder to local target in gcc/
(install-no-fixedincludes): Adjust accordingly.
* Makefile.in: Regenerate.
gcc/
* Makefile.in (install-no-fixedincludes): New target, former toplevel
gcc-no-fixedincludes. Stash "include-fixed" in addition to "include".
Add comments and improve stamp preservation across the whole sequence.
(stmp-int-hdrs): Use move-if-change + cp -p to setup fix_dir/limits.h.
From-SVN: r187594
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/Makefile.in | 46 |
2 files changed, 52 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 239992b..546ec91 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2012-05-16 Olivier Hainque <hainque@adacore.com> + + * Makefile.in (install-no-fixedincludes): New target, former toplevel + gcc-no-fixedincludes. Stash "include-fixed" in addition to "include". + Add comments and improve stamp preservation across the whole sequence. + (stmp-int-hdrs): Use move-if-change + cp -p to setup fix_dir/limits.h. + 2012-05-16 Richard Guenther <rguenther@suse.de> * tree-inline.c (insert_init_stmt): Do not call diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 944436c..4853eb9 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -4053,10 +4053,16 @@ gcov-dump$(exeext): $(GCOV_DUMP_OBJS) $(LIBDEPS) # Build the include directories. stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) fixinc_list # Copy in the headers provided with gcc. +# # The sed command gets just the last file name component; # this is necessary because VPATH could add a dirname. # Using basename would be simpler, but some systems don't have it. +# # The touch command is here to workaround an AIX/Linux NFS bug. +# +# The move-if-change + cp -p twists for limits.h are intended to preserve +# the time stamp when we regenerate, to prevent pointless rebuilds during +# e.g. install-no-fixedincludes. -if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi -if [ -d include-fixed ] ; then true; else mkdir include-fixed; chmod a+rx include-fixed; fi for file in .. $(USER_H); do \ @@ -4105,8 +4111,10 @@ stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) fixinc_list fi; \ $(mkinstalldirs) $${fix_dir}; \ chmod a+rx $${fix_dir} || true; \ + $(SHELL) $(srcdir)/../move-if-change \ + tmp-xlimits.h tmp-limits.h; \ rm -f $${fix_dir}/limits.h; \ - mv tmp-xlimits.h $${fix_dir}/limits.h; \ + cp -p tmp-limits.h $${fix_dir}/limits.h; \ chmod a+r $${fix_dir}/limits.h; \ done # Install the README @@ -4208,6 +4216,42 @@ stmp-fixinc: gsyslimits.h macro_list fixinc_list \ fi $(STAMP) stmp-fixinc # + +# Install with the gcc headers files, not the fixed include files, which we +# are typically not allowed to distribute. The general idea is to: +# - Get to "install" with a bare set of internal headers, not the +# fixed system ones, +# - Prevent rebuilds of what normally depends on the headers, which is +# useless for installation purposes and would rely on improper headers. +# - Restore as much of the original state as possible. + +.PHONY: install-no-fixedincludes + +install-no-fixedincludes: + # Stash the current set of headers away, save stamps we're going to + # alter explicitly, and arrange for fixincludes not to run next time + # we trigger a headers rebuild. + -rm -rf tmp-include + -mv include tmp-include 2>/dev/null + -mv include-fixed tmp-include-fixed 2>/dev/null + -mv stmp-int-hdrs tmp-stmp-int-hdrs 2>/dev/null + -mv stmp-fixinc tmp-stmp-fixinc 2>/dev/null + -mkdir include + -cp -p $(srcdir)/gsyslimits.h include/syslimits.h + -touch stmp-fixinc + + # Rebuild our internal headers, restore the original stamps so that + # "install" doesn't trigger pointless rebuilds because of that update, + # then do install + $(MAKE) $(FLAGS_TO_PASS) stmp-int-hdrs + -mv tmp-stmp-int-hdrs stmp-int-hdrs 2>/dev/null + -mv tmp-stmp-fixinc stmp-fixinc 2>/dev/null + $(MAKE) $(FLAGS_TO_PASS) install + + # Restore the original set of maybe-fixed headers + -rm -rf include; mv tmp-include include 2>/dev/null + -rm -rf include-fixed; mv tmp-include-fixed include-fixed 2>/dev/null + # Remake the info files. doc: $(BUILD_INFO) $(GENERATED_MANPAGES) |