diff options
author | Roland McGrath <roland@redhat.com> | 1996-03-20 14:57:41 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 1996-03-20 14:57:41 +0000 |
commit | 9e443adaf679b071fb3319cfc3259e322dcb6e57 (patch) | |
tree | a84a507d09be97fb0932bb661139921a59db71bd /default.c | |
parent | dfefc77263fe835ae12b3ee27cc3ed9b084311c1 (diff) | |
download | gunmake-9e443adaf679b071fb3319cfc3259e322dcb6e57.tar.gz |
Tue Mar 19 20:21:34 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu>
Merged VMS port from Klaus Kaempf <kkaempf@didymus.rmi.de>.
* make.h (PARAMS): New macro.
* config.h-vms: New file.
* makefile.com: New file.
* makefile.vms: New file.
* readme.vms: New file.
* vmsdir.h: New file.
* vmsfunctions.c: New file.
* vmsify.c: New file.
* file.h: Renamed to filedef.h to avoid conflict with VMS system hdr.
* ar.c: Added prototypes and changes for VMS.
* commands.c: Likewise.
* commands.h: Likewise.
* default.c: Likewise.
* dep.h: Likewise.
* dir.c: Likewise.
* expand.c: Likewise.
* file.c: Likewise.
* function.c: Likewise.
* implicit.c: Likewise.
* job.c: Likewise.
* job.h: Likewise.
* main.c: Likewise.
* make.h: Likewise.
* misc.c: Likewise.
* read.c: Likewise.
* remake.c: Likewise.
* remote-stub.c: Likewise.
* rule.c: Likewise.
* rule.h: Likewise.
* variable.c: Likewise.
* variable.h: Likewise.
* vpath.c: Likewise.
* compatMakefile (srcs): Rename file.h to filedef.h.
Diffstat (limited to 'default.c')
-rw-r--r-- | default.c | 114 |
1 files changed, 111 insertions, 3 deletions
@@ -19,7 +19,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "make.h" #include "rule.h" #include "dep.h" -#include "file.h" +#include "filedef.h" +#include "job.h" #include "commands.h" #include "variable.h" @@ -35,9 +36,15 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ a `.c' or `.p' or ... file rather than from a .s file. */ static char default_suffixes[] +#ifdef VMS + = ".exe .olb .ln .obj .c .cc .pas .p .for .f .r .y .l .mar \ +.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \ +.w .ch .cweb .web .com .sh .elc .el"; +#else = ".out .a .ln .o .c .cc .C .p .f .F .r .y .l .s .S \ .mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \ .w .ch .web .sh .elc .el"; +#endif static struct pspec default_pattern_rules[] = { @@ -47,9 +54,13 @@ static struct pspec default_pattern_rules[] = /* The X.out rules are only in BSD's default set because BSD Make has no null-suffix rules, so `foo.out' and `foo' are the same thing. */ +#ifdef VMS + { "%.exe", "%", + "copy $< $@" }, +#else { "%.out", "%", "@rm -f $@ \n cp $< $@" }, - +#endif /* Syntax is "ctangle foo.w foo.ch foo.c". */ { "%.c", "%.w %.ch", "$(CTANGLE) $^ $@" }, @@ -61,6 +72,20 @@ static struct pspec default_pattern_rules[] = static struct pspec default_terminal_rules[] = { +#ifdef VMS + /* RCS. */ + { "%", "%$$5lv", /* Multinet style */ + "if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" }, + { "%", "[.$$rcs]%$$5lv", /* Multinet style */ + "if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" }, + { "%", "%_v", /* Normal style */ + "if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" }, + { "%", "[.rcs]%_v", /* Normal style */ + "if f$$search($@) .nes. \"\" then +$(CHECKOUT,v)" }, + + /* SCCS. */ + /* ain't no SCCS on vms */ +#else /* RCS. */ { "%", "%,v", "$(CHECKOUT,v)" }, @@ -72,12 +97,53 @@ static struct pspec default_terminal_rules[] = "$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $<" }, { "%", "SCCS/s.%", "$(GET) $(GFLAGS) $(SCCS_OUTPUT_OPTION) $<" }, - +#endif /* !VMS */ { 0, 0, 0 } }; static char *default_suffix_rules[] = { +#ifdef VMS + ".obj.exe", + "$(LINK.obj) $^ $(LOADLIBES) $(LDLIBS) /exe=$@", + ".mar.exe", + "$(LINK.mar) $^ $(LOADLIBES) $(LDLIBS) /exe=$@", + ".c.exe", + "$(COMPILE.c) $^ \n $(LINK.obj) $(subst .c,.obj,$^) $(LOADLIBES) $(LDLIBS) /exe=$@", + ".cc.exe", + "$(COMPILE.cc) $^ \n $(LINK.obj) $(subst .cc,.obj,$^) $(LOADLIBES) $(LDLIBS) /exe=$@", + ".for.exe", + "$(COMPILE.for) $^ \n $(LINK.obj) $(subst .for,.obj,$^) $(LOADLIBES) $(LDLIBS) /exe=$@", + ".pas.exe", + "$(COMPILE.pas) $^ \n $(LINK.obj) $(subst .pas,.obj,$^) $(LOADLIBES) $(LDLIBS) /exe=$@", + + ".com", + "copy $< >$@", + + ".mar.obj", + "$(COMPILE.mar) /obj=$@ $<", + ".c.obj", + "$(COMPILE.c) /obj=$@ $<", + ".cc.obj", + "$(COMPILE.cc) /obj=$@ $<", + ".for.obj", + "$(COMPILE.for) /obj=$@ $<", + ".pas.obj", + "$(COMPILE.pas) /obj=$@ $<", + + ".y.c", + "$(YACC.y) $< \n rename y_tab.c $@", + ".l.c", + "$(LEX.l) $< \n rename lexyy.c $@", + + ".texinfo.info", + "$(MAKEINFO) $<", + + ".tex.dvi", + "$(TEX) $<", + +#else /* ! VMS */ + ".o", "$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@", ".s", @@ -195,11 +261,52 @@ static char *default_suffix_rules[] = ".web.tex", "$(WEAVE) $<", +#endif /* !VMS */ + 0, 0, }; static char *default_variables[] = { +#ifdef VMS + "AR", "library/obj", + "ARFLAGS", "/replace", + "AS", "macro", + "CC", "cc", + "C++", "gcc/plus", + "CXX", "gcc/plus", + "CO", "co", + "CPP", "$(CC) /preprocess_only", + "FC", "fortran", + /* System V uses these, so explicit rules using them should work. + However, there is no way to make implicit rules use them and FC. */ + "F77", "$(FC)", + "F77FLAGS", "$(FFLAGS)", + "LD", "link", + "LEX", "lex", + "PC", "pascal", + "YACC", "yacc", /* Or "bison -y" */ + "MAKEINFO", "makeinfo", + "TEX", "tex", + "TEXINDEX", "texindex", + + "RM", "delete/nolog", + + "LINK.obj", "$(LD) $(LDFLAGS)", + "COMPILE.c", "$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH)", + "COMPILE.cc", "$(C++) $(C++FLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c", + "YACC.y", "$(YACC) $(YFLAGS)", + "LEX.l", "$(LEX) $(LFLAGS)", + "COMPILE.for", "$(FC) $(FFLAGS) $(TARGET_ARCH)", + "COMPILE.pas", "$(PC) $(PFLAGS) $(CPPFLAGS) $(TARGET_ARCH)", + "COMPILE.mar", "$(AS) $(ASFLAGS) $(TARGET_MACH)", + "LINT.c", "$(LINT) $(LINTFLAGS) $(CPPFLAGS) $(TARGET_ARCH)", + + "MV", "rename/new_version", + "CP", "copy", + +#else /* !VMS */ + "AR", "ar", "ARFLAGS", "rv", "AS", "as", @@ -310,6 +417,7 @@ static char *default_variables[] = "SCCS_OUTPUT_OPTION", "-G$@", #endif +#endif /* !VMS */ 0, 0 }; |