Re: Compile group of modules

2006-10-17 Thread Paul Smith
On Tuesday, 17 October, Ken Smith ([EMAIL PROTECTED]) wrote: > > clean_all: $(MODULES) > > $(foreach MOD,$(MODULES),make -C $(MOD) clean;) You should always, always use $(MAKE) in your rules to invoke a sub-make, NEVER plain "make". > > The problem is that for win32 systems, semicolon is inv

Re: Re: GNU Make Question

2006-11-04 Thread Paul Smith
On Saturday, 4 November, Ken Smith ([EMAIL PROTECTED]) wrote: > > >> Can I use ifeq/ifneq in define block? You've always been able to use them in a define, but they have always (and still are) only evaluated when the defined variable is expanded, not when it is created. So, they can only be used

Re: "no rule to make target" when target is a variable

2006-12-05 Thread Paul Smith
On Tue, 2006-12-05 at 20:19 -0500, Brendan Bridgford wrote: > I'm trying to use a variable as a target without much luck. > .PHONY = foobar > foobar : a = foo > foobar : b = bar > c=$(a)$(b) > > When I invoke > >make foobar > > ... it returns: > make: *** No rule to make target `foobar'. Stop

Re: Improvement on parallel make

2006-12-10 Thread Paul Smith
On Mon, 2006-12-04 at 22:17 +0100, Christophe Lyon wrote: > Following a thread earlier this year > (http://lists.gnu.org/archive/html/help-make/2006-04/msg00014.html), I > have decided to work myself, and I propose a patch as attached to this > email. Thanks Christophe! I'll definitely take a lo

Re: Improvement on parallel make

2006-12-11 Thread Paul Smith
Hi all; This thread is very interesting and I'm saving all the emails for a more careful study. However, can I request that everyone REMOVE the [EMAIL PROTECTED] address from the thread? That list doesn't exist; it's just an alias for [EMAIL PROTECTED] You can use either one, but if you use bot

Re: Improvement on parallel make

2006-12-11 Thread Paul Smith
On Mon, 2006-12-11 at 19:50 -0500, Paul Smith wrote: > For some examples of what I mean, see this thread: > > http://www.mail-archive.com/help-make@gnu.org/msg05599.html > > These aren't "real world" examples, but they illustrate the problem. Here's anot

Re: Improvement on parallel make

2006-12-12 Thread Paul Smith
On Tue, 2006-12-12 at 13:08 +, Brendan Heading wrote: > > Dotting the i's: the problem I was originally trying to solve > > with .WAIT was concurrent access to an archive file. Thus, I'd be > > happy to see any of the serialization means: .MUTEX, .WAIT - > > whatever. I just chose .WAIT bec

Re: Improvement on parallel make

2006-12-12 Thread Paul Smith
On Tue, 2006-12-12 at 14:23 +, Brendan Heading wrote: > > There's one major disadvantage to this model: the .o's can no longer be > > considered intermediate files. That means they cannot be removed after > > being added to the archive. > I see. I don't use Make this way but if there is a s

Re: Improvement on parallel make

2006-12-12 Thread Paul Smith
On Tue, 2006-12-12 at 14:03 +, Brendan Heading wrote: > > Sure, it's not difficult to replace > > all: all-subdir all-local > > by > > all: > >$(MAKE) all-subdir > >$(MAKE) all-local > BTW your example won't build those two targets in parallel, even if parallel > compilation is poss

Re: Improvement on parallel make

2006-12-12 Thread Paul Smith
On Tue, 2006-12-12 at 01:15 -0700, Philip Guenther wrote: > The desire in that example is to just write _this_ makefile: > >local_objects = a.o b.o c.o d.o >all: all-recursive .WAIT all-local >all-recursive: > $(MAKE) -C subdir all >all-local: $(local_objects) > So, one o

Re: Makefile doing strange things - help

2006-12-28 Thread Paul Smith
On Tue, 2006-12-26 at 00:38 -0800, Nirusha & Dushara Jayasinghe wrote: > %.d: $(@:$(OBJ)/%.d=$(SRC)/%.c) I don't know about the exact symptoms you're seeing but this rule is wrong. You cannot use $@ in a prerequisite list: that is an automatic variable and automatic variables only have a value i

RE: Existing file does not exist?!?

2007-01-02 Thread Paul Smith
On Tue, 2007-01-02 at 20:35 +, Dave Korn wrote: > On 02 January 2007 20:16, Hiebert, Darren (MS) wrote: > > Under what circumstances can a file be reported by make as not existing > > when it does exist? > When it doesn't exist in the directory(ies) that make is searching in for > it. Anoth

Re: How to create "re-entrant" makefiles?

2007-01-02 Thread Paul Smith
On Wed, 2007-01-03 at 01:48 +, David Wuertele wrote: > MY_VAR := one > include variabletest.mk > > MY_VAR := two > include variabletest.mk > > variabletest.mk > --- > $(MY_VAR): > echo $(MY_VAR) > $(MY_VAR) > > all: $(MY_VAR) As Mike points out, target-specific variables

RE: Existing file does not exist?!?

2007-01-03 Thread Paul Smith
On Wed, 2007-01-03 at 07:11 -0800, Hiebert, Darren (MS) wrote: > I found the reason make is reporting the file as non-existent. It is > because the target file is declared .PHONY. For whatever reason, make > treats (or reports) such files as if they never exist, rather than as a > separate class of

Re: Make dependency using gcc??

2007-01-08 Thread Paul Smith
On Mon, 2007-01-08 at 19:11 +0530, Geraldin Arthy wrote: > Actually I'm very confused now.When I use the gcc -MD option it > compiles and redirects the outout to .d files.But when a modify any > hearder file specified in the .d file it doesn't recompile at > all.Could you please help me out to fix

RE: Existing file does not exist?!?

2007-01-08 Thread Paul Smith
On Mon, 2007-01-08 at 19:49 +, Dave Korn wrote: > Say, I may have just run into something similar. Is this directory cache > used when evaluating $(wildcard ...) by any chance? Yes. It's used for all file lookups. > And is it perhaps not > flushed after recursively invoking a sub-make?

Re: Help needed writing a rules.

2007-01-09 Thread Paul Smith
On Mon, 2007-01-08 at 14:37 +0100, Pelle Svensson wrote: > src-files := A/foo.c A/bar.c > dst-files := B/foo.c B/bar.c > > all: $(dst-files) > > $(dst-files) : $(src-files) > mkdir -p $(dir $@) > cp -l $< $@ Yeah, that won't do what you want. A rule like this: a b c d : e f g h

Re: Listing the targets defined in a makefile

2007-01-09 Thread Paul Smith
On Mon, 2007-01-08 at 15:10 +0200, Ville Laurikari wrote: > Hi, > > I'd like to automatically apply some target specific variables and > order-only prerequisites to targets defined in makefiles. Is there a > magic variable or function to get a list of all targets defined in a > particular makefi

Re: Listing the targets defined in a makefile

2007-01-09 Thread Paul Smith
On Tue, 2007-01-09 at 08:54 -0500, Paul Smith wrote: > Unfortunately, do to a quirk of the parser in GNU make s/do/due/ Good grief. I definitely need to stop emailing before my tea. -- --- Paul D. Smith <

Re: Suppress warnings about overriding commands

2007-01-09 Thread Paul Smith
On Tue, 2007-01-09 at 11:47 -0800, Vincent Castellano wrote: > Hello, > > I was wondering if there is any method to suppress the following type > of messages: > > Makefile:98: warning: overriding commands for target `lib' > Makefile:50: warning: ignoring old commands for target `lib' > Makefile:9

Re: creating directories through dependency

2007-01-10 Thread Paul Smith
On Tue, 2007-01-09 at 16:21 +0100, John Graham-Cumming wrote: > Dave Korn wrote: > > BTW, if you ever revise it, I noticed one minor omission in the > > discussion of using the -p option to mkdir: as well as building a > > whole path in one go, it also prevents mkdir from erroring out if the > > de

Re: multiple assignments on one line?

2007-01-18 Thread Paul Smith
On Thu, 2007-01-18 at 09:48 +, Alexis Huxley wrote: > So, now the question: Is there a way to either: > > 1) prevent $(shell ...) from making the newline to > space substitution, or > > 2) pack multiple assigments onto one line without > later assigments being

