auto-dep cannot possibly work?

2009-11-14 Thread Mark Galeck
Hello, as you may know, I have been working on the auto-dependency generation for large build system using GNU make, along the lines of the relevant section of the GNU make manual, as well as the excellent survey article http://make.paulandlesley.org/autodep.html. Well, I have finished but sud

generation of makefiles from build output?

2011-07-03 Thread Mark Galeck
Hello, I am working on a project which has more than 100M lines of code, more than 100K files and, more than 1000 makefiles. Makefiles apparently have bugs (may build too little or too much), are slow, messy, and violate "Paul's rules" and common decency on a routine basis. I am asked to "do

Re: generation of makefiles from build output?

2011-07-07 Thread Mark Galeck
- Original Message From: David Boyce > If one of your platforms is Linux I may have a good starting place for you. I recently released an open source tool which does basically what Thank you all for helpful hints, I am looking at the autoconf/automake solution suggested earlier and then

segmentation fault - can someone give me a workaround?

2013-01-18 Thread Mark Galeck
Hello, we are using GNU Make 3.82, and I just asked the admin to reinstall it, just in case the installation went south. But still, I am getting a segmentation fault. I will show you below a smallest possible sample case, but, the fault happens a lot in similar cases. So I am hoping someon

Re: segmentation fault - can someone give me a workaround?

2013-01-18 Thread Mark Galeck
I forgot to add, the file sw/foobar.cpp is already present (empty file for this example) ___ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-make

Re: implementing emake's #pragma multi in GNU make?

2013-02-07 Thread Mark Galeck
--- On Thu, 2/7/13, Michael Stahl wrote: > if the build system has generated a file, then it should be > able to > re-generate it if needed; that's its job.  Well, let's agree to disagree here, then. If you delete a crucial intermediate file without knowing what you are doing, then in my op

Re: implementing emake's #pragma multi in GNU make?

2013-02-08 Thread Mark Galeck
--- On Fri, 2/8/13, Michael Stahl wrote: > > [mark@grid003 ~]$ cat Makefile > > bar1: bar > >  touch $@ > > > > bar: foo > > foo : baz > >  touch foo bar > > [mark@grid003 ~]$ touch bar1 foo bar > > [mark@grid003 ~]$ touch baz > > [mark@grid003 ~]$ make bar1 > > touch foo bar > > touch bar1 > >

Re: implementing emake's #pragma multi in GNU make?

2013-02-08 Thread Mark Galeck
--- On Fri, 2/8/13, Gerhard Fiedler wrote: > Having to rely on "clean" builds when incremental builds > could do the > job just fine is IMO either an artifact of an insufficient > build system > or a result of a bug (or missing feature) in make. Gerhard, IMHO you are misinterpreting me. I am

Re: implementing emake's #pragma multi in GNU make?

2013-02-08 Thread Mark Galeck
Yes Michael, the exact solution I quoted, has a problem in the case you showed. Thank you for pointing this out and sorry for dragging this obvious case. But then of course, that's not what I am actually using :) I forgot. I do this, and I believe that is the correct solution to the "gapin

Re: implementing emake's #pragma multi in GNU make?

2013-02-11 Thread Mark Galeck
Thank you Gerhard, this is great that we have it clarified. So you want the users to be able to delete intermediate files, and I tell them " that is not supported". In your case, indeed GNU Make seems to be deficient. For me it's fine, although, Eric has a nice feature there, no question. In

Re: how to make dirs without races

2013-03-04 Thread Mark Galeck
rs without dup rules $(sort $(MAKE_DIRS)): mkdir $@ - Original Message ---- From: Mark Galeck (CW) To: "help-make@gnu.org" Well, OK, I tried this, but does not work deeper than 1 level of directories, I guess because the chain of implicit rules does n

Re: can make generate different file name depend on header file's define

2013-04-19 Thread Mark Galeck
Yes but it is not going to be very easy. There is a principle of good design in software engineering, that each piece of information should be defined in one place only, and then other users of that information get it from there. You want to define the name of your "out file" in your C code

Re: GNU Make: "calling" sub make with target

2013-04-26 Thread Mark Galeck
>make -f Makefile-unittests test. (...) >make -f Makefile (...) >a) The application build fails when the build of the tests fails. call Makefile-unittests recursively from Makefile, to do this: make a rule like this in Makefile: .PHONY: test test: $(MAKE) -f Makefile-unittests $@ But: I am as

Re: Rd: Using the same options for compiling and linking

