Closed Bug 255328 Opened 20 years ago Closed 20 years ago

mkdepend command line defines may be broken

Categories

(SeaMonkey :: Build Config, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Callek, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

When running mkdepend if a define is specified as |-D Foo| or |-D Foo=bar|
mkdepend will miss the first two letters of the define when storing it, where-as
normal |-DFoo| and |-DFoo=bar|  will work just fine.

Similar two letter issue is with the -U switch.
Attached patch Fix (obsolete) — Splinter Review
adds a register char `offset` to serve as an entry to pass instead of the
unconditionally passed |+ 2|

used register char to keep speed of mkdepend up as much as possible.
Comment on attachment 155884 [details] [diff] [review]
Fix

Bryner, was suggested I r? you.

Do we need sr here, and if so, suggest anyone?
Attachment #155884 - Flags: review?(bryner)
Attached patch Patch v2Splinter Review
Noticed erroneous offset reference (and incorrect at that) called in first
file, that I did not catch my first upload.
Attachment #155884 - Attachment is obsolete: true
Attachment #155884 - Flags: review?(bryner)
Comment on attachment 155891 [details] [diff] [review]
Patch v2

porting r?
Attachment #155891 - Flags: review?(bryner)
bsmedberg

Can I get you to peek at this patch and r+ it and comit for me, bryner seems to
be a bit busy as of late.
Does this situation come up somewhere in our build?
I dont believe it does, (I'm not as up on the makefile rules for every configure
format), but I am sure if it did we would have heard of it before now.

I opted for "fix" rather than remove, but if it is your concept to remove the
support for the space then I can do that as well.  I have been running with this
patch for a while, with no real (noticeable) problems, unfortunately I never did
any build time compares.
Comment on attachment 155891 [details] [diff] [review]
Patch v2

What I don't like about this is that it creates an inconsistency with the way
other options, like -I, are handled.  So I'd say the either need to all accept
the extra space or none of them... since the problem doesn't come up in our
build I think I'd rather just leave it as-is.
Attachment #155891 - Flags: review?(bryner) → review-
quoting from mkdepend code:

>		case 'I':
>			if (incp >= includedirs + MAXDIRS)
>			    fatalerr("Too many -I flags.\n");
>			*incp++ = argv[0]+2;
>			if (**(incp-1) == '\0') {
>				*(incp-1) = *(++argv);
>				argc--;
>			}
>			break;

Is the section on includes, following that, it does check, and work if there is
a space in the command line |-I somefile.ext|  works as does |-Isomefile.ext| 
in the same way.

The -D issue is not an issue with out default builds, but if someone adds a -D
option themselves to their build process, they would expect mkdepend to work as
expected when determining dependancies...where currently if they do it with a
space they cannot.

With the way the code *looks* right now, it would make people who look at a
glance think that we support it that way, I'm for supporting it, but if we must
leave it out, or remove it, we need to make other argument accepting things with
mkdepend NOT work with a space, such as |-I|

Thoughts?
Attachment #155891 - Flags: review- → review+
patch r+'ed based on talk in irc, thanks bryner

Patch checked in thanks to timeless
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: