[apparmor] [PATCH v2 3/5] Makefile: Convert shell variables into reusable make variables

Steve Beattie steve at nxnw.org
Tue Jan 26 22:51:43 UTC 2016


On Tue, Jan 26, 2016 at 01:58:47PM -0800, Steve Beattie wrote:
> On Wed, Jan 06, 2016 at 08:44:45PM -0600, Tyler Hicks wrote:
> > Turn REPO_VERSION and SNAPSHOT_DIR into target-specific make variables
> > that may be reused by future targets similar to the snapshot target.
> > 
> > The new REPO_VERSION make variable is turned into a "simply expanded"
> > variable as to not require a callout to bzr each time it is expanded.
> > 
> > The SNAPSHOT_DIR shell variabel is renamed to SNAPSHOT_NAME as a make
> > variable. The new name may be slightly more descriptive in the future as
> > the variable will be reused in other ways besides a simple directory
> > name.
> > 
> > Signed-off-by: Tyler Hicks <tyhicks at canonical.com>
> Acked-by: Steve Beattie <steve at nxnw.org>

Actually, I take this Ack back. I think with the rework, this ends up
causing the bzr version-info command to get executed more than once,
and for irrelevant targets; e.g. 'make clean' or 'make version'. That's
okay for an unbound bzr branch, but for bound branches (i.e. branches
grabbed via 'bzr checkout' rather than 'bzr branch'), that induces
a round trip to launchpad to grab that info.

  $ bzr info .
  Checkout (format: 2a)
  Location:
         checkout root: .
    checkout of branch: bzr+ssh://bazaar.launchpad.net/+branch/apparmor/

  Related branches:
      push branch: bzr+ssh://bazaar.launchpad.net/+branch/apparmor/
    parent branch: bzr+ssh://bazaar.launchpad.net/+branch/apparmor/
    submit branch: /home/steve/bzr/apparmor-lp-translations
  $ time make version
  2.10.90

  real    0m0.018s
  user    0m0.000s
  sys     0m0.000s
  $ quilt push
  Applying patch patches/tyhicks-03-coverity_make.patch
  patching file Makefile

  Now at patch patches/tyhicks-03-coverity_make.patch
  $ time make version
  2.10.90

  real    0m7.634s
  user    0m0.132s
  sys     0m0.016s

I'll try to dig into how to make this not happen.

-- 
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20160126/1bceab87/attachment.pgp>


More information about the AppArmor mailing list