2013-05-07 Thread Mark Galeck
> > Assigning to MAKEFLAGS only affects sub-makes, despite this (wrong) > paragraph from the documentation: > > MAKEFLAGS > The flags given to make. You can set this in the environment > or a makefile to set flags. See Communicating Options to a I disagree that this paragraph is wrong.

Re: Choosing where to build depending on the target(s)

2013-12-11 Thread Mark Galeck
The target-specific variables are only in effect in recipes, not in prerequisites and other targets, so the above won't work. You have to hack your own "target-specific" variable name, depending on the target, like this: mwb_DDI_SUFFIX := _mwb $(foreach goal, owb mwb, $(eval $(goal): ../../rootf

how to use a different /bin/sh with GNU Make?

2015-10-13 Thread Mark Galeck
Hello, as root, I replaced the default /bin/sh with a shell compiled by me with custom changes.  I expected GNU Make will use that shell by default , but it does not - it still uses the original /bin/sh (which was really bash) even though it is not there anymore. Why, and how to use a different

Re: how to use a different /bin/sh with GNU Make?

2015-10-13 Thread Mark Galeck
, and yes, it is /bin/bash on my machine too.   From: Tim Murphy To: Mark Galeck Cc: "help-make@gnu.org" Sent: Tuesday, October 13, 2015 2:55 AM Subject: Re: how to use a different /bin/sh with GNU Make? /bin/sh is a link to /bin/bash on my machine if you type echo $SH

Re: how to use a different /bin/sh with GNU Make?

2015-10-13 Thread Mark Galeck
I did some more experiments and this is bizarre... (to remind, I am not changing Make SHELL variable value, I am just manipulating the contents of /bin/sh hoping to get different behaviour) calling Make function $(shell) yes that does use the modified shellat the same time, recipe line invocation

Re: how to use a different /bin/sh with GNU Make?

2015-10-13 Thread Mark Galeck
pdated, so that meant, the current modified shell, was not interpreting any command.   From: Paul Smith To: Mark Galeck Cc: "help-make@gnu.org" Sent: Tuesday, October 13, 2015 5:02 AM Subject: Re: how to use a different /bin/sh with GNU Make? On Tue, 2015-10-13 at 04:3

Re: how to use a different /bin/sh with GNU Make?

2015-10-13 Thread Mark Galeck
f I can help it.   Is there another way to get massively recursive GNU Make system to accept a custom shell.   Thank you, Mark From: Paul Smith To: Mark Galeck Cc: "help-make@gnu.org" Sent: Tuesday, October 13, 2015 5:02 AM Subject: Re: how to use a different /bin/sh with GNU

Re: how to use a different /bin/sh with GNU Make?

2015-10-13 Thread Mark Galeck
>If you want to force make to always start a shell and never use the fast path the best way is to name your shell something else, like /bin/mgsh or something, then set make's SHELL variable to that path.  Since make is no longer sure if your shell is a POSIX shell, it will never use the fast path

Re: how to use a different /bin/sh with GNU Make?

2015-10-13 Thread Mark Galeck
>I assume this means that you can set it for the top-level make if there is only one top-level make, No I can't, the $(SHELL) variable is special and is not passed in the usual way.  You have to set it separately each time, or pass it every time on $(MAKE) recipe line.  

Re: how to use a different /bin/sh with GNU Make?

2015-10-13 Thread Mark Galeck
awned.  So please forgive me for believing in the literal word of the manual.  Again, thank you for pointing me how to hack this thing.  I really appreciate.   Mark From: Paul Smith To: Mark Galeck Cc: "help-make@gnu.org" Sent: Tuesday, October 13, 2015 5:42 AM Subject:

./configure Make sources runs, but compiled make segfaults - is this a bug?

2015-10-13 Thread Mark Galeck
Hello,  I have another question today... I change source of GNU Make a little (thank you Paul for the suggestion!).   I run ./configure then make (existing make) to build the changed sources.  But then >./make immediately segfaults... Yes this is some non-standard Linux system - a chroot jail in

Re: ./configure Make sources runs, but compiled make segfaults - is this a bug?

2015-10-13 Thread Mark Galeck
> Does the resulting make pass its regression tests ("make check" after you build it)?  If not, then likely there's some kind of environmental problem on your system.  If it does but fails on your makefiles, then likely there's a bug in 4.1 which is tickled by your makefiles. No any make invocat

Re: ./configure Make sources runs, but compiled make segfaults - is this a bug?

