Skip to contentSkip to conversation

install is no longer PHONY?

DISCUSSION Michael Ellerman 2 participants 3 messages Feb 10, 2020 – Feb 17, 2020 Kbuild

lore
Share & tools
lore
#0 lore raw

Hi Masahiro,

I noticed that "install" seems to be no longer PHONY, or at least if I have a file/directory called install then the build doesn't run.

eg:

  $ touch install
  $ make install
  make: 'install' is up to date.
  $ rm install
  $ make install
    LDS     arch/powerpc/boot/zImage.lds
    WRAP    arch/powerpc/boot/zImage.pseries
    WRAP    arch/powerpc/boot/zImage.epapr

In the past the presence of an install file/directory didn't have any affect.

It seems this changed in:
d79424137a73 ("kbuild: do not update config when running install targets")

Was that expected?

cheers

#1 lore raw

Hi Michael,

Quoted 7 lines · Michael Ellerman

Hi Masahiro,

I noticed that "install" seems to be no longer PHONY, or at least if I have a file/directory called install then the build doesn't run.

eg:

Quoted 8 lines
  $ touch install
  $ make install
  make: 'install' is up to date.
  $ rm install
  $ make install
    LDS     arch/powerpc/boot/zImage.lds
    WRAP    arch/powerpc/boot/zImage.pseries
    WRAP    arch/powerpc/boot/zImage.epapr

I think the reason is
'install' is not specified as a phony target.

You can add 'PHONY += install' to fix it.

PHONY += install # please add this!
install:

        $(Q)$(MAKE) $(build)=$(boot) install

Please do so in both arch/powerpc/Makefile and
arch/powerpc/boot/Makefile.

Quoted 9 lines

In the past the presence of an install file/directory didn't have any affect.

It seems this changed in:
d79424137a73 ("kbuild: do not update config when running install targets")

Was that expected?

cheers

I do not think commit is related.

Prior to this commit, I still see the same issue.

$ git checkout d7942413^
$ touch install
$ make -s ARCH=powerpc allnoconfig
$ make  ARCH=powerpc install
make: 'install' is up to date.
Signature · 2 lines
Best Regards
Masahiro Yamada
#2 lore raw
Quoted 26 lines · Masahiro Yamada

Hi Michael,

Quoted 7 lines · Michael Ellerman

Hi Masahiro,

I noticed that "install" seems to be no longer PHONY, or at least if I have a file/directory called install then the build doesn't run.

eg:

Quoted 8 lines
  $ touch install
  $ make install
  make: 'install' is up to date.
  $ rm install
  $ make install
    LDS     arch/powerpc/boot/zImage.lds
    WRAP    arch/powerpc/boot/zImage.pseries
    WRAP    arch/powerpc/boot/zImage.epapr

I think the reason is
'install' is not specified as a phony target.

You can add 'PHONY += install' to fix it.

Quoted 7 lines

PHONY += install # please add this!
install:

        $(Q)$(MAKE) $(build)=$(boot) install

Please do so in both arch/powerpc/Makefile and
arch/powerpc/boot/Makefile.

Oh lol, sorry I didn't realise install was in the arch Makefile.

Quoted 13 lines
Quoted 9 lines

In the past the presence of an install file/directory didn't have any affect.

It seems this changed in:
d79424137a73 ("kbuild: do not update config when running install targets")

Was that expected?

cheers

I do not think commit is related.

Quoted 8 lines

Prior to this commit, I still see the same issue.

$ git checkout d7942413^
$ touch install
$ make -s ARCH=powerpc allnoconfig
$ make  ARCH=powerpc install
make: 'install' is up to date.

Hmm weird. I did bisect it:

# bad: [d79424137a7312d381d131d707a462440c0e8df9] kbuild: do not update config when running install targets git bisect bad d79424137a7312d381d131d707a462440c0e8df9
# good: [9c2af1c7377a8a6ef86e5cabf80978f3dbbb25c0] kbuild: add .DELETE_ON_ERROR special target git bisect good 9c2af1c7377a8a6ef86e5cabf80978f3dbbb25c0

  # first bad commit: [d79424137a7312d381d131d707a462440c0e8df9] kbuild: do not update config when running install targets

But you're right. I must have messed something up while bisecting.

Sorry for the noise.

cheers