<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git/common.mk, branch v2.3.1</title>
<subtitle>A mirror of http://git.infradead.org/mtd-utils.git</subtitle>
<id>https://git.infraroot.at/mtd-utils.git/atom?h=v2.3.1</id>
<link rel='self' href='https://git.infraroot.at/mtd-utils.git/atom?h=v2.3.1'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/'/>
<updated>2016-11-17T10:36:55+00:00</updated>
<entry>
<title>Integrate tests into autotools build system</title>
<updated>2016-11-17T10:36:55+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2016-07-13T14:10:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=8a00021b2ab5529640e5acaca30a27cdaca04178'/>
<id>urn:sha1:8a00021b2ab5529640e5acaca30a27cdaca04178</id>
<content type='text'>
Add automake files for the test binaries. If configured to do so,
install the test binaries to libexec/mtd-utils and use autoconf to
fix the paths in the test scripts.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>don't include system headers in dependency files</title>
<updated>2015-08-31T21:42:37+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2015-08-28T16:05:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=b5ac34c5cc3c345e51ff12eca0fafd2ca1add3a0'/>
<id>urn:sha1:b5ac34c5cc3c345e51ff12eca0fafd2ca1add3a0</id>
<content type='text'>
System library headers are not strictly part of our build. If they are
changing beneath our feet, then we probably have bigger problems.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Suggested-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
</entry>
<entry>
<title>autogenerated dependency files are not being utilized properly</title>
<updated>2015-08-28T16:02:41+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2015-08-27T22:48:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=a2f50d4a0a253e9cb6eaaf0e0e1c67dd02b717ac'/>
<id>urn:sha1:a2f50d4a0a253e9cb6eaaf0e0e1c67dd02b717ac</id>
<content type='text'>
TL;DR
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;

=====

Auto-generated dependency rules are not being written correctly, so
changes to dependent files (e.g., headers) do not actually trigger
rebuilds.

The problem
===========

It appears that when a dependency generation flag is passed directly to
the preprocessor (with '-Wp,...'), it loses information about the output
path. So, it just makes up the output name as $(basename).o, with no
path information. This yields .*.c.dep files that look like this:

  flash_lock.o: flash_lock.c /usr/include/stdc-predef.h flash_unlock.c \
   (...)

and

  nanddump.o: nanddump.c /usr/include/stdc-predef.h /usr/include/ctype.h \
   (...)
   include/libmtd.h

This is the case for both in-tree *and* out-of-tree builds. Naturally,
this is a problem for out-of-tree builds. But it is also a problem for
in-tree builds, because we use rules like this for builds:

  $(BUILDDIR)/%.o: %.c

and make doesn't recognize $(BUILDDIR)/%.o as the same as %.o even when
$(BUILDDIR) == $(PWD).

Example failures
================

  ## Rebuilding after touching common header doesn't recompile anything
  $ make
  (...)
  $ touch include/libmtd.h
  $ make
    CHK     include/version.h

  ## Same for out-of-tree builds
  $ BUILDDIR=test make
  (...)
  $ touch include/libmtd.h
  $ BUILDDIR=test make
    CHK     include/version.h

I noticed this when seeing that flash_lock would not get rebuilt when
modifying flash_unlock.c (where 99% of the source code lies):

  $ make
  (...)
  $ touch flash_unlock.c
  $ make
    CHK     include/version.h
    CC      flash_unlock.o
    LD      flash_unlock

The fix
=======

Just pass -MD straight to the compiler, and make sure to specify the
output file for the dependency info with -MF.

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Cc: Mike Frysinger &lt;vapier@gentoo.org&gt;
Cc: David Woodhouse &lt;David.Woodhouse@intel.com&gt;
Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
</content>
</entry>
<entry>
<title>autogenerate version.h from build system</title>
<updated>2011-06-27T06:07:33+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2011-06-25T17:20:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=fdb28b9abed0f1a573168dba565f2d57e322158f'/>
<id>urn:sha1:fdb28b9abed0f1a573168dba565f2d57e322158f</id>
<content type='text'>
Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
</content>
</entry>
<entry>
<title>rewrite build system to avoid recursion</title>
<updated>2011-06-27T06:07:07+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2011-06-25T17:20:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=3285a49dd871d54c1ec13076173ad617443baae1'/>
<id>urn:sha1:3285a49dd871d54c1ec13076173ad617443baae1</id>
<content type='text'>
The ubi-utils/src/ subdir is tossed as it just complicates things for no
real gain.  The dictionary.h header is relocated to the ubi-utils/include/
since other headers in there need it.