2015-10-13 Thread Mark Galeck
egfaulting, means the *nix system is messed up (despite that configure succeeds), then I will just use 3.81 there, it does compile and run.  I don't really need to fix that *nix system, it is just a temporary thing.   Thank you From: Tim Murphy To: Paul D. Smith Cc: Mark Galeck ; &qu

Re: how to use a different /bin/sh with GNU Make?

2015-10-13 Thread Mark Galeck
Subject: Re: how to use a different /bin/sh with GNU Make? On Tue Oct 13 12:16:48 2015, mark_gal...@pacbell.net (Mark Galeck) wrote: > I mean, I guess my big problem is this. > I have a massively GNU Make recursive system.  (Yes I know it is a bad thing; >  I did not write it myself).   &g

Re: ./configure Make sources runs, but compiled make segfaults - is this a bug?

2015-10-13 Thread Mark Galeck
But I can't spend time on it.   From: Tim Murphy To: Mark Galeck Cc: Paul D. Smith ; "help-make@gnu.org" Sent: Tuesday, October 13, 2015 12:03 PM Subject: Re: ./configure Make sources runs, but compiled make segfaults - is this a bug? Well, it could be a bug wit

Re: how to use a different /bin/sh with GNU Make?

2015-10-13 Thread Mark Galeck
yes somehow the simple assignment SHELL= on the top-level make comamnd line, does propagate.   Thank you! From: David Boyce To: Mark Galeck Cc: Reinier Post ; "help-make@gnu.org" Sent: Tuesday, October 13, 2015 12:23 PM Subject: Re: how to use a different /bin/sh with GNU Mak

Re: how to use a different /bin/sh with GNU Make?

2015-10-14 Thread Mark Galeck
g for 3.81, it did not work.  I can't use 4.1 because it segfaults for me.   Have to understand 3.81 code better... Thank you everybody for your help From: David Boyce To: Mark Galeck Cc: Reinier Post ; "help-make@gnu.org" Sent: Tuesday, October 13, 2015 12:23 PM Subje

Re: how to use a different /bin/sh with GNU Make?

2015-10-15 Thread Mark Galeck
That is great, thank you very much David!  Yes this seems to work so far :)  In fact I don't have to use //bin/sh .  I can just do ahead of time export MAKEFLAGS='SHELL=' From: David Boyce It may still be possible to work around these issues via e.g. the environment. MAKEFLAGS='SHEL

Re: how to use a different /bin/sh with GNU Make?

2015-10-15 Thread Mark Galeck
>Yes this seems to work so far :) In fact I don't have to use //bin/sh . I >can just do ahead of time export MAKEFLAGS='SHELL=' Until of course, some sub-makefile decided to change MAKEFLAGS internally... overriding the environment ___ Help-make ma

Re: how to use a different /bin/sh with GNU Make?

2015-10-15 Thread Mark Galeck
It's great Paul- thank you! Except, when I do your modification and compile Make, it then segfaults :) As my first boss, who was Hawaiian, would say "Auwe!". Well it looks like I will have to find out why it segfaults... or maybe try and avoid the "goto" and hope that maybe then the compi

Re: how to use a different /bin/sh with GNU Make?

2015-10-16 Thread Mark Galeck
Make 3.81 segfaults if "goto slow" is inserted just before line 2340: if (shell == 0) shell = default_shell; because then, the following line shell = default_shell; is not executed and shell is still 0 at (current) line 2710: bcopy(shell, ap, shell_len); The next suitable place to

Re: how to use a different /bin/sh with GNU Make?

2015-10-16 Thread Mark Galeck
Well, I know I am asking about 3.81 and I am sorry.  I don't have a choice, 3.81 is incompatible with 3.82 and forward and we are using 3.81 in that jail.   From: Tim Murphy To: Mark Galeck Cc: "psm...@gnu.org" ; "help-make@gnu.org" Sent: Friday, October 16,

Re: ./configure Make sources runs, but compiled make segfaults - is this a bug?

2015-10-16 Thread Mark Galeck
, the argument (ttyname (fileno (stdout))) has value 0 then this is expected to be a string that later that gets passed to xstrdup and that segfaults.   From: Tim Murphy To: Paul D. Smith Cc: Mark Galeck ; "help-make@gnu.org" Sent: Tuesday, October 13, 2015 11:04 AM Subject

Re: ./configure Make sources runs, but compiled make segfaults - is this a bug?

2015-10-16 Thread Mark Galeck
Thank you Dan, sorry for being so dumb but...  there is no "configure" script in there, what am I missing?? From: Dan Kegel Try getting the latest from git; see http://savannah.gnu.org/git/?group=make - Dan ___ Help-make mailing list Help

