Commit Graph

165 Commits

Author SHA1 Message Date
Zoltan Somogyi
3e4a91c6ce Changed index to mindex to avoid conflict with the name of strchr's
mdemangle:
	Changed index to mindex to avoid conflict with the name of strchr's
	alter ego.
1995-07-21 10:01:54 +00:00
Fergus Henderson
6aeb709108 Fix bug: add `-I ../runtime' to CFLAGS.
mercury/util/Mmake:
	Fix bug: add `-I ../runtime' to CFLAGS.
1995-07-17 15:53:30 +00:00
Fergus Henderson
c6d1289d21 Strip a leading underscore, if any, since some C implementations
mdemangle:
	Strip a leading underscore, if any, since some C implementations
	prepend an underscore on all C identifiers.
1995-07-15 09:21:58 +00:00
Fergus Henderson
5d82d2ce30 Added a Mercury symbol demangler.
util/mdemangle.c:
	Added a Mercury symbol demangler.

util/Makefile:
	Removed, since it wasn't being used and didn't work anyway.

util/Mmake:
	Add rules for mdemangle.
1995-07-15 09:07:34 +00:00
Fergus Henderson
3ba2fe512f Remove obsolete definition of CLEAN_C.
util/Mmake:
	Remove obsolete definition of CLEAN_C.
1995-07-14 08:00:28 +00:00
Fergus Henderson
402d95ec67 Only allow .init, .c, or .m files as input.
util/mkinit.c:
	Only allow .init, .c, or .m files as input.
	If a `.m' file is specified on the command line,
	then the init function for that file is mercury__<filename>__init(),
	and this can be determined without looking for any INIT/ENDINITs,
	so don't even open the file.

	Also clean up the code a bit - break things into smaller functions,
	add a little documentation.
1995-06-20 07:01:39 +00:00
Zoltan Somogyi
ee5218fd8d If a file cannot be opened, do not abort, but press on to find
mkinit.c:
	If a file cannot be opened, do not abort, but press on to find
	any other files that cannot be opened. Then generate a syntax error
	to prevent an incomplete init file from being compiled.
1995-06-17 03:54:57 +00:00
Fergus Henderson
81aa553e39 Pass `-s $(GRADE)' to ../scripts/mgnuc, because otherwise
util/Mmake:
	Pass `-s $(GRADE)' to ../scripts/mgnuc, because otherwise
	on munta mgnuc will pass -non_shared to gcc, which causes
	a link error since the non_shared libraries are not installed.

	This is not an ideal solution to the problem.
1995-05-23 07:36:44 +00:00
Fergus Henderson
4e4a23974a Put some more newlines in the output so that it fits in 80 columns.
util/mkinit.c:
	Put some more newlines in the output so that it fits in 80 columns.
1995-05-13 05:45:28 +00:00
Fergus Henderson
a2149cc76c Add copyright notices.
util/{Mmake,mkinit.c}:
	Add copyright notices.
	Compile with warnings enabled.
	Use ../runtime/getopt.h.
1995-05-12 12:10:44 +00:00
Fergus Henderson
44abd839ba Oops, fix typo in last change.
util/mkinit.c:
	Oops, fix typo in last change.
1995-05-12 12:03:29 +00:00
Fergus Henderson
4ca38f164e Some minor stylistic changes: main() should be declared to return
util/mkinit.c:
	Some minor stylistic changes: main() should be declared to return
	an int, functions should be declared as static, etc.
1995-05-12 12:02:52 +00:00
Fergus Henderson
2ad644ea37 Define MERCURY_DIR before including ../Mmake.common.
utils/Mmake:
	Define MERCURY_DIR before including ../Mmake.common.
1995-05-12 01:10:24 +00:00
Peter Ross
d8f04632fa Fix a couple of minor bugs.
utils/Mmake:
	Fix a couple of minor bugs.
1995-05-11 11:56:10 +00:00
Zoltan Somogyi
8f1950bb87 New directory to contain the mkinit program. 1995-05-06 07:30:42 +00:00