-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Boris Kolpackov wrote: | Scott Burns <[EMAIL PROTECTED]> writes: | | |>although it would make some sense to produce dbfile_pg.c and |>dbfile_inf.c from dbfile.ec as otherwise I always have to delete the |>intermediatary file because I don't know what it was precompiled for. | | | I think this is your best bet if you don't want to have separate | configurations, e.g., | | | driver_pg: dbfile_pg.o common.o | | driver_inf: dbfile_inf.o common.o | | | %_inf.c: %.ec | infc ... | | %_pg.c: %.ec | pgc ... | | | -boris | |
This isn't quite perfect because I need to maintain two rules of essentially the same information, ie, the executable is made up of dbfile.ec and common.c. However, it is head and shoulders above what I was trying to do because now I don't need to continually recompile and reprocess the same files in case they were made for the other database. ~ Given there are relatively few programs compiled for both databases it's a pretty good soloution. For posterity, here's my rules:
# Makefile Include
# I have to copy here because the Informix precompiler # does not allow you to redefine the output file %_inf.ec: %.ec ~ cp $< $@
%_pg.ec: %.ec ~ cp $< $@
# Precompiler stage %_inf.c: %_inf.ec ~ $(INFXEC) $<
%_pg.c: %_pg.ec ~ $(PGSQLEC) $<
# Make sure it is made with the correct include paths %_inf.o: %_inf.c ~ $(CC) $(INCFLAGS) $(INFXFLAGS) -c -o $@ $^
%_pg.o: %_pg.c ~ $(CC) $(INCFLAGS) $(PGSQLFLAGS) -c -o $@ $^
# Make sure it's linked with the correct libraries %_inf: ~ $(CC) -o $@ $^ $(LDLIBS) $(INFXLIBS) -lcrypt
%_pg: ~ $(CC) -o $@ $^ $(LDLIBS) $(PGSQLLIB)
# Makefile tagUtil_pg: tagUtil_dbase.o db_tag_pg.o
tagUtil_inf: tagUtil_dbase.o db_tag_inf.o
Thanks for your help, and any further tips are more than welcome.
- -- Scott Burns Mirrabooka Systems
Tel +61 7 3857 7899 Fax +61 7 3857 1368 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Using GnuPG with MultiZilla - http://enigmail.mozdev.org
iD8DBQFBt5kDHVL0GJGqLmcRAm4ZAJsF9M9VS+8PwlldNviuv/YN05DxNACdG3Xh WaOQZOy638gQTYMV4yAKxMM= =fe4c -----END PGP SIGNATURE-----
_______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/help-make
