https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121450

            Bug ID: 121450
           Summary: Generated dependency fragment for module partitions
                    cause make failure
           Product: gcc
           Version: 15.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: joergboe at snafu dot de
  Target Milestone: ---

I use the following Makefile to compile the following module partition:

$ cat Makefile 
modulepart1.o: modulepart1.cpp
        $(CXX) -o $@ $< -c -fmodules-ts -MMD

-include modulepart1.d

$ cat modulepart1.cpp 
export module m:part;

The first run of make generates the dependency-file:

$ cat modulepart1.d 
modulepart1.o gcm.cache/m-part.gcm: modulepart1.cpp
m:part.c++-module: gcm.cache/m-part.gcm
.PHONY: m:part.c++-module
gcm.cache/m-part.gcm:| modulepart1.o

The second run of make gives the error:
$ make
modulepart1.d:2: *** target pattern contains no '%'.  Stop.

This is due to the colon in the target name 'm:part'
GNU make allows to use colons in targets and prerequisites if escaped with
backslash.

See also Bug 41329

Reply via email to