Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Art S. Kagel — — source: Usenet: comp.databases.informix
On Sun, 07 Dec 2003 18:55:02 -0500, Ian Pellew wrote:
To question #1:
Even GNU Make has no way for a makefile to determine its own name.
To question #2:
Enter an empty .SUFFIXES rule to delete the existing suffix priority list and
create a new one like:
.SUFFIXES:
.SUFFIXES: .ec .cc .c .h .o
This will make the priority the .ec file.
Art S. Kagel
> Hi;
>
> Two questions on make:-
> 1.
> How can I get the name of the makefile into a usable variable? IE $MK =
> makefile if I use makefile
> = Makefile if I am using Makefile
> = whatever if I run `make '''f whatever`.
> ===========
> 2.
> I am compiling Informix .ec files and ask how can I force '''make' to compile
> the .ec file rather than the .c left over from a previous erroneous compile.
> Eg:-
> $ make
> cgi_env.ec: In function `dl_our_tag':
> cgi_env.ec:2695: `n' undeclared (first use in this function) cgi_env.ec:2695:> (Each undeclared identifier is reported only once cgi_env.ec:2695: for each
> function it appears in.) cgi_env.ec:2695: parse error before "strcpy" ***
> Error code 1
> make: Fatal error: Command failed for target `cgi_env.o'
>
> I have now corrected the cgi_env.ec file.
>
> $ make
> cgi_env.ec: In function `dl_our_tag':
> cgi_env.ec:2695: `n' undeclared (first use in this function) etc.>
> My make file fragment is:-
> .SUFFIXES : .o .4gl .ec .c
> .4gl.o :
> @$(ESQL) $(ESQLFLAGS) $(CFLAGS) $<
> .ec.o :
> @$(ESQL) $(ESQLFLAGS) $(CFLAGS) $<
> .c.o :
> @$(ESQL) $(ESQLFLAGS) $(CFLAGS) $<
>
> If I `rm cgi_env.c` '''make' works OK.
>
> Regards
> Ian
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.