Skip to content

Commit

Permalink
Shorten compile commands run by the build system
Browse files Browse the repository at this point in the history
The DEFS line in MCONFIG had gotten so long that it exceeded 4k, and
this was starting to cause some tools heartburn.  It also made "make
V=1" almost useless, since trying to following the individual commands
run by make was lost in the noise of all of the defines.

So fix this by putting the configure-generated defines in lib/config.h
and the directory pathnames to lib/dirpaths.h.

In addition, clean up some vestigal defines in configure.in and in the
Makefiles to further shorten the cc command lines.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
tytso committed Sep 18, 2011
1 parent 30295f1 commit d1154eb
Show file tree
Hide file tree
Showing 268 changed files with 2,048 additions and 869 deletions.
23 changes: 12 additions & 11 deletions MCONFIG.in
Expand Up @@ -48,12 +48,9 @@ datadir = @datadir@

CC = @CC@
BUILD_CC = @BUILD_CC@
DEFS = -DLOCALEDIR=\"$(localedir)\" -DROOT_SYSCONFDIR=\"$(root_sysconfdir)\" @DEFS@
CFLAGS = @CFLAGS@
CPPFLAGS = -I$(top_builddir)/lib -I$(top_srcdir)/lib @CPPFLAGS@
INTL_FLAGS = @INTL_FLAGS@
ALL_CFLAGS = $(CPPFLAGS) $(DEFS) $(USE_WFLAGS) $(CFLAGS) $(XTRA_CFLAGS) \
$(INTL_FLAGS) $(LINUX_INCLUDE)
CPPFLAGS = @INCLUDES@
ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS)
LDFLAGS = @LDFLAGS@
ALL_LDFLAGS = $(LDFLAGS) @LDFLAG_DYNAMIC@
LDFLAGS_STATIC = $(LDFLAGS) @LDFLAG_STATIC@
Expand Down Expand Up @@ -127,10 +124,6 @@ DEPPROFILED_LIBUUID = @PROFILED_LIBUUID@
DEPPROFILED_LIBQUOTA = @PROFILED_LIBQUOTA@
DEPPROFILED_LIBBLKID = @PROFILED_LIBBLKID@ $(DEPPROFILED_LIBUUID)

# An include directive pointing to a directory holding enough linux-like
# include files to satisfy some programs here
LINUX_INCLUDE=@LINUX_INCLUDE@

#
# A fast substitution command for fixing up man pages, shell scripts, etc.
#
Expand Down Expand Up @@ -159,7 +152,7 @@ WFLAGS= -std=c99 -D_XOPEN_SOURCE=600 -D_GNU_SOURCE \
-UENABLE_NLS

gcc-wall-new:
(make USE_WFLAGS="$(WFLAGS)" > /dev/null) 2>&1 | sed -f $(top_srcdir)/util/gcc-wall-cleanup
(make CFLAGS="@CFLAGS@ $(WFLAGS)" > /dev/null) 2>&1 | sed -f $(top_srcdir)/util/gcc-wall-cleanup

gcc-wall:
make clean > /dev/null
Expand Down Expand Up @@ -197,6 +190,14 @@ $(top_builddir)/config.status: $(top_srcdir)/configure
$(top_builddir)/MCONFIG: $(top_srcdir)/MCONFIG.in $(top_builddir)/config.status
cd $(top_builddir); CONFIG_FILES=MCONFIG ./config.status

$(top_builddir)/lib/config.h: $(top_srcdir)/lib/config.h.in \
$(top_builddir)/config.status
cd $(top_builddir); CONFIG_FILES=lib/config.h ./config.status

$(top_builddir)/lib/dirpaths.h: $(DEP_SUBSTITUTE) $(top_srcdir)/lib/dirpaths.h.in
$(E) " SUBST $@"
$(Q) $(SUBSTITUTE) $(top_srcdir)/lib/dirpaths.h.in $@

$(top_builddir)/lib/substitute_sh: $(top_srcdir)/lib/substitute_sh.in \
$(top_builddir)/config.status
cd $(top_builddir); CONFIG_FILES=lib/substitute_sh ./config.status
Expand All @@ -210,7 +211,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/MCONFIG \
cd $(top_builddir); CONFIG_FILES=$(my_dir)/Makefile ./config.status

@MAINTAINER_CMT@$(top_srcdir)/configure: $(top_srcdir)/configure.in
@MAINTAINER_CMT@ cd $(top_srcdir) && autoconf
@MAINTAINER_CMT@ cd $(top_srcdir) && autoheader && autoconf

#
# Make depend magic...
Expand Down
3 changes: 2 additions & 1 deletion Makefile.in
Expand Up @@ -19,7 +19,8 @@ LIB_SUBDIRS=lib/et lib/ss lib/e2p $(UUID_LIB_SUBDIR) lib/ext2fs $(BLKID_LIB_SUBD
PROG_SUBDIRS=e2fsck $(DEBUGFS_DIR) misc $(RESIZE_DIR) tests/progs po
SUBDIRS=util $(LIB_SUBDIRS) $(PROG_SUBDIRS) tests

SUBS= lib/ext2fs/ext2_types.h lib/blkid/blkid_types.h lib/uuid/uuid_types.h
SUBS= util/subst.conf lib/config.h lib/dirpaths.h \
lib/ext2fs/ext2_types.h lib/blkid/blkid_types.h lib/uuid/uuid_types.h

TAR=tar

Expand Down

0 comments on commit d1154eb

Please sign in to comment.