Skip to content

Commit

Permalink
Shorten build commands
Browse files Browse the repository at this point in the history
This patch scratches an itch.  Each individual gcc command in the
glibc build is over 1K, which means it takes up a good chunk of my
terminal.  Most of that is include paths.  Any version of GCC new
enough to build glibc supports response files, which were added in
2005.  So use a response file for the static list of include paths.
Now the build commands are a lot shorter, and easier to use when
developing glibc.
  • Loading branch information
Daniel Jacobowitz authored and Ulrich Drepper committed Apr 8, 2010
1 parent a7b420e commit 59d9f1d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2010-03-30 Daniel Jacobowitz <dan@codesourcery.com>

* Makeconfig (+common-includes): Define.
(+includes): Use @$(common-objpfx)includes.
* Makefile (postclean): Remove includes and includes.mk.
* Makerules ($(common-objpfx)includes.mk): Include and create
includes.mk. Create includes.

2010-04-07 Andreas Schwab <schwab@redhat.com>

* sysdeps/unix/sysv/linux/i386/fallocate.c: Set errno on error.
Expand Down
5 changes: 3 additions & 2 deletions Makeconfig
Original file line number Diff line number Diff line change
Expand Up @@ -670,9 +670,10 @@ endif # $(+cflags) == ""
# library source directory, in the include directory, and in the
# current directory.
+sysdep-includes = $(addprefix -I,$(+sysdep_dirs))
+common-includes = $(+sysdep-includes) $(includes) $(sysincludes)
+includes = -I$(..)include $(if $(subdir),$(objpfx:%/=-I%)) \
$(+sysdep-includes) $(includes) \
$(patsubst %/,-I%,$(..)) $(libio-include) -I. $(sysincludes)
@$(common-objpfx)includes \
$(patsubst %/,-I%,$(..)) $(libio-include) -I.

# Since libio has several internal header files, we use a -I instead
# of many little headers in the include directory.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ parent-mostlyclean: common-mostlyclean # common-mostlyclean is in Makerules.
parent-clean: parent-mostlyclean common-clean

postclean = $(addprefix $(common-objpfx),$(postclean-generated)) \
$(addprefix $(objpfx),sysd-dirs sysd-rules) \
$(addprefix $(objpfx),sysd-dirs sysd-rules includes includes.mk) \
$(addprefix $(objpfx),sysd-sorted soversions.mk soversions.i)

clean: parent-clean
Expand Down
14 changes: 14 additions & 0 deletions Makerules
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,20 @@ ifndef sysd-rules-done
no_deps=t
endif

-include $(common-objpfx)includes.mk
ifneq ($(+common-includes),$(saved-includes))
# Recreate includes.mk (and includes).
includes-force = FORCE
FORCE:
endif
$(common-objpfx)includes.mk: $(includes-force)
-@rm -f $@T $(common-objpfx)includesT
for inc in $(+common-includes); do echo "$$inc"; done \
> $(common-objpfx)includesT
mv -f $(common-objpfx)includesT $(common-objpfx)includes
echo 'saved-includes := $(+common-includes)' > $@T
mv -f $@T $@

define o-iterator-doit
$(objpfx)%$o: %.S $(before-compile); $$(compile-command.S)
endef
Expand Down

0 comments on commit 59d9f1d

Please sign in to comment.