-
Notifications
You must be signed in to change notification settings - Fork 369
Description
... every time a Makefile doesn't do its job.
but the correct issue heading should have been "missing implicit rule for .s.o targets in make"
Bug Description
Allow me the catchy name of the issue, but it seems that to get noticed you have to be original. Like someone who decided to invent the .s.o suffix for static object (which certainly cannot be confused with .so which stands for shared object, two things which are not exactly similar.)
While this may seem like a clever way to write a Makefile, it can actually become a rather serious problem, as this issue shows.
But this is only because make uses implicit rules (in makefile parlance) that are already known and you don't have to rewrite them every time, but it has no implicit rules for new filetype extensions.
I know that nowadays nobody compiles statically anymore, in fact in the .gitignore that is cloned from the repo the .s.o are not mentioned, unlike the other files produced during compilation. Maybe that should be fixed too.
Expected behavior and actual behavior
expected
[pax@makedick src]$ make static
make: Nothing to be done for 'static'.
[pax@makedick src]$ touch channelimpl.cpp
[pax@makedick src]$ make static
g++ -Wall -c -I../include -std=c++17 -MD -Wno-class-conversion -DVERSION= -o channelimpl.s.o channelimpl.cpp
ar rcs lib.a. flags.s.o inbuffer.s.o table.s.o field.s.o deferredconfirm.s.o deferredget.s.o deferredextreceiver.s.o connectionimpl.s.o tagger.s.o receivedframe.s.o deferredconsumer.s.o deferredreceiver.s.o array.s.o deferredrecall.s.o deferredcancel.s.o channelimpl.s.o channel.s.o watchable.s.o throttle.s.o linux_tcp/tcpconnection.s.o linux_tcp/openssl.s.o linux_tcp/sslerrorprinter.s.o
actual
[pax@makedick src]$ make static
make: Nothing to be done for 'static'.
[pax@makedick src]$ touch channelimpl.cpp
[pax@makedick src]$ make static
make: Nothing to be done for 'static'.
I hope Boing doesn't use makefiles like this (even if it does worse)...