Re: ./configure Make sources runs, but compiled make segfaults - is this a bug?

2015-10-16 Thread Mark Galeck
Yes, I could have read the file README.git after getting the code from git - perhaps it is obvious that this is the file to read, well it was not obvious to me. From: Dan Kegel To: Mark Galeck Cc: Tim Murphy ; Paul D. Smith ; "help-make@gnu.org" Sent: Friday, October 16,

Re: ./configure Make sources runs, but compiled make segfaults - is this a bug?

2015-10-20 Thread Mark Galeck
Dan Kegel wrote: You may need this commit, which was after 4.1, if I read git history correctly: commit 292da6f6867b75a5af7ddbb639a1feae022f438f Author: Paul Smith Date: Mon Oct 20 01:54:56 2014 -0400 * main.c (main): [SV 43434] Handle NULL returns from ttyname(). Try getting the latest fr

Re: ./configure Make sources runs, but compiled make segfaults - is this a bug?

2015-10-20 Thread Mark Galeck
> configure.ac:45: warning: macro `AM_PROG_AR' not found in library > configure.ac:45: error: possibly undefined macro: AM_PROG_AR > If this token and others are legitimate, please use m4_pattern_allow. > See the Autoconf documentation. > autoreconf: //bin/autoconf failed with exit status: 1

Re: ./configure Make sources runs, but compiled make segfaults - is this a bug?

2015-10-20 Thread Mark Galeck
OK I was able to recompile Make 4.1 from git, successfully, without docs/translations as you have suggested. However, there may be a problem with the tests. Here is what I did for the record: install the latest version of gettext GNU package, in non-default location to overwrite the old insta

Re: how to use a different /bin/sh with GNU Make?

2015-10-21 Thread Mark Galeck
>All you have to do is change the list of UNIX shells to be empty: diff --git a/job.c b/job.c index 244def0..4b345b6 100644 --- a/job.c +++ b/job.c @@ -423,6 +423,7 @@ is_bourne_compatible_shell (const char *path)   ???  Forgive me, but I made the change to empty list of unix shell (to the git

how to (correctly) modify GNU Make so that separate shell is always spawned for each command

2016-04-15 Thread Mark Galeck
Hello, the GNU Make manual says  (...)executed by invoking a new sub-shell for each line of the recipe, unless the .ONESHELL special target is in effect (In practice, make may take shortcuts that do not affect the results.) Some time ago I was asking here for help in modifying the source of Mak

Re: how to (correctly) modify GNU Make so that separate shell is always spawned for each command

2016-04-15 Thread Mark Galeck
in the Make manual), but is not a valid shell variable, so the above construct might not work for GNU Make, period? I thought the above statement must NOT involve  shell at all, precisely because, it is not a valid shell variable.   Mark From: Paul Smith To: Mark Galeck ; "help

Re: how to (correctly) modify GNU Make so that separate shell is always spawned for each command

2016-04-15 Thread Mark Galeck
Well, I thought I did describe it.  I apologize if I was not clear. the output is Makefile1:1: VAR-Y (that is, the value is empty)  From: Philip Guenther To: Mark Galeck Cc: "psm...@gnu.org" ; "help-make@gnu.org" Sent: Friday, April 15, 2016 10:48 PM Subject: R

Re: how to (correctly) modify GNU Make so that separate shell is always spawned for each command

2016-04-15 Thread Mark Galeck
>       Except by explicit request, `make' exports a variable only if it is     either defined in the environment initially or set on the command line,     and ***if its name consists only of letters, numbers, and underscores.***     Some shells cannot cope with environment variable names consist

Re: how to (correctly) modify GNU Make so that separate shell is always spawned for each command

2016-04-16 Thread Mark Galeck
Make, which is different than the parent shell.   Mark From: Paul Smith To: Mark Galeck ; "help-make@gnu.org" Sent: Saturday, April 16, 2016 7:01 AM Subject: Re: how to (correctly) modify GNU Make so that separate shell is always spawned for each command On Sat, 2016-04-1

"generating prerequisites automatically" causes all *.d makefiles to be regenerated?

2009-10-19 Thread Mark Galeck (CW)
Hello, I read and implemented the guidelines in the section of the GNU Make manual "4.14 Generating Prerequisities Automatically". It works great, for each C source file, I have a corresponding .d file, which is also a makefile, generated, and all those makefiles are included in the main makef

how can gnu make return 2 and not show any errors?