The top level clean is replaced with a `find -delete` on objects, so it
might prune more than necessary, but many projects now do this sort of
thing and no one complained there.

A "mkdep" helper generates the actual rule, and the variables are used
with "foreach" to expand these automatically.

The tests subdir is updated only to reflect the ubi-utils source move.
Otherwise, it is left untouched as making that non-recursive isn't really
worth the effort.

While we're gutting things, also through in kbuild style output while
building to make things more legible.

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Artem Bityutskiy &lt;dedekind1@gmail.com&gt;
</content>
</entry>
<entry>
<title>Fix make install errors</title>
<updated>2010-10-27T18:27:31+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier.adi@gmail.com</email>
</author>
<published>2010-10-27T18:27:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=4854c615740a6e73eb4c0fbe4245ddd4a3b40a9c'/>
<id>urn:sha1:4854c615740a6e73eb4c0fbe4245ddd4a3b40a9c</id>
<content type='text'>
This patch heals 'make install' which tried to install the utilities
to '/usr/local//usr/sbin'.

Reported-by: Charles Manning &lt;manningc2@actrix.gen.nz&gt;
Signed-off-by: Mike Frysinger &lt;vapier.adi@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>mtd-utils: enable garbage collection of unused function/data sections</title>
<updated>2010-10-01T06:29:14+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@gentoo.org</email>
</author>
<published>2010-10-01T05:37:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=b1270a3331f68948b33581623dfdcadbf72a046b'/>
<id>urn:sha1:b1270a3331f68948b33581623dfdcadbf72a046b</id>
<content type='text'>
On my default build, this cumulatively shaves off ~100KiB of unused
code and data from the mtd-utils programs.

Signed-off-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>mtd-utils: Use $(CURDIR) in place of $(PWD)</title>
<updated>2010-09-28T06:47:14+00:00</updated>
<author>
<name>Kevin Cernekee</name>
<email>cernekee@gmail.com</email>
</author>
<published>2010-09-28T00:22:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=351ac23f8d468b2b9bc60dfcbaacbe3d55ec11f9'/>
<id>urn:sha1:351ac23f8d468b2b9bc60dfcbaacbe3d55ec11f9</id>
<content type='text'>
$(PWD) comes from the shell and may cause unexpected side effects when
using "make -C".

$(CURDIR) is defined internally by GNU make.

Signed-off-by: Kevin Cernekee &lt;cernekee@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>mtd-utils: move libmtd source files to lib/ subdirectory</title>
<updated>2010-07-13T10:33:20+00:00</updated>
<author>
<name>Kevin Cernekee</name>
<email>cernekee@gmail.com</email>
</author>
<published>2010-07-08T00:30:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=8f627247f651e80834d7b0441328151be180b335'/>
<id>urn:sha1:8f627247f651e80834d7b0441328151be180b335</id>
<content type='text'>
Source files for libmtd, crc32, and fec are scattered throughout the
tree.  Move them to a central location so they can be built into a
common "libmtd.a" library used by all mtd-utils programs.

This patch only renames/deletes files and does not change the content.

Also modify the build system and source code so that libmtd.a can be built
from a "common" location (lib/).  Statically link all utilities at the top
level with libmtd.a . Minor changes to mkfs.ubifs to allow using the common
crc32 implementation.

Signed-off-by: Kevin Cernekee &lt;cernekee@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>build: add option to not force largefile support</title>
<updated>2010-02-15T13:41:42+00:00</updated>
<author>
<name>Peter Korsgaard</name>
<email>jacmet@sunsite.dk</email>
</author>
<published>2010-02-03T09:18:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=acabf7fcea06b7a2926837523561861ed14cab31'/>
<id>urn:sha1:acabf7fcea06b7a2926837523561861ed14cab31</id>
<content type='text'>
Not all systems have largefile support (E.G. uClibc depending on config),
so unconditionally enforcing largefile breaks the build.

Work around it by adding a WITHOUT_LARGEFILE flag, similar to the existing
WITHOUT_XATTR.

Signed-off-by: Peter Korsgaard &lt;jacmet@sunsite.dk&gt;
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
</feed>
