help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

longer PHONY targets causes failure to fire other target


From: Larry Evans
Subject: longer PHONY targets causes failure to fire other target
Date: Thu, 5 May 2011 17:12:18 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

The Makefile at the bottom of this message
(and delimited by --{--Makefile--
and --}--Makefile--),
when invoked as follows:

  make show_bug

produces output:

--{--make show_bug output--
make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-pc-linux-gnu
***YES EXPECTED:
make result
make[1]: Entering directory
`/home/evansl/prog_dev/gmake.test/bugs/PHONYlong'
compile bin/part2/chapter08/XfaMovie.class
run results/part2/chapter08/XfaMovie.result
make[1]: Leaving directory `/home/evansl/prog_dev/gmake.test/bugs/PHONYlong'
***NOT EXPECTED:
make result dophony=yes
make[1]: Entering directory
`/home/evansl/prog_dev/gmake.test/bugs/PHONYlong'
make[1]: Nothing to be done for `result'.
make[1]: Leaving directory `/home/evansl/prog_dev/gmake.test/bugs/PHONYlong'
***YES EXPECTED:
make result dophony=yes nopre=yes
make[1]: Entering directory
`/home/evansl/prog_dev/gmake.test/bugs/PHONYlong'
compile bin/part2/chapter08/XfaMovie.class
run results/part2/chapter08/XfaMovie.result
make[1]: Leaving directory `/home/evansl/prog_dev/gmake.test/bugs/PHONYlong'
--}--make show_bug output--

The above about suggests gnu make has some problem when the
length of the .PHONY args is over some unspecified length.
Is this a bug, or am I missing something?

TIA.

-Larry


--{--Makefile--
##Purpose:
##  Show problem with long .PHONY statement
##Requires:
##  ./src/part2/chapter08/XfaMovie.java file, of *any* type
##     (i.e. need not be valid java code).
##
SRC:=src
BIN:=bin
RES:=results

ifdef nopre
PRE:=
else
PRE:=part2.chapter08.
endif

MAIN.$(PRE)paths:=
MAIN.path:=$(PRE)Buttons
MAIN.$(PRE)paths+=$(MAIN.path)
MAIN.path:=$(PRE)RadioButtons
MAIN.$(PRE)paths+=$(MAIN.path)
MAIN.path:=$(PRE)ReplaceIcon
MAIN.$(PRE)paths+=$(MAIN.path)
MAIN.path:=$(PRE)TextFields
MAIN.$(PRE)paths+=$(MAIN.path)
MAIN.path:=$(PRE)TextFieldFonts
MAIN.$(PRE)paths+=$(MAIN.path)
MAIN.path:=$(PRE)TextFieldActions
MAIN.$(PRE)paths+=$(MAIN.path)
MAIN.path:=$(PRE)ChoiceFields
MAIN.$(PRE)paths+=$(MAIN.path)
MAIN.path:=$(PRE)Subscribe
MAIN.$(PRE)paths+=$(MAIN.path)
MAIN.path:=$(PRE)MovieAds
MAIN.$(PRE)paths+=$(MAIN.path)
MAIN.path:=$(PRE)XfaMovie
MAIN.$(PRE)paths+=$(MAIN.path)
MAIN.path:=$(PRE)XfaMovies
MAIN.$(PRE)paths+=$(MAIN.path)
MAIN.path:=$(PRE)ReaderEnabledForm
MAIN.$(PRE)paths+=$(MAIN.path)
MAIN.$(PRE)results:=$(subst .,/,$(MAIN.$(PRE)paths))
MAIN.$(PRE)results:=$(MAIN.$(PRE)results:%=$(RES)/%.result)

ifdef dophony
.PHONY:$(MAIN.$(PRE)results) part2.chapter08.results
endif

part2.chapter08.results: $(MAIN.$(PRE)results)

RESULT.path = part2/chapter08/XfaMovie

$(BIN)/%.class: $(SRC)/%.java FORCE
        @echo compile $@

$(RES)/%.result: $(BIN)/%.class
        @echo run $@

result: $(RES)/$(RESULT.path).result

echo:
        @echo XXX=$(MAIN.$(PRE)results)

FORCE:

show_bug:
        make -v
        @echo ***YES EXPECTED:
        make result
        @echo ***NOT EXPECTED:
        make result dophony=yes
        @echo ***YES EXPECTED:
        make result dophony=yes nopre=yes


--}--Makefile--





reply via email to

[Prev in Thread] Current Thread [Next in Thread]