ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When running make with my source file checked out from SCCS, I get the above error. Could someone look at my makefile and give me an idea where the problem is? I copied this Makefile from some website and hacked at it to get what I wanted. Or is this a configuration problem?
I ran "make -d" and got some confusing output. As you can see, it's drilling into the SCCS directory to see if I have the proper version to make.
Code:
Updating goal targets....
Considering target file `testit'.
Considering target file `testit.o'.
Looking for an implicit rule for `testit.o'.
Trying pattern rule with stem `testit'.
Trying implicit prerequisite `testit.c'.
Trying rule prerequisite `RAIM.h'.
Found an implicit rule for `testit.o'.
Considering target file `testit.c'.
Looking for an implicit rule for `testit.c'.
Trying pattern rule with stem `testit'.
Trying implicit prerequisite `testit.y'.
Trying pattern rule with stem `testit'.
Trying implicit prerequisite `testit.l'.
Trying pattern rule with stem `testit'.
Trying implicit prerequisite `testit.w'.
Trying pattern rule with stem `testit'.
Trying implicit prerequisite `testit.w'.
Trying pattern rule with stem `testit.c'.
Trying implicit prerequisite `testit.c,v'.
Trying pattern rule with stem `testit.c'.
Trying implicit prerequisite `RCS/testit.c,v'.
Trying pattern rule with stem `testit.c'.
Trying implicit prerequisite `RCS/testit.c'.
Trying pattern rule with stem `testit.c'.
Trying implicit prerequisite `s.testit.c'.
Trying pattern rule with stem `testit.c'.
Trying implicit prerequisite `SCCS/s.testit.c'.
Found an implicit rule for `testit.c'.
Considering target file `SCCS/s.testit.c'.
Finished prerequisites of target file `SCCS/s.testit.c'.
No need to remake target `SCCS/s.testit.c'.
Finished prerequisites of target file `testit.c'.
Prerequisite `SCCS/s.testit.c' is older than target `testit.c'.
No need to remake target `testit.c'.
Considering target file `RAIM.h'.
Looking for an implicit rule for `RAIM.h'.
Trying pattern rule with stem `RAIM.h'.
Trying implicit prerequisite `RAIM.h,v'.
Trying pattern rule with stem `RAIM.h'.
Trying implicit prerequisite `RCS/RAIM.h,v'.
Trying pattern rule with stem `RAIM.h'.
Trying implicit prerequisite `RCS/RAIM.h'.
Trying pattern rule with stem `RAIM.h'.
Trying implicit prerequisite `s.RAIM.h'.
Trying pattern rule with stem `RAIM.h'.
Trying implicit prerequisite `SCCS/s.RAIM.h'.
No implicit rule found for `RAIM.h'.
Finished prerequisites of target file `RAIM.h'.
No need to remake target `RAIM.h'.
Finished prerequisites of target file `testit.o'.
Prerequisite `testit.c' is older than target `testit.o'.
I wonder if the problem is related to "patsubst" in this line of the Makefile? I don't know anything about patsubst. Like I mentioned, I just copied this makefile from a tutorial and hacked it into submission. This only happens to me randomly. The next time it happens I'll try to take the time to run "make -d" and maybe remove the patsubst from the Makefile.
Make is calling get to check out a missing source file.
OK, that makes more sense. I've had some power outages lately, so I wonder if that's left something messed up as far as sccs is concerned? I usually just keep the source files checked out and checkpoint them to sccs as things change, so it's not likely that I've manually set permissions on a file that's not checked out.
Quote:
Originally Posted by pwalden
You can add the --no-builtin-rules make option to turn them all off.
Where would I add that? I'm certainly not going to remember to type it every time.
Sorry to resurrect this, but I ran into the problem again when trying to do a make immediately after doing an "sccs deledit". This thread was the first thing I found on a websearch. I tried adding ".SUFFIXES:" to the Makefile, but that didn't fix it. But, while editing the file in vi, I saved it without changing anything, and the error went away. So, I assume that touching it would have been good enough. It must be a date/timestamp issue.
to your Makefile should be equivalent, see Suffix Rules.
I rechecked the manual, which says
Quote:
Many of the predefined implicit rules are implemented in make as suffix rules
meaning not all are suffix rules, so perhaps .SUFFIXES doesn't affect the SCCS rule. Canceling Rules says to define a pattern rule without a recipe, so maybe
Code:
## Cancelling SCCS Rule: Any file n is extracted if necessary from an SCCS file named either s.n or SCCS/s.n
% : s.%
% : SCCS/s.%
If that doesn't work, as a last resort you could redefine GET to a nop:
Code:
# ":" means do nothing
GET := : NOT getting from SCCS
Last edited by ntubski; 04-23-2015 at 11:42 AM.
Reason: supid typo; %s getting eaten?
The last one actually works, giving me the response below. Is there an obvious way to change it so that it touches the file in the current directory, not the file in the SCCS directory? Maybe it would help if I understood what's happening with your command. Since the ": NOT (etc)" is printed out, I take it that ":=" is equivalent to "assign this value". So, is it possible to use a sed command or something like that to get rid of "SCCS/" and change it to "touch " the file? Sorry, but this is just black magic to me.
I had a stupid typo in the first method, fix in red, see if it helps.
Quote:
Maybe it would help if I understood what's happening with your command. Since the ": NOT (etc)" is printed out, I take it that ":=" is equivalent to "assign this value". So, is it possible to use a sed command or something like that to get rid of "SCCS/" and change it to "touch " the file? Sorry, but this is just black magic to me.
Yeah, basically the SCCS rule uses executes $(GET) $(GFLAGS) SCCS/s.<the-file>, so by assigning the GET variable we can control what it does.
But manipulating the filename is awkward because we can only control the command before the filename.
Code:
# this might work?
GET := sh -c 'touch "$${0#SCCS/s.}"'
If you're just trying to hide the problem, putting a @ in front should work to tell make not echo the command before executing it:
Hmm, I guess I didn't notice the typo, either, but that one works. I only needed the one line. Thanks! And hopefully this thread will help the next guy - which will probably be me in a few months when I do some other project. =)
Added:
Code:
% : SCCS/s.%
Last edited by Quakeboy02; 04-23-2015 at 12:27 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.