85 posColon = strstr(buf,
".o: ");
88 if (fwrite(buf, len, 1, stdout) != 1)
89 fprintf(stderr,
"Warning: ROOT_adddep: fwrite error\n");
115 char s = posColon[4];
116 strcat(posColon,
"cxx");
117 if (fwrite(buf, (posColon - buf)+4, 1, stdout) != 1)
118 fprintf(stderr,
"Warning: ROOT_adddep: fwrite error\n");
123 if (fwrite(buf, (posColon - buf)+2, 1, stdout) != 1)
124 fprintf(stderr,
"Warning: ROOT_adddep: fwrite error\n");
126 if (fwrite(buf, (posColon - buf)+2, 1, stdout) != 1)
127 fprintf(stderr,
"Warning: ROOT_adddep: fwrite error\n");
134 if (fwrite(
": $(wildcard ", 13, 1, stdout) != 1)
135 fprintf(stderr,
"Warning: ROOT_adddep: fwrite error\n");
136 if (fwrite(posColon + 4, len - (posColon + 4 - buf), 1, stdout) != 1)
137 fprintf(stderr,
"Warning: ROOT_adddep: fwrite error\n");
144 if (argc<3 || (strcmp(argv[1],
"-R") && strncmp(argv[1],
"-R=", 3)))
148 const char* outname = argv[2]+2;
149 while (*outname ==
' ') ++outname;
151 if (argv[1][2] ==
'=') {
153 std::string sDictTag(argv[1] + 1);
154 size_t posExt = sDictTag.find(
'%');
155 if (posExt != std::string::npos && posExt < sDictTag.length() - 1) {
156 std::string sDictExt = sDictTag.substr(posExt + 1);
157 sDictTag.erase(posExt);
158 isDict = (strstr(outname, sDictTag.c_str()))
159 && !(strcmp(outname + strlen(outname) - sDictExt.length(),
162 isDict = (strstr(outname, sDictTag.c_str()) != 0);
166 isDict = (strstr(outname,
"/G__"))
167 && (!strcmp(outname + strlen(outname) - 2,
".d"));
174 for (
int i = 2; i < argc; ++i) {
175 std::string arg(argv[i]);
177 size_t len = arg.length();
179 char* argvi =
new char[len + 1];
180 strncpy(argvi, arg.c_str(), len + 1);
int main_orig(int argc, char **argv)
static std::string currentDependencies
void ROOT_adddep(char *buf, size_t len)
static std::string currentFileBase