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 » Developing U++ » U++ Developers corner » Autotool support by Upp
Re: Autotool support by Upp [message #8644 is a reply to message #8636] Thu, 22 March 2007 14:01 Go to previous messageGo to previous message
ebojd is currently offline  ebojd
Messages: 225
Registered: January 2007
Location: USA
Experienced Member
fallingdutch wrote on Thu, 22 March 2007 03:50

For me it is still a problem how to deal with .icpp files.
Mirek introduced them to be files that always have to be recompiled (mostly files including language stuff or database definitions etc) so there should be a way to compile them *every* time and include the objects into the source.

Information/Code/Suggestions etc are very welcome


There should be several ways of dealing with this. Probably the easiest is to define a .icpp.o translation SUFFIX, and a clean_icpp_ofile method which removes the .o files every time (mind you this is strictly off the top of my head and not tested -- your milage may vary):


ICPP_SRC = bla.icpp woof.icpp

ICPP_OBJ = $(addsuffix .o, $(basename $(ICPP_SRC)))

.SUFFIXES: .c .cc .icpp

.icpp.o:
      $(CXX) $(CXXFLAGS) $(UPPFLAGS) -c $<

all: theide

theide: clean_icpp_ofile $(ICPP_OBJS) $(OBJS) ...
      ....

clean_icpp_ofile:
      -$(RM) $(ICPP_OBJS)



The intent here, if I got this right, is to remove all .o files associated with the .icpp files, then rebuild them.

This is probably not the most elegant mway to get the job done. I seem to remember that there was a way to force compilation using the .FORCE. rule <see http://theoryx5.uwinnipeg.ca/gnu/make/make_19.html> for example). I do not know how portable this approach would be though.

In addition to this you will need to carefully address properly building the dependencies. There is a program called makedepend that will do this, but there is also a method using the -M compiler switch IIRC (but I have not used that one yet).

Hope that helps, more later

EBo --
 
Read Message
Read Message
Read Message
Previous Topic: pkg-config discussion
Next Topic: Build method cleanup
Goto Forum:
  


Current Time: Tue Jun 24 21:55:57 CEST 2025

Total time taken to generate the page: 0.04161 seconds