Package: make Version: 3.80-9 Severity: minor [This bug was sent to bug-make@gnu.org, but since I haven't received a reply, I'm posting it here so there is a record.]
make is doing something funny in the area of stripping the leading ./ from filenames. I can demonstrate with the following Makefile, which is also attached so you get a copy without whitespace damage. files := $(shell find . -type f -print) objects: $(addprefix ./, $(files)) install: $(addprefix /home/andrew/, $(files)) $(addprefix /home/andrew/, $(files)): /home/andrew/%: ./% true $< Put this in an empty directory, then create some files, eg for i in $(seq 1 10); do touch foo$i; done and run make install Output: true foo1 true foo2 true foo3 true foo4 true ./foo5 true foo6 true foo7 true foo8 true ./foo9 true foo10 true Makefile Funny, huh? I gave a little attempt to tracking it down. I thought maybe parse_file_seq was at fault, but it seems to give correct results. Then, I looked at the output of make -r -p install (attached). Looking at the "Not a target" entries, I see foo5, ./foo5, and foo4, but no ./foo4. So it seems that for some reason foo5 has an entry under both names and they are aliased in some way. I can't imagine why this only afflicts some files. Also, I noticed that if I comment out the second line of the Makefiles (which defines the unused objects target), the output is: true ./foo1 true ./foo2 true ./foo3 true ./foo4 true ./foo5 true ./foo6 true ./foo7 true ./foo8 true ./foo9 true ./foo10 true ./Makefile This seems to be a mostly cosmetic bug, but the aliasing is somewhat worrying. My make is 3.80 in Debian GNU/Linux unstable. Andrew -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.8-2-686 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages make depends on: ii libc6 2.3.2.ds1-20 GNU C Library: Shared libraries an -- no debconf information
files := $(shell find . -type f -print) objects: $(addprefix ./, $(files)) install: $(addprefix /home/andrew/, $(files)) $(addprefix /home/andrew/, $(files)): /home/andrew/%: ./% true $<
# GNU Make 3.80 # Copyright (C) 2002 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. true foo1 true foo2 true foo3 true foo4 true ./foo5 true foo6 true foo7 true foo8 true ./foo9 true foo10 true make_data_base true Makefile # Make data base, printed on Mon Feb 28 16:23:46 2005 # Variables # automatic <D = $(patsubst %/,%,$(dir $<)) # automatic ?F = $(notdir $?) # environment RLPR_PRINTHOST = 10.16.16.20 # default CWEAVE = cweave # automatic ?D = $(patsubst %/,%,$(dir $?)) # automatic @D = $(patsubst %/,%,$(dir $@)) # environment XAUTHORITY = /home/andrew/.Xauthority # automatic @F = $(notdir $@) # default CURDIR := /home/andrew/proj/web/apn/test # makefile SHELL = /bin/sh # default RM = rm -f # default CO = co # environment HZ = 100 # environment _ = /usr/bin/make # default PREPROCESS.F = $(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -F # default LINK.o = $(CC) $(LDFLAGS) $(TARGET_ARCH) # default OUTPUT_OPTION = -o $@ # environment HUSHLOGIN = FALSE # default COMPILE.cpp = $(COMPILE.cc) # makefile (from `Makefile', line 1) MAKEFILE_LIST := Makefile # default LINK.p = $(PC) $(PFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) # default CC = cc # default COMPILE.f = $(FC) $(FFLAGS) $(TARGET_ARCH) -c # default CHECKOUT,v = +$(if $(wildcard $@),,$(CO) $(COFLAGS) $< $@) # default CPP = $(CC) -E # default LINK.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) # environment PATH = /home/andrew/bin:/usr/sbin:/sbin:/home/andrew/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games # default LD = ld # default TEXI2DVI = texi2dvi # environment FVWM_USERDIR = /home/andrew/.fvwm # default YACC = yacc # makefile (from `Makefile', line 1) files := ./foo1 ./foo2 ./foo3 ./foo4 ./foo5 ./foo6 ./foo7 ./foo8 ./foo9 ./foo10 ./make_data_base ./Makefile # default COMPILE.mod = $(M2C) $(M2FLAGS) $(MODFLAGS) $(TARGET_ARCH) # default ARFLAGS = rv # default LINK.r = $(FC) $(FFLAGS) $(RFLAGS) $(LDFLAGS) $(TARGET_ARCH) # environment WINDOWID = 33554448 # environment FVWM_MODULEDIR = /usr/lib/fvwm/2.5.12 # default LINT.c = $(LINT) $(LINTFLAGS) $(CPPFLAGS) $(TARGET_ARCH) # default LINT = lint # default YACC.y = $(YACC) $(YFLAGS) # default AR = ar # default TANGLE = tangle # environment LS_COLORS = no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.ogg=01;35:*.mp3=01;35:*.wav=01;35: # environment EMAIL = [EMAIL PROTECTED] # environment SSH_AUTH_SOCK = /tmp/ssh-KCLiwS2832/agent.2832 # default GET = get # automatic %F = $(notdir $%) # environment DISPLAY = :0.0 # default COMPILE.F = $(FC) $(FFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c # default CTANGLE = ctangle # environment VISUAL = vi # default .LIBPATTERNS = lib%.so lib%.a # default LINK.C = $(LINK.cc) # environment PWD = /home/andrew/proj/web/apn/test # default LINK.S = $(CC) $(ASFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_MACH) # default PREPROCESS.r = $(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -F # environment SSH_AGENT_PID = 2867 # default LINK.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) # environment MANPATH = /home/andrew/local/man:/home/andrew/local/man:/usr/share/man:/usr/local/man:/usr/local/share/man:/usr/X11R6/man # default LINK.s = $(CC) $(ASFLAGS) $(LDFLAGS) $(TARGET_MACH) # environment HOME = /home/andrew # environment PERL5LIB = /home/andrew/lib/perl:/home/andrew/local/lib/perl # environment LOGNAME = andrew # environment HUGSFLAGS = -P/home/andrew/lib/haskell: # automatic ^D = $(patsubst %/,%,$(dir $^)) # default MAKE = $(MAKE_COMMAND) # default MAKECMDGOALS := install # environment SHLVL = 3 # default AS = as # default PREPROCESS.S = $(CC) -E $(CPPFLAGS) # default COMPILE.p = $(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c # default MAKE_VERSION := 3.80 # environment USER = andrew # default FC = f77 # environment HOSTDISPLAY = apple:0.0 # environment LESS = -i # automatic %D = $(patsubst %/,%,$(dir $%)) # default WEAVE = weave # default MAKE_COMMAND := make # default LINK.cpp = $(LINK.cc) # default F77 = $(FC) # environment OLDPWD = /home/andrew/proj/web/apn # default .VARIABLES := # default PC = pc # automatic *F = $(notdir $*) # default COMPILE.def = $(M2C) $(M2FLAGS) $(DEFFLAGS) $(TARGET_ARCH) # default LEX = lex # makefile MAKEFLAGS = rp # environment MFLAGS = -rp # automatic *D = $(patsubst %/,%,$(dir $*)) # environment MAIL = /var/mail/andrew # default LEX.l = $(LEX) $(LFLAGS) -t # automatic +D = $(patsubst %/,%,$(dir $+)) # default COMPILE.r = $(FC) $(FFLAGS) $(RFLAGS) $(TARGET_ARCH) -c # automatic +F = $(notdir $+) # default M2C = m2c # default MAKEFILES := # default COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c # automatic <F = $(notdir $<) # default CXX = g++ # default COFLAGS = # environment EDITOR = vi # default COMPILE.C = $(COMPILE.cc) # automatic ^F = $(notdir $^) # default COMPILE.S = $(CC) $(ASFLAGS) $(CPPFLAGS) $(TARGET_MACH) -c # default LINK.F = $(FC) $(FFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) # default SUFFIXES := # default COMPILE.c = $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c # default COMPILE.s = $(AS) $(ASFLAGS) $(TARGET_MACH) # environment MAKELEVEL := 0 # default MAKEINFO = makeinfo # default TEX = tex # environment LANG = en_US.UTF-8 # environment TERM = xterm # default F77FLAGS = $(FFLAGS) # default LINK.f = $(FC) $(FFLAGS) $(LDFLAGS) $(TARGET_ARCH) # variable set hash-table stats: # Load=116/1024=11%, Rehash=0, Collisions=10/161=6% # Directories # . (device 771, inode 260165): 14 files, no impossibilities. # 14 files, no impossibilities in 1 directories. # Implicit Rules # No implicit rules. # Pattern-specific variable values # No pattern-specific variable values. # Files /home/andrew/./foo5: ./foo5 # Implicit rule search has not been done. # Implicit/static pattern stem: `./foo5' # File does not exist. # File has been updated. # Successfully updated. # automatic # @ := /home/andrew/./foo5 # automatic # % := # automatic # * := ./foo5 # automatic # + := ./foo5 # automatic # | := # automatic # < := ./foo5 # automatic # ^ := ./foo5 # automatic # ? := ./foo5 # variable set hash-table stats: # Load=8/32=25%, Rehash=0, Collisions=1/11=9% # commands to execute (from `Makefile', line 8): true $< /home/andrew/./foo9: ./foo9 # Implicit rule search has not been done. # Implicit/static pattern stem: `./foo9' # File does not exist. # File has been updated. # Successfully updated. # automatic # @ := /home/andrew/./foo9 # automatic # % := # automatic # * := ./foo9 # automatic # + := ./foo9 # automatic # | := # automatic # < := ./foo9 # automatic # ^ := ./foo9 # automatic # ? := ./foo9 # variable set hash-table stats: # Load=8/32=25%, Rehash=0, Collisions=1/11=9% # commands to execute (from `Makefile', line 8): true $< objects: foo1 foo2 foo3 foo4 foo5 foo6 foo7 foo8 foo9 foo10 make_data_base Makefile # Implicit rule search has not been done. # Modification time never checked. # File has not been updated. # Not a target: .SUFFIXES: # Implicit rule search has not been done. # Modification time never checked. # File has not been updated. # Not a target: foo1: # Implicit rule search has been done. # Last modified 2005-02-28 16:14:03.496874776 # File has been updated. # Successfully updated. /home/andrew/./foo4: foo4 # Implicit rule search has not been done. # Implicit/static pattern stem: `./foo4' # File does not exist. # File has been updated. # Successfully updated. # automatic # @ := /home/andrew/./foo4 # automatic # % := # automatic # * := ./foo4 # automatic # + := foo4 # automatic # | := # automatic # < := foo4 # automatic # ^ := foo4 # automatic # ? := foo4 # variable set hash-table stats: # Load=8/32=25%, Rehash=0, Collisions=1/11=9% # commands to execute (from `Makefile', line 8): true $< # Not a target: Makefile: # Implicit rule search has been done. # Last modified 2005-02-28 16:09:56.824292921 # File has been updated. # Successfully updated. /home/andrew/./foo8: foo8 # Implicit rule search has not been done. # Implicit/static pattern stem: `./foo8' # File does not exist. # File has been updated. # Successfully updated. # automatic # @ := /home/andrew/./foo8 # automatic # % := # automatic # * := ./foo8 # automatic # + := foo8 # automatic # | := # automatic # < := foo8 # automatic # ^ := foo8 # automatic # ? := foo8 # variable set hash-table stats: # Load=8/32=25%, Rehash=0, Collisions=1/11=9% # commands to execute (from `Makefile', line 8): true $< # Not a target: foo10: # Implicit rule search has been done. # Last modified 2005-02-28 16:14:03.505873338 # File has been updated. # Successfully updated. /home/andrew/./foo3: foo3 # Implicit rule search has not been done. # Implicit/static pattern stem: `./foo3' # File does not exist. # File has been updated. # Successfully updated. # automatic # @ := /home/andrew/./foo3 # automatic # % := # automatic # * := ./foo3 # automatic # + := foo3 # automatic # | := # automatic # < := foo3 # automatic # ^ := foo3 # automatic # ? := foo3 # variable set hash-table stats: # Load=8/32=25%, Rehash=0, Collisions=1/11=9% # commands to execute (from `Makefile', line 8): true $< /home/andrew/./foo7: foo7 # Implicit rule search has not been done. # Implicit/static pattern stem: `./foo7' # File does not exist. # File has been updated. # Successfully updated. # automatic # @ := /home/andrew/./foo7 # automatic # % := # automatic # * := ./foo7 # automatic # + := foo7 # automatic # | := # automatic # < := foo7 # automatic # ^ := foo7 # automatic # ? := foo7 # variable set hash-table stats: # Load=8/32=25%, Rehash=0, Collisions=1/11=9% # commands to execute (from `Makefile', line 8): true $< # Not a target: ./foo5: # Implicit rule search has been done. # Last modified 2005-02-28 16:14:03.500874137 # File has been updated. # Successfully updated. /home/andrew/./foo6: foo6 # Implicit rule search has not been done. # Implicit/static pattern stem: `./foo6' # File does not exist. # File has been updated. # Successfully updated. # automatic # @ := /home/andrew/./foo6 # automatic # % := # automatic # * := ./foo6 # automatic # + := foo6 # automatic # | := # automatic # < := foo6 # automatic # ^ := foo6 # automatic # ? := foo6 # variable set hash-table stats: # Load=8/32=25%, Rehash=0, Collisions=1/11=9% # commands to execute (from `Makefile', line 8): true $< # Not a target: foo2: # Implicit rule search has been done. # Last modified 2005-02-28 16:14:03.497874616 # File has been updated. # Successfully updated. # Not a target: ./foo9: # Implicit rule search has been done. # Last modified 2005-02-28 16:14:03.504873498 # File has been updated. # Successfully updated. # Not a target: foo5: # Implicit rule search has not been done. # Modification time never checked. # File has not been updated. /home/andrew/./make_data_base: make_data_base # Implicit rule search has not been done. # Implicit/static pattern stem: `./make_data_base' # File does not exist. # File has been updated. # Successfully updated. # automatic # @ := /home/andrew/./make_data_base # automatic # % := # automatic # * := ./make_data_base # automatic # + := make_data_base # automatic # | := # automatic # < := make_data_base # automatic # ^ := make_data_base # automatic # ? := make_data_base # variable set hash-table stats: # Load=8/32=25%, Rehash=0, Collisions=1/11=9% # commands to execute (from `Makefile', line 8): true $< # Not a target: foo9: # Implicit rule search has not been done. # Modification time never checked. # File has not been updated. # Not a target: .DEFAULT: # Implicit rule search has not been done. # Modification time never checked. # File has not been updated. /home/andrew/./foo1: foo1 # Implicit rule search has not been done. # Implicit/static pattern stem: `./foo1' # File does not exist. # File has been updated. # Successfully updated. # automatic # @ := /home/andrew/./foo1 # automatic # % := # automatic # * := ./foo1 # automatic # + := foo1 # automatic # | := # automatic # < := foo1 # automatic # ^ := foo1 # automatic # ? := foo1 # variable set hash-table stats: # Load=8/32=25%, Rehash=0, Collisions=1/11=9% # commands to execute (from `Makefile', line 8): true $< # Not a target: foo4: # Implicit rule search has been done. # Last modified 2005-02-28 16:14:03.499874297 # File has been updated. # Successfully updated. /home/andrew/./foo10: foo10 # Implicit rule search has not been done. # Implicit/static pattern stem: `./foo10' # File does not exist. # File has been updated. # Successfully updated. # automatic # @ := /home/andrew/./foo10 # automatic # % := # automatic # * := ./foo10 # automatic # + := foo10 # automatic # | := # automatic # < := foo10 # automatic # ^ := foo10 # automatic # ? := foo10 # variable set hash-table stats: # Load=8/32=25%, Rehash=0, Collisions=1/11=9% # commands to execute (from `Makefile', line 8): true $< # Not a target: foo8: # Implicit rule search has been done. # Last modified 2005-02-28 16:14:03.503873657 # File has been updated. # Successfully updated. /home/andrew/./Makefile: Makefile # Implicit rule search has not been done. # Implicit/static pattern stem: `./Makefile' # File does not exist. # File has been updated. # Successfully updated. # automatic # @ := /home/andrew/./Makefile # automatic # % := # automatic # * := ./Makefile # automatic # + := Makefile # automatic # | := # automatic # < := Makefile # automatic # ^ := Makefile # automatic # ? := Makefile # variable set hash-table stats: # Load=8/32=25%, Rehash=0, Collisions=1/11=9% # commands to execute (from `Makefile', line 8): true $< # Not a target: foo3: # Implicit rule search has been done. # Last modified 2005-02-28 16:14:03.498874456 # File has been updated. # Successfully updated. # Not a target: foo7: # Implicit rule search has been done. # Last modified 2005-02-28 16:14:03.502873817 # File has been updated. # Successfully updated. /home/andrew/./foo2: foo2 # Implicit rule search has not been done. # Implicit/static pattern stem: `./foo2' # File does not exist. # File has been updated. # Successfully updated. # automatic # @ := /home/andrew/./foo2 # automatic # % := # automatic # * := ./foo2 # automatic # + := foo2 # automatic # | := # automatic # < := foo2 # automatic # ^ := foo2 # automatic # ? := foo2 # variable set hash-table stats: # Load=8/32=25%, Rehash=0, Collisions=1/11=9% # commands to execute (from `Makefile', line 8): true $< install: /home/andrew/./foo1 /home/andrew/./foo2 /home/andrew/./foo3 /home/andrew/./foo4 /home/andrew/./foo5 /home/andrew/./foo6 /home/andrew/./foo7 /home/andrew/./foo8 /home/andrew/./foo9 /home/andrew/./foo10 /home/andrew/./make_data_base /home/andrew/./Makefile # Command-line target. # Implicit rule search has been done. # File does not exist. # File has been updated. # Successfully updated. # variable set hash-table stats: # Load=0/32=0%, Rehash=0, Collisions=0/24=0% # Not a target: foo6: # Implicit rule search has been done. # Last modified 2005-02-28 16:14:03.501873977 # File has been updated. # Successfully updated. # Not a target: make_data_base: # Implicit rule search has been done. # Last modified 2005-02-28 16:23:46.037785054 # File has been updated. # Successfully updated. # files hash-table stats: # Load=30/1024=3%, Rehash=0, Collisions=0/78=0% # VPATH Search Paths # No `vpath' search paths. # No general (`VPATH' variable) search path. # Finished Make data base on Mon Feb 28 16:23:46 2005