diff options
author | Roland McGrath <roland@redhat.com> | 1994-05-21 20:26:33 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 1994-05-21 20:26:33 +0000 |
commit | f4fb1be3d8e2d930ddebab44728142a3bef878bd (patch) | |
tree | 8c53f15521bea5ee05d97262a49d72a70982fc61 /compatMakefile | |
parent | 10abeb4a082c5b6bb1e2d9b3b8121164c1e22923 (diff) | |
download | make-f4fb1be3d8e2d930ddebab44728142a3bef878bd.tar.gz |
(loadavg): Depend on and use loadavg.c instead of getloadavg.c.
(loadavg.c): Link or copy it from getloadavg.c.
(distclean): Remove loadavg.c.
Diffstat (limited to 'compatMakefile')
-rw-r--r-- | compatMakefile | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/compatMakefile b/compatMakefile index 61122f1..33b77b1 100644 --- a/compatMakefile +++ b/compatMakefile @@ -229,9 +229,14 @@ $(mandir)/$(manprefix)make.$(manext): make.man $(INSTALL_DATA) $(srcdir)/make.man $@ -loadavg: getloadavg.c config.h +loadavg: loadavg.c config.h $(CC) $(defines) -DTEST -I. -I$(srcdir) $(CFLAGS) $(LDFLAGS) \ - $(srcdir)/getloadavg.c $(LOADLIBES) -o $@ + loadavg.c $(LOADLIBES) -o $@ +# We copy getloadavg.c into a different file rather than compiling it +# directly because some compilers clobber getloadavg.o in the process. +loadavg.c: getloadavg.c + ln $(srcdir)/getloadavg.c loadavg.c || \ + cp $(srcdir)/getloadavg.c loadavg.c check-loadavg: loadavg @echo The system uptime program believes the load average to be: -uptime @@ -247,6 +252,7 @@ distclean: clean glob-realclean -rm -f Makefile config.h config.status build.sh stamp-config -rm -f TAGS tags -rm -f make.?? make.??s make.log make.toc make.*aux + -rm -f loadavg.c realclean: distclean mostlyclean: clean |