Forum Discussion
Altera_Forum
Honored Contributor
12 years agoCorrection to Makefile
Hello, I have found projects that contain library dependencies always relink to create the final ELF file even if nothing has changed. Although this isn't wrong or bad, it does cause creation ...
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- Adding -p just preserves the modification times, the copy will still happen. --- Quote End --- Yes, true. I should have been clearer that the time-stamp remains the same and therefore dependencies on the lib(s) don't build unnecessarily. That was the point - to stop unnecessary builds and backups. --- Quote Start --- make should only be running the command if ${LIB} is older than ${ACTIVE_CONFIG_LIB} - so that should suppress the code when not needed. --- Quote End --- Which I don't understand because it's the same 2 targets of the CP. How could they be different if the LIB wasn't built? And it isn't because AR isn't run. I didn't understand the problem but still I wanted a solution. I'm obviously not a make expert. --- Quote Start --- So something else funny must be going on, possibly another dependency line somewhere. --- Quote End --- I agree --- Quote Start --- What you might need is something that only updates the config file if it has actually changed - that needs to be done before the makefile above is run. --- Quote End --- Rebuilds occur (because of the CP) even if the config isn't changed. With the -p it still works if the config *is* changed. Although I don't understand the failure the solution (work around) is sound. Thanks for replying, Bill