tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
make(1): is this a bug or PEBKAC?
I'm trying to work on 9.1, for work. Of course, one of the first
things I tried to do was install various of my tools.
make(1) appears to be misbehaving. But I'm not sure enough it isn't
PEBKAC to just file a PR.
Specifically, I run my "bootstrap the tools" script and everything goes
normally until it tries to build a particular program, at which point
make: Unclosed substitution for (; missing)
make: Unclosed substitution for (; missing)
make: "/home/mouse/..local/lib/make/local-prog" line 115: Need an operator
make: Unclosed substitution for (; missing)
make: Unclosed substitution for (; missing)
make: "/home/mouse/..local/lib/make/local-prog" line 121: Need an operator
make: Unclosed substitution for (; missing)
make: "/home/mouse/..local/lib/make/local-prog" line 125: Need an operator
make: Fatal errors encountered -- cannot continue
There are exactly two spaces between "for" and "(" on the "Unclosed
substitution" lines (verified with hexdump -C). The Makefile in
question is
CC_ADD = -g
BUILDBINS = ccwrapper
OBJ_ccwrapper = ccwrapper.o
INSTALLMAN = ccwrapper.1
.MAIN: ccwrapper ccwrapper.cat1
.include <local-prog>
and make is being run as...well, to let ktrace -t aceinsu tell it:
3662 1 make NAMI "/usr/bin/make"
3662 1 make NAMI "/usr/libexec/ld.elf_so"
3662 1 make ARG "/usr/bin/make"
3662 1 make ARG "-m"
3662 1 make ARG "/home/mouse/..local/lib/make"
3662 1 make ARG "-m"
3662 1 make ARG "/usr/share/mk"
(local-prog is the only thing in /home/.mouse/..local/lib/make.)
The relevant part of local-prog is (line numbers added, of course - the
whole file is on ftp.rodents-montreal.org in
/pub/mouse/local/src/makefiles/makefiles-20230221/local-prog in case
anyone wants the whole thing):
109 .PHONY: install_dirs_MAN
110 .for x in $(INSTALLMAN)
111 install_files:: $(x:C;^(.*)\.([0-9].*)$$;$(INSTMANDIR)/cat\2/\1.0;)
112 install_dirs:: install_dirs_MAN
113 $(x:C;^(.*)\.([0-9].*)$$;$(INSTMANDIR)/cat\2/\1.0;): \
114 $(x:C;^.*\.([0-9].*)$$;$(INSTMANDIR)/cat\1;) \
115 $(x:C;\.([0-9].*)$$;.cat\1;)
116 cp $(x:C;\.([0-9].*)$$;.cat\1;) $(.TARGET)
117 CLEANFILES_ += $(x:C;\.([0-9].*)$$;.cat\1;)
118 .if !exists($(x:C;^.*\.([0-9].*)$$;$(INSTMANDIR)/cat\1;)) && \
119 !target($(x:C;^.*\.([0-9].*)$$;$(INSTMANDIR)/cat\1;))
120 install_dirs_MAN:: $(x:C;^.*\.([0-9].*)$$;$(INSTMANDIR)/cat\1;)
121 $(x:C;^.*\.([0-9].*)$$;$(INSTMANDIR)/cat\1;):
122 mkdir -p $(.TARGET)
123 .endif
124 .if !target($(x:C;\.([0-9].*)$$;.cat\1;))
125 $(x:C;\.([0-9].*)$$;.cat\1;): $(x)
126 nroff -mandoc $(.ALLSRC) > $(.TARGET) || (rm -f $(.TARGET); false)
127 .endif
128 .endfor
The same code works with 5.2's make (which, of course, says only
moderately little for its correctness...).
So, I'm wondering, is this a bug in 9.1's make, or am I doing something
wrong here?
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index