[Mono-list] Help with calling monoresgen on new build Makefile.

Francisco Figueiredo Jr. fxjrlists@yahoo.com.br
Mon, 13 Oct 2003 14:03:13 -0200


Hi all.

I'd like some help to get monoresgen called before compiling Npgsql in 
Mono cvs.

The Npgsql Makefile includes some common make instructions which allowed 
me to compile Npgsql. But now, as it needs some resources compiled, I 
have to call monoresgen first...

So, I'd like to know where could I put the directive to call monoresgen 
before the mcs is called.

I can see in the ../../build/library.make the line which calls the mcs:

$(the_lib): $(makefrag) $(stampfile) $(response)
         $(CSCOMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) /target:library 
/out:$@ @$(response)

and this is called by the all-local.

I saw in the ../../build/rules.make that I can override the default by 
defining the OVERRIDE_BARE_TARGETS.

This way, I could define my all target to call the monoresgen and later 
compile the library.

I tried it and it started to work. The only problem is how to compile 
the library.

If I try the following it works:

all: $(the_lib)

but how do I put the monoresgen call first?

If I put it like this:
all:
	monoresgen
	$(the_lib)

It doesn't work :(

As you already noticed I'm not very good with Makefiles, so any help 
will be appreciated.


Thanks in advance.

Francisco Figueiredo Jr.