2009-10-20 Thread Mark Galeck (CW)
Hello, How can it be - my gnu make is returning 2 but does not show any errors. I am using -include directive, but I checked and indeed, if make ignores errors because of -include, then it returns 0, as it should. So what else could it be? (I can't send you a short example, I can't find the

a really dumb question: why doesn't "echo %ERRORLEVEL%" work?

2009-10-31 Thread Mark Galeck (CW)
Hello, I RTFMd gnu make manual carefully, and all I found on how make executes commands, is that it just passes them to the shell, it does not know anything about how the shell executes them. OK, so I am on the Windows XP shell, and I have this makefile: foobar: echo %ERRORLE

RE: a really dumb question: why doesn't "echo %ERRORLEVEL%" work?

2009-10-31 Thread Mark Galeck (CW)
>I RTFMd gnu make manual carefully OK, apparently not carefully enough: 5.3.1 Choosing the Shell says, that /bin/sh will be used by default. If I am on DOS and gnu make is installed, then likely /bin/sh will be not the DOS shell! I should say: SHELL = CMD.EXE Sorry for the dumb question,

deleting the target if interrupted, does not work?

2009-11-01 Thread Mark Galeck (CW)
Hello, I have another question, this time I really don't want to look silly, so I really tried to grep the manual faithfully, and the only place that it says what happens when you try to kill make, is: 5.6 Interrupting or Killing make If make gets a fatal signal while a command is executing, it

RE: how to do recursive "subsystem" make properly?

2009-11-03 Thread Mark Galeck (CW)
>we would like some kind of message to the user, indicating that fact, such as >"nothing to be done for foobar". And that message has to be after the subdir >messages. Without that message, the user sees this: D:\tmp>make foobar make -C subdir make[1]: Entering directory `D:/tmp/subdir' make[

RE: how to do recursive "subsystem" make properly?

2009-11-03 Thread Mark Galeck (CW)
>The sentinel file has to be created: it has to exist. A non-existent file is always considered out of date. If it exists but then is not updated, THEN it is not considered out of date. Yes - I did have it created, and still it did not work, just like I explained. So, in my last message (be

RE: how to do recursive "subsystem" make properly?

2009-11-03 Thread Mark Galeck (CW)
>All I need is for this example above, to work. OOPS sorry I made a mistake quoting that example. The bottom makefile is wrong. Let me try again: Top makefile is foobar: | subsystem echo making foobar touch foobar subsystem: make -C subdi

RE: how to do recursive "subsystem" make properly?

2009-11-03 Thread Mark Galeck (CW)
>That said, if nothing needs to be remade, the effect of recursive make is to >simply run make several times - one for each sub-make - each of which do >nothing more than determine that nothing needs to be done. No, this is my point (I think). The top-level make, will not just "determine that

RE: how to do recursive "subsystem" make properly?

2009-11-03 Thread Mark Galeck (CW)
>Actually the sentinel is, IMO, an annoying implementation. Managing all those sentinel files is a PITA. If you're happy to require GNU make, I'd probably suggest going with order-only prerequisites (or else going all the way to non-recursive builds) as the most robust solution. OK, after tryin

RE: how to do recursive "subsystem" make properly?

2009-11-03 Thread Mark Galeck (CW)
t". So my workaround, was when building the targets, to use a temporary name, and then as the last operation, rename it to the correct target name. ) Mark -Original Message- From: Paul Smith [mailto:psm...@gnu.org] Sent: Tuesday, November 03, 2009 2:09 PM To: Mark Galeck (CW) Cc: Joh

how to do recursive "subsystem" make properly?

2009-11-03 Thread Mark Galeck (CW)
Hello, I see the following recommendation for a "subsystem" recursive make in the gnu make manual: subsystem: $(MAKE) -C subdir Well, I must not be understanding something, because this does not make (no pun) sense to me... The problem I have, is that the "subsystem" target as a

how to include dependencies only if includes changed

2009-11-08 Thread Mark Galeck (CW)
Hello, Suppose for each .c file such as foobar.c I have generated a makefile foobar.d file, that lists dependencies of foobar.o on files included in foobar.c. There are many .d files and each of them has many dependencies, so if I just blindly do -include $(OBJS:.o=.d) then it takes a lot

RE: how to include dependencies only if includes changed

2009-11-09 Thread Mark Galeck (CW)
> See http://make.paulandlesley.org/autodep.html for a good way to handle auto > dependencies in make. Using the methods described in the article, you will > only build dependencies when they are needed. Oh yes, Pete, I am very much aware of this article. In fact, I combined ideas from that ar

RE: how to do recursive "subsystem" make properly?

2009-11-09 Thread Mark Galeck (CW)
>Hi Paul, > prog: foosrc/libfoo.a > ...do something... > > foosrc/libfoo.a: FORCE > $(MAKE) -C foosrc > > FORCE: ; >Sorry if the answer is obvious, but I don't understand why "prog" isn't >simply always rebuilt, because libfooa is always updated. I

RE: how to include dependencies only if includes changed

2009-11-09 Thread Mark Galeck (CW)
>The time should be relative to number of total .h files (and I guess number of included files). Hmm, from what I see, what takes a long time, is all the lines from all the .o files, to read in all this stuff, is more that a million lines, then I guess make checks if any of those lines have an

full VPATH search followed even if prerequisites found in the first entry

2009-11-11 Thread Mark Galeck (CW)
Hello, The GNU make manual says: " In the VPATH variable, directory names are separated by colons or blanks. The order in which directories are listed is the order followed by make in its search." This does not work for me: I have a target that depends on several hundred prerequisites, and a

RE: full VPATH search followed even if prerequisites found in the first entry

2009-11-11 Thread Mark Galeck (CW)
Here is a boiled down example: Make a subdirectory foobar in your current directory, and put a file foo in there. The makefile is VPATH = \ foobar \ foobar \ foobar \ (... repeated 1000 times) foo: Now, if I type >make foo On my computer it takes 12 seconds! With VPATH reduced to one foo

RE: full VPATH search followed even if prerequisites found in the first entry

2009-11-11 Thread Mark Galeck (CW)
Here is another example. I thought that maybe make has some reason to search all those directories, so I concocted this example. We have 3 subdirectories, foobar , foobar1, foobar2, in foobar and foobar2 only there is a file foo. The makefile is: VPATH = foobar foobar1 foobar1 ... (foobar1 1

RE: full VPATH search followed even if prerequisites found in the first entry

2009-11-12 Thread Mark Galeck (CW)
Thank you Philip, I was already going to implement my own directory lookup, because "VPATH is not working". I will follow your suggestions. >Try doing a make with the -d option and pay close attention to the long list of patterns that make is applying to find the prerequisites for all the file

how to prevent make from considering included makefiles as targets?

2009-11-12 Thread Mark Galeck (CW)
Hello, When I include submakefiles with -include foobar I would like for make to just read the file if there is one, and do nothing otherwise. Do not consider "foobar" to be a target or anything else. Just read it if there is one, no other action. Bart Robinson wrote here that to get of ri

how to make not output anything for empty command target

2009-11-13 Thread Mark Galeck (CW)
Hello, I have a target with empty command .PHONY: foobar .SILENT: foobar foobar: ; When I do >make foobar make still says "nothing to be done". How do I arrange the target, so make does not say anything at all when it encounters it? Mark ___ Help-m

how to disable all checking of prerequisites

2009-11-13 Thread Mark Galeck (CW)
Hello, I have another, hopefully last one :), question on efficiency, to which the likely answer maybe "you can't do that". What I would want, is to set up a rule: foobar: foobar0 foobar1 foobar2 ... foobar1000 with no commands, all I want is to check, whether file foobar is older than any o

RE: how to disable all checking of prerequisites

2009-11-13 Thread Mark Galeck (CW)
Never mind, that is not really what is taking that 10 seconds here, sorry for bothering... From: help-make-bounces+mgaleck=brocade@gnu.org [mailto:help-make-bounces+mgaleck=brocade@gnu.org] On Behalf Of Mark Galeck (CW) Sent: Friday, November 13, 2009 6:15 PM To: help-make@gnu.org

RE: auto-dep cannot possibly work?

2009-11-14 Thread Mark Galeck (CW)
>I think your conclusions are a little strong here. Well yes, I am a perfectionist :) if a tool has a bug, even the smallest one, that cannot be fixed withing the realm of that tool, then I say it is a flawed tool. >Yes, it's true that IF someone adds a new header file that has the same nam

RE: how to disable all checking of prerequisites

2009-11-14 Thread Mark Galeck (CW)
> is that your performance problems lie elsewhere, other than make. Yes you are exactly right, in this case, I screwed up elsewhere. Checking a thousand files does not take that long. ___ Help-make mailing list Help-make@gnu.org http://lists.gnu.o

is it possible to have a prerequisite, which, when non-existent, causes make to ignore it?

2009-11-15 Thread Mark Galeck (CW)
I want to have a prerequisite file, which may or may not exist. If it exists, I want make to behave as normal. If it does not exist, I want make to ignore that prerequisite. Is it possible? I tried foobar: foo touch foobar foo: but here if foo does not exi

RE: auto-dep cannot possibly work?

2009-11-15 Thread Mark Galeck (CW)
Well, thank you for mentioning this David, I will try and work with it. There is a problem, in that you could have #include "../foobar.h" But let me try and see what can be done. ___ Help-make mailing list Help-make@gnu.org http://lists.gnu.org/m

RE: auto-dep cannot possibly work?

2009-11-15 Thread Mark Galeck (CW)
>In other words, generate an additional dependency on the DIRECTORIES in the search path. This works exactly as desired (I think): it triggers a rebuild whenever a file is added to or deleted from a directory on the path, Well, no, I can't do that. The developers will kill me if I do this :) I

RE: auto-dep cannot possibly work?

2009-11-15 Thread Mark Galeck (CW)
Paul wrote: >Yes, it's true that IF someone adds a new header file that has the same name as an existing header file, and IF that new header file appears in a directory that is before the existing header directory on the -I list for the compiler, and IF the addition of that header file does not req

RE: auto-dep cannot possibly work?

2009-11-15 Thread Mark Galeck (CW)
>So the "solution" I settled on, is, I checked, that currently in our system no >file depends on two include files with the same name. Then I will not use >full-path include dependencies, but only file names: foobar.o: foobar.h foo.h Then vpath is split off into a separate makefile, included in

RE: auto-dep cannot possibly work?

2009-11-15 Thread Mark Galeck (CW)
>OK, there is one problem! What if a particularly clever developer, decides to >not "copy" or make a new file with the same name as the old one "foobar.h". >But instead, if he does >mv include1/foo.h include1/foobar.h Well, I think this is not my problem, but the develo

RE: auto-dep cannot possibly work?

2009-11-15 Thread Mark Galeck (CW)
> If you mv a file, all files which included the old name must be edited, and therefore also rebuilt. --- No, no, it is not foobar.h that is moved. include/foobar.h is included. We would prepare a new header file, long time ago, with the name include1/foo.h. And now we >mv include1/foo

RE: auto-dep cannot possibly work?

2009-11-15 Thread Mark Galeck (CW)
Paul, I appreciate greatly your detailed response and I am very grateful that you help me in this and other queries. I am right now wearing my C hat and I don't have time to exactly see if and where I might have gone wrong. Please forgive me, I will check tomorrow. But maybe I can just show y

RE: auto-dep cannot possibly work?

2009-11-16 Thread Mark Galeck (CW)
Well, I promised not to argue anymore about whether it is bizarre or not so I will have to uphold my promise unless you release me from it :) I would still have to tell developers "if you do this bizarre thing, then rebuild everything", and they would have to check your IFs, let's say I agree

RE: auto-dep cannot possibly work?

2009-11-16 Thread Mark Galeck (CW)
>So, they are going to add a new header file to this directory. Now EVERY source file that used to include /include1/config.h, and worked fine and expected that, will start using /include/config.h the next time it's compiled. >If you have reasonably common situations that meet the criteria, plea

RE: auto-dep cannot possibly work?

2009-11-16 Thread Mark Galeck (CW)
>Mark, I applaud your goal of trying to get make to behave properly in all cases. However, once you have the -I paths knocked out, does your approach also work for -L and libraries? What about for programs that aren't gcc? What happens when you have a Makefile that builds libfoo.a, but you realize

RE: auto-dep cannot possibly work?

2009-11-16 Thread Mark Galeck (CW)
>I guess here I don't see what the difference is between libraries and headers. Surely someone could put a generic sounding "libutil.a" earlier in the library search path. Though probably less likely, you can rely on the user in one case but not the other? I always rely on the user, both in case o

RE: auto-dep cannot possibly work?

2009-11-16 Thread Mark Galeck (CW)
>Are you kidding me? You BETTER darn well know. Otherwise, your code >You guys are talking about an environment that FACILITATES bad coding practices and ENABLES difficult, time-wasting bugs. Oh C'mon Paul, I told you many times, I _do_not_ like multiple source files of the same name, and I a

RE: auto-dep cannot possibly work?

2009-11-17 Thread Mark Galeck (CW)
>In fact, the extra $(wildcard ...) statements have no impact, for good or ill, on the remove/rename issue. Unless I've confused something again. OK, the explanation is not for you Paul - you are the expert :) just a detailed explanation for other newbies like myself who might stumble upon this.

how to tell the "current goal"?

2009-11-22 Thread Mark Galeck (CW)
Hello, I can use, from inside the makefile, the variable MAKECMDGOALS to find out the list of goals specified on the make command line. But how do I find out which goal from that list is the one that is being made currently? Mark ___ Help-make mailin

RE: how to tell the "current goal"?

2009-11-22 Thread Mark Galeck (CW)
>There is no way, unless you want to do something like add an extra recursion. Oh I see, thank you Paul, that maybe what I need to do then. ___ Help-make mailing list Help-make@gnu.org http://lists.gnu.org/mailman/listinfo/help-make

how to output newline at the end of making a target (on Windows)

2009-11-29 Thread Mark Galeck (CW)
Hello, SHELL=cmd.exe foobar: @echo. gives me: C:\tmp>make foobar process_begin: CreateProcess(NULL, echo., ...) failed. make (e=2): The system cannot find the file specified. make: *** [foobar] Error 2 However, I do use "echo." process all the time on Windows, just outputting to

RE: how to output newline at the end of making a target (on Windows)

2009-11-29 Thread Mark Galeck (CW)
Oh I see, I thought it must be a "real command", since it worked with the redirection. Seems like my problem was, I did not know about the "fast path processing" - I don't see this in the manual, where should I look for this information? Thank you very much! Mark

RE: how to output newline at the end of making a target (on Windows)

2009-11-29 Thread Mark Galeck (CW)
Hmm, are you saying I should report a bug? > If it's visible to the user, as it is in this case, then there's a bug in the fast path processing. ___ Help-make mailing list Help-make@gnu.org http://lists.gnu.org/mailman/listinfo/help-make

is this a bug?

2009-12-03 Thread Mark Galeck (CW)
>make.exe -r make.exe: Interrupt/Exception caught (code = 0xc0fd, addr = 0x4227d3) ___ Help-make mailing list Help-make@gnu.org http://lists.gnu.org/mailman/listinfo/help-make

RE: is this a bug?

2009-12-04 Thread Mark Galeck (CW)
Well, I found what was causing this. I attempted to call the $(wildcard ... function, with about 50,000 arguments (full path names, on average 100 characters, so the total size of all strings that were passed to wildcard, is about 5MB). Is this a bad idea? :) >make.exe -r --version GNU M

RE: is this a bug?

2009-12-04 Thread Mark Galeck (CW)
>If you're then passing that wildcard list to a program, you could very well be >exceeding the maximum argument length limit of your shell. No, I isolated this so there is nothing else, only foobar: \ $(wildcard \ \ \ (... 5 file paths, average 100 characters each) \ ) And then >make

RE: is this a bug?

2009-12-04 Thread Mark Galeck (CW)
>Probably we use alloca, and this blows up the stack. 50K file names 100 characters each is about 0.5MB. No... 5MB, I checked the size of the whole thing it's about 5MB. ___ Help-make mailing list Help-make@gnu.org http://lists.gnu.org/mailman/list

do formats of vpath and auto variable file names always agree?

2009-12-06 Thread Mark Galeck (CW)
Hello, It says in the manual: $< The name of the first prerequisite Is it guaranteed that, if vpath is used, then the directory part of the value of $< is in fact, one of the vpath paths? (it could be, that the value of $< were an absolute path for example, while vpath paths are

behavior on Win depends on whether \ or / is used??

2009-12-09 Thread Mark Galeck (CW)
Hello, this is a Windows question, I have 2 subdirectories foobar0 and foobar1, and only in foobar1 there is a file foobar.s . There is no file foobar.o . The makefile is: SHELL=cmd.exe vpath %.s .\foobar0 .\foobar1 %.o : %.s echo $< foobar0\foobar.s

RE: behavior on Win depends on whether \ or / is used??

2009-12-09 Thread Mark Galeck (CW)
Here's another example, now this one is just terrible, I spent several hours tracking down this problem: Again, 2 subdirectories foobar0 and foobar1, and only in foobar1 there is a file foobar.s . There is no file foobar.o . The makefile is: SHELL=cmd.exe vpath %.s .\foo

was: RE: auto-dep cannot possibly work?

2009-12-11 Thread Mark Galeck (CW)
Hello, this is about a thread that was here a while ago, where I argued that some "bizarre" cases should be taken care of by auto-dependency generation. I want to say, that after chasing this wild goose for a while, I came to understand that it is not feasible in principle to cover the case o

  1   2   3   >