summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTobias Weingartner <weingart@cvs.openbsd.org>1997-09-20 21:03:10 +0000
committerTobias Weingartner <weingart@cvs.openbsd.org>1997-09-20 21:03:10 +0000
commit2f49f029d12cd95e62b6d369737c83ab6662eb5c (patch)
tree34945c321fba4b60abc4dfc4812ba6e4e9c35a58 /gnu
parente6cacb9632a2492920e4d950e056bcb25c84d547 (diff)
Support for building libgmp only if something has changed.
This helps me with not having root re-build libgmp every- time I install the system.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/lib/libgmp/Makefile.in15
-rw-r--r--gnu/lib/libgmp/mpbsd/Makefile.in3
-rw-r--r--gnu/lib/libgmp/mpf/Makefile.in3
-rw-r--r--gnu/lib/libgmp/mpn/Makefile.in3
-rw-r--r--gnu/lib/libgmp/mpq/Makefile.in3
-rw-r--r--gnu/lib/libgmp/mpz/Makefile.in3
6 files changed, 22 insertions, 8 deletions
diff --git a/gnu/lib/libgmp/Makefile.in b/gnu/lib/libgmp/Makefile.in
index 3726e08bcab..68d15275f9f 100644
--- a/gnu/lib/libgmp/Makefile.in
+++ b/gnu/lib/libgmp/Makefile.in
@@ -59,12 +59,12 @@ FILES = gmp.h mp.h gmp-impl.h longlong.h urandom.h move-if-change \
INCLUDES = -I. -Impn -I$(srcdir)
FLAGS_TO_PASS = "CC=$(CC)" "CFLAGS=$(CFLAGS)" "XCFLAGS=$(XCFLAGS)"
-all: libgmp.a
+all: subdirs sublibs libgmp.a
.c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(XCFLAGS) $<
-libgmp.a: mpn/libmpn.a mpz/libmpz.a mpf/libmpf.a mpq/libmpq.a $(OBJS)
+libgmp.a: sublibs $(OBJS)
rm -rf tmpdir
mkdir tmpdir
for i in mpn mpz mpf mpq; \
@@ -78,7 +78,7 @@ libgmp.a: mpn/libmpn.a mpz/libmpz.a mpf/libmpf.a mpq/libmpq.a $(OBJS)
mv tmpdir/$@ .
rm -rf tmpdir
-libmp.a: mpn/libmpn.a mpbsd/libmpbsd.a $(OBJS)
+libmp.a: sublibs $(OBJS)
rm -rf tmpdir
mkdir tmpdir
for i in mpn mpbsd; \
@@ -92,15 +92,14 @@ libmp.a: mpn/libmpn.a mpbsd/libmpbsd.a $(OBJS)
mv tmpdir/$@ .
rm -rf tmpdir
-mpn/libmpn.a: force
+sublibs: mpn/libmpn.a mpz/libmpz.a mpf/libmpf.a mpq/libmpq.a mpbsd/libmpbsd.a
+ -touch sublibs
+
+subdirs:
cd mpn; $(MAKE) $(FLAGS_TO_PASS) libmpn.a
-mpz/libmpz.a: force
cd mpz; $(MAKE) $(FLAGS_TO_PASS) libmpz.a
-mpf/libmpf.a: force
cd mpf; $(MAKE) $(FLAGS_TO_PASS) libmpf.a
-mpq/libmpq.a: force
cd mpq; $(MAKE) $(FLAGS_TO_PASS) libmpq.a
-mpbsd/libmpbsd.a: force
cd mpbsd; $(MAKE) $(FLAGS_TO_PASS) libmpbsd.a
check: libgmp.a
diff --git a/gnu/lib/libgmp/mpbsd/Makefile.in b/gnu/lib/libgmp/mpbsd/Makefile.in
index a517c1aba1c..43c651f04f4 100644
--- a/gnu/lib/libgmp/mpbsd/Makefile.in
+++ b/gnu/lib/libgmp/mpbsd/Makefile.in
@@ -29,6 +29,8 @@ CC = gcc
LOCAL_CC = $(CC)
CFLAGS = -g -O
AR = ar
+RANLIB = ranlib
+RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
SHELL = /bin/sh
#### host and target specific makefile fragments come in here.
@@ -46,6 +48,7 @@ INCLUDES = -I. -I.. -I$(srcdir)/../mpz -I../mpn -I$(srcdir)/..
libmpbsd.a: Makefile.in $(MPBSD_OBJS)
rm -f $@
$(AR) cr $@ $(MPBSD_OBJS)
+ if $(RANLIB_TEST) ; then $(RANLIB) $@; else true; fi
.c.o:
$(CC) -c $(INCLUDES) -DBERKELEY_MP $(CFLAGS) $(XCFLAGS) $<
diff --git a/gnu/lib/libgmp/mpf/Makefile.in b/gnu/lib/libgmp/mpf/Makefile.in
index 598fa72fc19..e5153b2f661 100644
--- a/gnu/lib/libgmp/mpf/Makefile.in
+++ b/gnu/lib/libgmp/mpf/Makefile.in
@@ -25,6 +25,8 @@ CC = gcc
CFLAGS = -g -O
AR = ar
AR_FLAGS = rc
+RANLIB = ranlib
+RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
SHELL = /bin/sh
#### host and target specific makefile fragments come in here.
@@ -50,6 +52,7 @@ INCLUDES = -I. -I.. -I../mpn -I$(srcdir)/..
libmpf.a: Makefile $(MPF_OBJS)
rm -f $@
$(AR) $(AR_FLAGS) $@ $(MPF_OBJS)
+ if $(RANLIB_TEST) ; then $(RANLIB) $@; else true; fi
.c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(XCFLAGS) $<
diff --git a/gnu/lib/libgmp/mpn/Makefile.in b/gnu/lib/libgmp/mpn/Makefile.in
index 132159b9465..014acc32253 100644
--- a/gnu/lib/libgmp/mpn/Makefile.in
+++ b/gnu/lib/libgmp/mpn/Makefile.in
@@ -28,6 +28,8 @@ CFLAGS = -g -O
INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/..
AR = ar
AR_FLAGS = rc
+RANLIB = ranlib
+RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
SFLAGS=
#### host and target specific makefile fragments come in here.
@@ -36,6 +38,7 @@ SFLAGS=
libmpn.a: Makefile mp_bases.o $(MPN_OBJECTS)
rm -f $@
$(AR) $(AR_FLAGS) $@ mp_bases.o $(MPN_OBJECTS)
+ if $(RANLIB_TEST) ; then $(RANLIB) $@; else true; fi
.SUFFIXES: .c .s .S
diff --git a/gnu/lib/libgmp/mpq/Makefile.in b/gnu/lib/libgmp/mpq/Makefile.in
index f34ffb928a3..6f7ce0ae16f 100644
--- a/gnu/lib/libgmp/mpq/Makefile.in
+++ b/gnu/lib/libgmp/mpq/Makefile.in
@@ -25,6 +25,8 @@ CC = gcc
CFLAGS = -g -O
AR = ar
AR_FLAGS = rc
+RANLIB = ranlib
+RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
SHELL = /bin/sh
#### host and target specific makefile fragments come in here.
@@ -42,6 +44,7 @@ INCLUDES = -I. -I.. -I../mpn -I$(srcdir)/..
libmpq.a: Makefile $(MPQ_OBJS)
rm -f $@
$(AR) $(AR_FLAGS) $@ $(MPQ_OBJS)
+ if $(RANLIB_TEST) ; then $(RANLIB) $@; else true; fi
.c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(XCFLAGS) $<
diff --git a/gnu/lib/libgmp/mpz/Makefile.in b/gnu/lib/libgmp/mpz/Makefile.in
index 497f09ca8ec..4da1add92c1 100644
--- a/gnu/lib/libgmp/mpz/Makefile.in
+++ b/gnu/lib/libgmp/mpz/Makefile.in
@@ -30,6 +30,8 @@ LOCAL_CC = $(CC)
CFLAGS = -g -O
AR = ar
AR_FLAGS = rc
+RANLIB = ranlib
+RANLIB_TEST = [ -f /usr/bin/ranlib -o -f /bin/ranlib ]
SHELL = /bin/sh
#### host and target specific makefile fragments come in here.
@@ -71,6 +73,7 @@ INCLUDES = -I. -I.. -I../mpn -I$(srcdir)/..
libmpz.a: Makefile $(MPZ_OBJS)
rm -f $@
$(AR) $(AR_FLAGS) $@ $(MPZ_OBJS)
+ if $(RANLIB_TEST) ; then $(RANLIB) $@; else true; fi
.c.o:
$(CC) -c $(INCLUDES) $(CFLAGS) $(XCFLAGS) $<