Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » Makefile's install depends on all
Re: Makefile's install depends on all [message #44505 is a reply to message #44504] Thu, 19 March 2015 07:05 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1791
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi bonami,

bonami wrote on Thu, 19 March 2015 06:03
I use command line umk to build.
first I run make, which will build "all".
Then I run make install. It relies on "all". "all" will complain ${program_name} already exists, which IS the former result.
"install" should depends on "all" but use its result if it has been run.


Did you write the Makefile? It seems quite overcomplicated, I couldn't really figure out what should all the shell command in the targets actually do. But what I see at first sight is that there are no dependencies at all. So make have no idea that your application was already built, when running install and tries to build it again. You have to list the files that are created by each target as its dependencies. For example:
all: ${program_name}

This should fix your problem. It would also probably allow you to simplify the makefile a lot. GNU Make is a great tool with lots of possibilities, if you haven't read any of it's documentation you probably should Wink

bonami wrote on Thu, 19 March 2015 06:03
And, I wonder why "install" needs gawk, which is not needed when I compile anything in theide.
Because you're using it on line 73:
	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
	    else { print "f", $$3 "/" $$4, $$1; } } \
	  END { for (d in files) print "f", d, files[d] }'


Best regards,
Honza
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: umk fails on launchpad
Next Topic: apps built depends on libstdc++
Goto Forum:
  


Current Time: Mon May 12 03:54:11 CEST 2025

Total time taken to generate the page: 0.00632 seconds