Re: make from within a PHP script?

2007-01-24 Thread Paul Smith
On Tue, 2007-01-23 at 19:58 +, [EMAIL PROTECTED] wrote: > Hi, > I've created a small makefile in which I redirect grep's output > to create the target. > > The problem arises when using PHP's exec function to issue make > on the makefile; it seems to break the redirection of grep's > output to

RE: Prerequisite ordering - make 3.81

2007-01-28 Thread Paul Smith
On Tue, 2007-01-23 at 12:11 +, Dave Korn wrote: > On 22 January 2007 15:09, Daniel Thom wrote: > > As long as the 'target:' line with the "This operation is important. . ." > > statement comes *BEFORE* 'target: two' the behavior is as shown above. If > > it is below 'target: two' both version

RE: makedepends and implicit rule

2007-01-31 Thread Paul Smith
On Wed, 2007-01-31 at 10:22 +, sharan basappa wrote: > >Make has an implicit "%.o : %.c" rule. Look in the make info file, > >section 10.2 "Catalogue of Implicit Rules". > > The question I was asking how make decides to compile even though I > dont have a rule of the form > *.o : *.c > The

Re: Parallel make not working the way I expect...

2007-02-10 Thread Paul Smith
On Fri, 2007-02-09 at 23:54 +, David Wuertele wrote: > > Choice 2) use a pattern rule with multiple targets so that make knows > > that one command builds all of them. You should arrange for the files > > to have names that follow some sort of pattern (all have the same > > prefix, of suffix,

Re: ordering the targets

2007-02-10 Thread Paul Smith
On Fri, 2007-02-09 at 04:44 -0800, Bhargava wrote: > hi, > i want to define two variables JSOURCES and JFLEX_SOURCES in my > makefiles and compiles corresponding sources . Thing is i get the targets > like this > > targets += (edited JSOURCES) #edited in the sense i append .class etc., > >

Re: ordering the targets

2007-02-14 Thread Paul Smith
On Wed, 2007-02-14 at 09:31 +0530, Bhargava Ram wrote: Please CC the help-make mailing list on all email. > Thanks for the help, but i think simple expansion won't help me. In my > case i will add a variable to target like this : >ABC = >TARGET := $(ABC)

Re: Bizarre "missing endif"

2007-02-14 Thread Paul Smith
Strange; I sent this yesterday (it's in my Sent folder) but it never showed up on the mailing list... here it is again: On Tue, 2007-02-13 at 11:59 -0600, David Greene wrote: > I'm trying to construct a system that reinvokes make 3.81 if > make 3.80 is initially used to attempt a build. I've att

Re: Improvement on parallel make

2007-02-15 Thread Paul Smith
On Wed, 2007-02-14 at 10:21 +0100, Christophe Lyon wrote: > No reply? No interest in this new feature? > Given the amount of discussion we had in december 2006, I thought that > the patch I proposed could help many people. > Any plan? Hi Christophe... Sorry for the delay; I've been shoveling sno

Re: Bizarre "missing endif"

2007-02-15 Thread Paul Smith
On Tue, 2007-02-13 at 11:59 -0600, David Greene wrote: > I'm trying to construct a system that reinvokes make 3.81 if > make 3.80 is initially used to attempt a build. I've attached > a testcase showing the general structure. > > Make 3.80 complains about a missing endif. Why? This is a bug in

Re: $(shell ...) exit status

2007-02-21 Thread Paul Smith
On Wed, 2007-02-21 at 01:18 -0500, David Boyce wrote: > How does one determine the exit status of the shell forked by $(shell > ...)? I see nothing about it in the 3.81 online manual. The short answer is that there's no way to retrieve the exit code via make itself. Others have mentioned things l

Re: $(shell ...) exit status

2007-02-21 Thread Paul Smith
On Wed, 2007-02-21 at 10:09 +, Greg Chicares wrote: > The command fails, and 'make' stops--on msw, e.g., I get: > > process_begin: CreateProcess(NULL, false, ...) failed. That must be a bug in the MSW version of GNU make. On a POSIX system there is no message or error if the command invoke

Re: How does the Dependency Build Graph get build?

2007-02-24 Thread Paul Smith
On Fri, 2007-02-23 at 07:38 -0800, Jochen wrote: > Software needs to get build. This software is also > depending on other software, that first needs to be > build. Now I want to build a Depency Graph that tells > me what to build first. > > I know make does this, but I can't find HOW it does > t

Re: parallel make issue with archive members

2007-03-08 Thread Paul Smith
On Thu, 2007-03-08 at 01:03 -0600, John Doe wrote: > I am using make 3.81 and I am using the following make rule to put > object files into an archive: > > $(ARCHIVE) : $(CXX_OBJS) > echo $?; \ > cd $(DEST); \ > $(AR) $(ARFLAGS) $(ARCHIVE) $? > > where archive is a ".a" file and CXX_O

Re: make does not stop when a command returns an error

2007-03-08 Thread Paul Smith
On Thu, 2007-03-08 at 20:26 +0100, Torsten Mohr wrote: > Hi, > > i think i need to track this down a bit further, but can anybody > see why "make" should continue to go even when i call a perl > script in a rule and that script does an "exit(-1)" ? > > In front of that rule i don't have any "-".

Re: Target specific variable settings used in target prerequistes ?

2007-03-14 Thread Paul Smith
On Wed, 2007-03-14 at 08:24 -0700, Frazer Worley wrote: > We're trying use variable settings defined in a target specific rules > within the target's prerequisite list. It doesn't appear that > the variables settings are actually valid/applied until the body of > the target - the command section.

Re: Target specific variable settings used in target prerequistes ?

2007-03-15 Thread Paul Smith
On Thu, 2007-03-15 at 17:40 -0700, Frazer Worley wrote: > I got a solution working with eval ... altough it appears to be overly > complex: Please be sure to CC the mailing list on discussions. Thanks! Also, please try to find a way to keep your mail client from reformatting code samples, otu

Re: Preventing Make from "expanding" a variable ?

2007-03-22 Thread Paul Smith
On Wed, 2007-03-21 at 23:17 -0400, Frazer Worley wrote: > > We work in configuration management areas which is identifed using the > $WORKSPACE environment variable. > > eg WORKSPACE= /prj/qct/qctps/eng_dev/workspaces/fworley/devel/axi_ws > > All files specified in the Makefile are thus relat

Re: Suggestion of implementing a feature for the next Google Summer of Code.

2007-03-22 Thread Paul Smith
On Tue, 2007-03-20 at 12:49 +0100, Ramón García wrote: > I am interested in implementing feature request of GNU make (which I > wrote) http://savannah.gnu.org/bugs/?18617 about enhancing debugging > capabilities, in order to make it easier to understand how makefiles > written by others work. This

RE: Suggestion of implementing a feature for the next Google Summer ofCode.

2007-03-22 Thread Paul Smith
On Wed, 2007-03-21 at 10:52 +, Dave Korn wrote: > perhaps it might be possible to get a concensus behind merging > remake's added functionality into mainline GNU make? > > Paul (PING!), have you and Rockyb (remake maintainer) ever had > discussions along these lines? We had discussions about

Re: Make doesn't bail on compile errors

2007-03-27 Thread Paul Smith
On Mon, 2007-03-26 at 16:13 -0500, Michael L Brown wrote: > A side note before I go and describe the Makefile layout... When the > linking is done, the failure that occurs in there does cause the whole > process to fail. There must be more going on here that hasn't been shown. I can't see offhan

Re: 'Unexpected end of line seen' error while building CSSL using GNU make.

2007-04-04 Thread Paul Smith
On Thu, 2007-04-05 at 03:11 +0530, Swaroop Sugunan wrote: > # /export/meta/make3.79.1/make-3.79.1/make nodeps:=yes 64bit:=yes product > make nodeps:=yes prd > make: Fatal error in reader: Makefile, line 12: Unexpected end of line seen Greg is exactly right. This message is not being emitted by G

RE: 'Unexpected end of line seen' error while building CSSL using GNU make.

2007-04-04 Thread Paul Smith
On Thu, 2007-04-05 at 05:34 +0530, Swaroop Sugunan wrote: > We have tried by installing the gmake as given in the "INSTALL" file. That's fine, but why not try to fix your makefiles to work correctly, by using $(MAKE) instead of "make"? Then you won't need to do any of this. > This installed the

Re: VPATH as a pattern variable

2007-04-05 Thread Paul Smith
On Thu, 2007-04-05 at 13:12 -0400, Martin DAnjou wrote: > I do not understand why I get "no rule to make target" with this > makefile: > d_%.v: VPATH=src_dir VPATH settings in target-specific variables are not currently valid. I believe there was an enhancement request about this at one point, b

Re: can I create dynamic variables?

2007-04-07 Thread Paul Smith
On Sat, 2007-04-07 at 11:02 +0300, mickey n wrote: > Hi All, > > I wish to create variables based on other variables which are given > from an included file by pattern. > something like (lets assume VAR1 and VAR2 are included from a conf > file): > > VAR1 = A > VAR2 = B > > VARS = VAR* > > > I

Re: Multiple targets generated by one rule

2007-04-10 Thread Paul Smith
On Mon, 2007-04-09 at 16:20 -0700, Ben Wilhelm wrote: > a b c d: source.flag >@true > > source.flag: source >( touch source.flag && blackbox_generate a b c d ) \ > || ( rm -f source.flag && false ) # eugh > > but this is horribly ugly, although it does work. (I think the @true is

Re: Tricky problem filtering out commas from a string.

2007-04-19 Thread Paul Smith
On Thu, 2007-04-19 at 13:15 +0100, Dave Korn wrote: > The obvious first approach - escape the comma so that filter-out doesn't > think it's the separator between its two arguments - just doesn't work. I > can't quite see how to achieve this in make Using backslashes as an escape character in

Re: Variable assignment that depends on a generated target

2007-04-24 Thread Paul Smith
On Wed, 2007-04-25 at 00:00 +, David Wuertele wrote: > I thought of that, but I also want to have another target use the\ > VERSION variable: > > /path/to/some/other/target-$(VERSION).img: $(dependencies); touch > $ > > The problem is that VERSION isn't getting set in time. I want to > creat

Re: Variable assignment that depends on a generated target

2007-04-25 Thread Paul Smith
On Wed, 2007-04-25 at 06:27 +0300, Eli Zaretskii wrote: > How about > > VERSION := $(shell make /path/to/some/file && grep VERSION > /path/to/some/file) This will work, but I prefer the include version I mentioned earlier. Also note you should always use $(MAKE), never "make", when invoking a s

Re: Variable assignment that depends on a generated target

2007-04-25 Thread Paul Smith
On Wed, 2007-04-25 at 21:25 +0300, Eli Zaretskii wrote: > > From: Paul Smith <[EMAIL PROTECTED]> > > Cc: David Wuertele <[EMAIL PROTECTED]>, help-make@gnu.org > > Date: Wed, 25 Apr 2007 09:12:34 -0400 > > > > > VERSION := $(shell make /path/to/some/f

Re: linking at run time problem

2007-05-04 Thread Paul Smith
On Wed, 2007-05-02 at 15:19 -0700, g-h-d wrote: > Your suggestion was correct: Thank you! > > g++ -o"testing_hal" ./main.o -Wl,-rpath,/usr/local/lib -lhal_base > > from what i read -L takes precedence over LD_LIBRARY_PATH (which i could not > get to work). how could i go about fixing the prob

Re: spaces in directory names vpath

2007-05-05 Thread Paul Smith
On Fri, 2007-05-04 at 23:18 -0400, Vin Shelton wrote: > Is it possible to include directory names containing spaces in vpath? No. In fact, GNU make in general cannot deal with either file or directory names that contain whitespace. There are other places besides VPATH where this will not work.

Re: Pruning of dependencies

2007-05-11 Thread Paul Smith
On Tue, 2007-05-01 at 08:41 -0700, Hiebert, Darren (MS) wrote: > What are the reasons that dependencies are pruned when evaluating > whether to build a target? Hi Darren; Pruning happens when make thinks that it has already evaluated those targets and determined that they are not rebuildable, AND

Re: Regarding running shell script from Makefile

2007-05-11 Thread Paul Smith
On Fri, 2007-05-11 at 07:15 -0700, gshejin wrote: > I am having a scenerio where in I have to execute a shell script from > the Makefile. If I am exporting the path where the shell script is > located in the PATH variable and then run the make the script get's > executed. But if i am not exporting

Re: NFS share time skew too great for Make

2007-05-11 Thread Paul Smith
On Fri, 2007-05-11 at 22:42 +, David Wuertele wrote: > I deploy a build system to many locations throughout the company, and these > locations are managed by diverse IT groups. A big problem is that the system > time on these build systems doesn't match the system time of the mounted NFS > fil

Re: Regarding running shell script from Makefile

2007-05-14 Thread Paul Smith
On Mon, 2007-05-14 at 03:02 -0700, gshejin wrote: > But, my requirement is to have the PATH defined in Makefile and then > just run the make mkp, which should execute the shell script and other > scritps which are there in /myhome/tools/bin. But I am encountering > the following error. > > /bin/sh

RE: Regarding running shell script from Makefile

2007-05-14 Thread Paul Smith
On Mon, 2007-05-14 at 13:20 +0100, Dave Korn wrote: > On 14 May 2007 12:30, Paul Smith wrote: > > > On Mon, 14 May 2007 11:52:59 +0100, Dave Korn wrote: > >> export PATH:=/myhome/tools/bin:$PATH > > > > This is not correct. You need to use the make variable $(

Re: On NFS, cp -a copies non-integer timestamp as integer timestamp?

2007-05-14 Thread Paul Smith
On Tue, 2007-05-15 at 02:50 +, David Wuertele wrote: > What I found was that the dependency (file being copied by cp -a) had > a non-integral mtime, but the target always had an integer mtime: > Can anyone explain why cp -a might copy the fractional portion of the mtime > *sometimes* but not o

Re: On NFS, cp -a copies non-integer timestamp as integer timestamp?

2007-05-14 Thread Paul Smith
On Tue, 2007-05-15 at 04:21 +, David Wuertele wrote: > Here's an example using gzip where the time gets truncated. This is a very > close reproduction of one of my actual problems --- I verified with strace > that > gzip is using only the NFS filesystem in question. Well, again, gzip is not

Re: On NFS, cp -a copies non-integer timestamp as integer timestamp?

2007-05-15 Thread Paul Smith
On Tue, 2007-05-15 at 23:32 +0300, Eli Zaretskii wrote: > > From: Paul Smith <[EMAIL PROTECTED]> > > > > You should report this as a bug to the gzip folks and hopefully they'll > > enhance gzip to support utimes(2) where available. > > Gzip already does t

Re: $(and) and $(or) not working

2007-05-16 Thread Paul Smith
On Wed, 2007-05-16 at 11:21 -0400, Noel Yap wrote: > I'm using the following: > > yapn:[EMAIL PROTECTED]:~/proj/aoeu> make --version > GNU Make 3.81beta4 I've seen a number of messages stating that people are using 3.81beta4; why are people still using a beta version over a year after the final v

Re: $(and) and $(or) not working

2007-05-17 Thread Paul Smith
On Thu, 2007-05-17 at 10:44 +0200, Martin Willers wrote: > Yes; 3.81beta4 is still the "current" version on Ubuntu 6.06.1 LTS. Hrm. Someone should file a bug. Plus, that version of Ubuntu came out more than two months after the official 3.81 release... it seems like someone could have found the

Re: gnu make problem

2007-05-17 Thread Paul Smith
On Thu, 2007-05-17 at 11:17 +0530, chandan wrote: > I am trying to build Microsoft visual c++ programs at the command line > using GNU MAKE. The msdn library says that If you have a project that > you build from the command line with a make file, then the Visual > Studio development environment wil

My website...

2007-05-21 Thread Paul Smith
Is currently unavailable due to a difference of opinion with my ISP as to whether I've already given them their money or not :-/. Hopefully this will be resolved shortly and the site will be back up again. Sorry for the inconvenience *sigh*. -- --

Re: how make concludes that target is out of date

2007-06-01 Thread Paul Smith
On Fri, 2007-06-01 at 11:21 +, sharan basappa wrote: > I would be glad if someone could point me to right documentation to > understand better Have you read the GNU make manual? You can find it online and/or available for download in various formats here: http://www.gnu.org/software/make/m

Re: Implicit rules

2007-06-04 Thread Paul Smith
On Mon, 2007-06-04 at 11:04 +, sharan basappa wrote: > Does make treat the rule : > > a : a.h as > > a : a.o a.h > a.o : a.c >$(CC) -c $(CPPFLAGS) $(CFLAGS) If there are implicit rules: %.o : %.c $(CC) -c $(CPPFLAGS) $(CFLAGS) % : %.o and there's no explicit rule for

Re: Dinamic paths

2007-06-07 Thread Paul Smith
On Thu, 2007-06-07 at 00:56 -0600, Karl Hegbloom wrote: > On Tue, 2007-06-05 at 10:26 +0100, Manuel Preliteiro wrote: > > OCAMLC = ocamlc > > OCAMLIBS = $(OCAMLC) -where > You can probably do it without resorting to use of the 'shell' function. > Grep the info documentation for 'eval', 'computed n

Re: Preventing variables from being passed to a sub-make

2007-06-07 Thread Paul Smith
On Wed, 2007-06-06 at 17:29 +0100, Will Newton wrote: > I'm having problems stopping make from passing variables passed on the > command line to a sub-make. I think it's very, very unwise to break this capability, personally. I would rather change your top-level makefile to use some different va

Re: Preventing variables from being passed to a sub-make

2007-06-07 Thread Paul Smith
On Thu, 2007-06-07 at 13:53 +0100, Will Newton wrote: > On 6/7/07, Paul Smith <[EMAIL PROTECTED]> wrote: > > On Wed, 2007-06-06 at 17:29 +0100, Will Newton wrote: > > > > > I'm having problems stopping make from passing variables passed on the > > > comm

Re: Why make complains though implicit rule is present ..

2007-06-08 Thread Paul Smith
On Fri, 2007-06-08 at 11:10 +, sharan basappa wrote: > ifneq "$(MAKECMDGOALS)" "clean" > include $(dependencies) > endif > > %.d: %.c > $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -M $< | \ > $(SED) 's,\($(notdir $*)\.o\) *:,$(dir $@)\1 $@: ,' > [EMAIL > PROTECTED] >

Re: Why make complains though implicit rule is present ..

2007-06-08 Thread Paul Smith
On Fri, 2007-06-08 at 13:01 +, sharan basappa wrote: > Must remake target `dir1/print2dir1.d;'. > make: *** No rule to make target `dir1/print2dir1.d;'. Stop. Whoops, I didn't even notice this. Your problem is you have a ";" at the end of the filename. Your filename is dir1/print2dir1.d; no

Re: Why make isn't running linker

2007-06-12 Thread Paul Smith
On Tue, 2007-06-12 at 10:32 +, sharan basappa wrote: > all: > include dir1/dir1.mk > > objects := $(subst .c,.o,$(sources)); > > .PHONY : all > > all : main > > main : main.o $(objects) > Must remake target `main'. > Successfully remade target file `main'. This means that there IS

RE: One error to run gnumake

2007-06-12 Thread Paul Smith
On Tue, 2007-06-12 at 01:39 +0100, Dave Korn wrote: > On 11 June 2007 06:08, Yikai Cao wrote: > > > Hi: > > > >I got the following errors when running "gnumake place": > > > > # Command: > > /bin/sh: syntax error at line 1: 'end of file' unexpected > > gnumake: *** [place] E

Re: searching for a comman with $(findstring)

2007-06-18 Thread Paul Smith
On Mon, 2007-06-18 at 03:40 -0400, Mike Frysinger wrote: > is it possible to search for a comma using $(findstring) ? i tried > escaping it with no luck :( You have to use a variable, like this: COMMA := , Now you can use that anywhere you want to search for a comma: echo $(fin

Re: targets in subdirectories

2007-06-20 Thread Paul Smith
On Wed, 2007-06-20 at 06:29 -0700, kilgore trout wrote: > When the commands are echoed to the console, $@ expands to CAN_init.o > rather than c:/ashell/trunk/ashell/build_dir/CAN_init.o (where > $(BUILD_DIR) is c:/ashell/trunk/ashell/build_dir ). So that the > compiler output is put in the local

Re: how to instruct gmake to read included fragmented makefiles paralally..

2007-06-21 Thread Paul Smith
On Thu, 2007-06-21 at 11:36 +0530, Divakar Venkata (divvenka) wrote: > Here, is there a way to instruct gmake to read these fragmented > makefiles paralally and create dependency graph..? I agree with Philip; I'd be surprised if the actual parsing of the makefiles was causing much slowdown. The m

Re: $(foo) vs $(call foo)

2007-06-27 Thread Paul Smith
On Wed, 2007-06-27 at 13:19 +0200, Stephan Beal wrote: > The question is, then: is there a real difference between > $(my-macro) and $(call my-macro) if my-macro is not defined to use > positional arguments (i.e. $(1) ... $(N))? No, there's no effective difference. There is a difference as to h

Re: function $(eval ...) in make 3.81 compared to 3.80

2007-06-27 Thread Paul Smith
On Wed, 2007-06-27 at 12:13 +0200, Jacques Klein wrote: > First, I added the $(eval $(warning )) stuf just to convince > myseft about how $$ is "evaluated", and for that mater, like you say, > the outer $(eval is just a "no-op", ( it's my way-of-doing to debug > $(eval stuf). i.e check for

Re: dependency problem

2007-06-27 Thread Paul Smith
On Tue, 2007-06-26 at 11:08 +0530, Bhaskar G wrote: > Hi All, > > Sorry for the incomplete question. I have src/bg.c and src/bg1.c. > src/bg2.c doenot exist. So when I run gmake I expect the error message > "make: *** No rule to make target `src/bg2.o', needed by `bg.a'. > Stop." > > not "c

Re: Odd effects from setting SHELL?

2007-06-27 Thread Paul Smith
On Thu, 2007-06-21 at 14:43 -0600, Philip Guenther wrote: > Makefiles should always be written with /bin/sh syntax for portability > and avoid the limitations in csh syntax. (For example, a makefile > rule written in csh can't loop using csh's 'foreach', as that requires > a real newline. sh's 'f

Re: Antw: Re: Make3.81 for HP-UX 10.20

2007-06-28 Thread Paul Smith
Please keep the mailing lists CC'd on any email rather than sending it to me directly. Thanks. On Thu, 2007-06-28 at 08:16 +0200, Dirk Emmermacher wrote: > Thanks for your link. > I downloaded the make-3.81.tar.gz file. > The make stops with following message: > > (Bundled) cc: warning 480: The

Re: Make, Implicit Rules, and Better Output

2007-07-02 Thread Paul Smith
On Sun, 2007-07-01 at 23:33 -0500, Michael Aaron Safyan wrote: > My main issue is that I have tried using pattern rules to create such > an output, but make seems to ignore the pattern rules I have defined. > Additionally, I have not seen any examples dealing with the .cpp > pattern rule; only exa

Re: Make, Implicit Rules, and Better Output

2007-07-02 Thread Paul Smith
On Mon, 2007-07-02 at 18:18 -0500, Michael Aaron Safyan wrote: > The problem was that I did not define the target "% : %.o". I now have > the following rules: Please always send to the mailing lists, not to me directly. Sometimes I don't have a chance to respond to email for a while; if you send

Re: Odd effects from setting SHELL?

2007-07-02 Thread Paul Smith
On Tue, 2007-07-03 at 00:40 -0600, Bob Proulx wrote: > Actually it does depending upon which version of GNU make we are > talking about. Older versions such as 3.80 *did* override the > environment version of SHELL. Newer versions such as 3.81 now do not. > What you are saying is definitely true

Re: Problems with vpath directive in v3.81 (w/ minimal example)

2007-07-06 Thread Paul Smith
On Sat, 2007-07-07 at 00:43 +0200, Martin Willers wrote: > Well, since nobody answered my posting from a few days ago, I digged a little > deeper into this issue and was able to create minimal example Makefiles. > This is with make v3.81 on GNU Linux: > And now: If I remove the line with "vpath

Re: Order of linking libraries

2007-07-12 Thread Paul Smith
The first thing to say is that this has nothing whatever to do with GNU make. For help with linking issues you should contact a group related to your compiler/linker toolchain; in this case GCC. Second, if you don't want to mess with special linker flags you can use the tried and true method of l

Re: Problems with vpath directive in v3.81 (w/ minimal example)

2007-07-12 Thread Paul Smith
On Tue, 2007-07-10 at 19:25 +0200, Martin Willers wrote: > Done. It has Item ID #20394 "vpath directive drops entries". I saw it. Note there has already been a lot of commentary on this bug; it's really a side-effect of a feature of GNU make. This is a performance feature but it does cause some

Re: Testing rule success

2007-07-30 Thread Paul Smith
On Mon, 2007-07-30 at 01:00 -0500, David A. Greene wrote: > Is there a way to test for existence of some_file from another rule? > > For example: > > some_rule : some_file > $(if $(DO_EXISTENCE_TEST_HERE),$(DO_GOODSTUFF),$(DO_BADSTUFF)) > > $(wildcard some_file) doesn't always seem to be

Re: Testing rule success

2007-07-30 Thread Paul Smith
On Mon, 2007-07-30 at 09:34 -0500, David A. Greene wrote: > > some_rule : some_file > > $(if $(DO_EXISTENCE_TEST_HERE),$(DO_GOODSTUFF),$(DO_BADSTUFF)) > > > All right, I believe I'm completely on the wrong path here because > $(if) and $(wildcard) aren't useful in rule actions since they get

Re: Testing rule success

2007-07-30 Thread Paul Smith
On Mon, 2007-07-30 at 10:47 -0500, David A. Greene wrote: > > However with this you can't pass variable assignments up to make, > > since changes in a child's environment have no effect in the parent. > > Right, and this is exactly one of the things I want to do. Is this > even possible? Sure;

Re: Resolution of timestamp, other possible pitfalls?

2007-07-31 Thread Paul Smith
On Tue, 2007-07-31 at 09:55 +0200, Torsten Mohr wrote: > as i understand it the resolution of the timestamps of files is 1 second. > Is this sufficient for "make" to work correctly? Especially as nowadays > PCs get more and more powerful? Is it possible that problems can occur > from that? Make

Re: writing to make file

2007-07-31 Thread Paul Smith
On Tue, 2007-07-31 at 00:15 -0700, micron_make wrote: > I have variable whose value will be evaluated at the beginning. I need > to paste this value (not the variable name). I do not want to > reference the variable, since the usage requires the value to be > pasted. Is there way to do it in the m

Re: Making makefiles

2007-07-31 Thread Paul Smith
On Tue, 2007-07-31 at 10:33 -0500, David A. Greene wrote: > Simple question: when make tries to rebuild makefiles (included .mk > files, for example), does it do so in parallel if -j was specified? Yes. The rebuild of makefiles is in every way identical to all other make rule processing: make sim

Re: Copied sourcefiles, automatic dependencies

2007-07-31 Thread Paul Smith
On Tue, 2007-07-31 at 19:09 +0200, Torsten Mohr wrote: > In a large project we have the sources organised in several subdirectories, > for example: > > SRC := some/where/main.c a/directory/gui.c some/where/else/stuff.c > > VPATH := some/where a/directoy some/where/else > > BASENAMES := $(patsub

Re: writing to make file

2007-07-31 Thread Paul Smith
On Tue, 2007-07-31 at 22:40 -0700, micron_make wrote: > In one of my make make files I do the following: > files_path=$(abspath $(wildcard ../src/*.c)) > filt=$(subst /, ,$(files_path)) > mod_name_filter=$(filter Module_%,$(filt)) > MODULE_NAME=$(mod_name_filter) Weird, but OK. I really, really t

RE: Making multiple action lines from a varaible

2007-08-01 Thread Paul Smith
On Wed, 2007-08-01 at 14:30 -0500, EXT-Pennington, Dale K wrote: > > > phony-clean-%: > > > gmake -f $* clean > > > > > > phony-all-%: > > > gmake -f $* all > > > > > > .PHONY: $(CLEANTARGERS) $(ALLTARGETS) > > > > > When we declared the CLEANTARGETS and ALLTARGETS as phoney, they no

Re: help: wildcards in rules

2007-08-01 Thread Paul Smith
On Wed, 2007-08-01 at 13:15 -0400, German Salazar wrote: > I am having a problem with expanding wildcards in a rule, am I missing > something? According to user's manual section 4.4, wildcards like * > and [...] are allowed, but it is not working for me; here is my rule: > > $(fobjs): $(cdir)/%.o

Re: help: wildcards in rules

2007-08-02 Thread Paul Smith
On Thu, 2007-08-02 at 10:37 -0400, German Salazar wrote: > $(fobjs): $(wdir)/%.o: %.[fF]* my problem > $(COMPILE.f) $< -o $@ > I am having difficulties implementing the $(fobjs) target since > %.[fF]* does not do what I was hoping for. The thing is that a given > *.o file (from fo

Re: need help with $(call)

2007-08-03 Thread Paul Smith
On Fri, 2007-08-03 at 01:30 -0500, [EMAIL PROTECTED] wrote: > .EXPORT_ALL_VARIABLES: Your problem is right here. When you say this, make tries to export ALL variables. In order to export them, it has to expand them. So, whenever make wants to run a shell it will expand all the variables includi

  1   2   3   4   5   6   7   8   9   10   >