make removed my source file

Guy Harris guy at auspex.auspex.com
Mon Feb 19 09:05:03 AEST 1990


>I was lucky that I had recently backed up my files, so not many changes
>were lost.  I do not understand why these commands were executed instead
>of the ones I specified in my Makefile.

"make" has a big list of built-in rules (or, in the case of the SunPro
"make", which is the default "make" in SunOS 4.x, rules in
"/usr/include/make/default.mk").  "make" does not, unless you give it
the "-r" flag, confine itself to the rules you explicitly specify in
your Makefile.

Since Time Immemorial, the default rules have included rules for "lex". 
Since Time Immemorial, the suffix for "lex" files has been ".l".  If
your ".l" file is really a "lex" file, you should either rename
"xxencode.l" to something else ending with a ".l" or rename "xxencode.c"
to something else ending with a ".c".

If the ".l" file is something else, choose another suffix.  I suspect
that "xxencode.l" is supposed to be the manual page for "xxencode" and
"xxdecode".  You made the mistake of thinking that the convention that
manual pages for "local" things should end with ".l" actually had merit.
It has none whatsoever:

	1) local software comes in the form of commands, library
	   routines, device drivers, etc. just like "standard" software,
	   and as such its manual pages should be broken up into
	   different categories just like system manual pages;

	2) ".l", as a suffix, is already spoken for - it means "lex
	   file" (I'm willing to be slightly merciful to the inventor of
	   the ".l" convention if they'd done so before "lex" was
	   available in UNIX).

If the ".l" file is supposed to be a local manual page, don't follow the
stupid ".l" convention for local manual pages - call it ".1", instead,
since it appears to be a command.



More information about the Comp.unix.questions mailing list