From eb2ecd0b083611bdd07c5352ffc9cfa22e0de711 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Wed, 4 Oct 2000 23:26:55 +0000 Subject: Fix all the makefiles. Clean up some warnings, cleanup some headers. -Erik --- libc/misc/regex/Makefile | 37 ++++++++++++++++++++++++++++--------- libc/misc/regex/rx.c | 36 +++++++++++++++++++++++++----------- libc/misc/time/Makefile | 37 +++++++++++++++++++++++++++---------- 3 files changed, 80 insertions(+), 30 deletions(-) (limited to 'libc/misc') diff --git a/libc/misc/regex/Makefile b/libc/misc/regex/Makefile index c6c8d8e52..ad0745020 100644 --- a/libc/misc/regex/Makefile +++ b/libc/misc/regex/Makefile @@ -1,17 +1,36 @@ +# Makefile for uCLibc +# +# Copyright (C) 2000 by Lineo, inc. +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU Library General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) any +# later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., 59 Temple +# Place, Suite 330, Boston, MA 02111-1307 USA +# +# Derived in part from the Linux-8086 C library, the GNU C Library, and several +# other sundry sources. Files within this library are copyright by their +# respective copyright holders. + TOPDIR=../ include $(TOPDIR)Rules.make - -LIBC=../libc.a +LIBC=$(TOPDIR)libc.a OBJ=rx.o -all: $(LIBC) +all: $(OBJ) $(LIBC) -$(LIBC): $(LIBC)($(OBJ)) - -$(LIBC)(rx.o): rx.c - $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o - $(AR) $(ARFLAGS) $@ $*.o +$(LIBC): $(OBJ) + $(AR) $(ARFLAGS) $(LIBC) $(OBJ) clean: - rm -f libc.a *.o core mon.out timer.t.h dMakefile dtr try timer + rm -f *.[oa] *~ core + diff --git a/libc/misc/regex/rx.c b/libc/misc/regex/rx.c index 8e85782f2..1abff8cc5 100644 --- a/libc/misc/regex/rx.c +++ b/libc/misc/regex/rx.c @@ -161,8 +161,8 @@ RX_DECL struct rexp_node struct rexp_node *); RX_DECL struct rexp_node *rx_mk_r_side_effect (struct rx *, rx_side_effect); -RX_DECL struct rexp_node - *rx_mk_r_data (struct rx *, void *); +//RX_DECL struct rexp_node +// *rx_mk_r_data (struct rx *, void *); RX_DECL void rx_free_rexp (struct rx *, struct rexp_node *); RX_DECL struct rexp_node *rx_copy_rexp (struct rx *, struct rexp_node *); @@ -486,9 +486,9 @@ print_fastmap (fm) /* This page: Bitsets. Completely unintersting. */ -RX_DECL int rx_bitset_is_equal (int, rx_Bitset, rx_Bitset); +//RX_DECL int rx_bitset_is_equal (int, rx_Bitset, rx_Bitset); RX_DECL int rx_bitset_is_subset (int, rx_Bitset, rx_Bitset); -RX_DECL int rx_bitset_empty (int, rx_Bitset); +//RX_DECL int rx_bitset_empty (int, rx_Bitset); RX_DECL void rx_bitset_null (int, rx_Bitset); RX_DECL void rx_bitset_complement (int, rx_Bitset); RX_DECL void rx_bitset_complement (int, rx_Bitset); @@ -496,11 +496,14 @@ RX_DECL void rx_bitset_assign (int, rx_Bitset, rx_Bitset); RX_DECL void rx_bitset_union (int, rx_Bitset, rx_Bitset); RX_DECL void rx_bitset_intersection (int, rx_Bitset, rx_Bitset); RX_DECL void rx_bitset_difference (int, rx_Bitset, rx_Bitset); -RX_DECL void rx_bitset_revdifference (int, rx_Bitset, rx_Bitset); +//RX_DECL void rx_bitset_revdifference (int, rx_Bitset, rx_Bitset); +#ifdef emacs RX_DECL void rx_bitset_xor (int, rx_Bitset, rx_Bitset); +#endif RX_DECL unsigned long rx_bitset_hash (int, rx_Bitset); +#if 0 #ifdef __STDC__ RX_DECL int rx_bitset_is_equal (int size, rx_Bitset a, rx_Bitset b) @@ -522,6 +525,7 @@ rx_bitset_is_equal (size, a, b) b[0] = s; return !x && s == a[0]; } +#endif #ifdef __STDC__ RX_DECL int @@ -539,7 +543,7 @@ rx_bitset_is_subset (size, a, b) return x == -1; } - +#if 0 #ifdef __STDC__ RX_DECL int rx_bitset_empty (int size, rx_Bitset set) @@ -558,6 +562,7 @@ rx_bitset_empty (size, set) set[0] = s; return !s; } +#endif #ifdef __STDC__ RX_DECL void @@ -676,6 +681,7 @@ rx_bitset_difference (size, a, b) } +#if 0 #ifdef __STDC__ RX_DECL void rx_bitset_revdifference (int size, @@ -692,7 +698,10 @@ rx_bitset_revdifference (size, a, b) for (x = rx_bitset_numb_subsets(size) - 1; x >=0; --x) a[x] = ~a[x] & b[x]; } +#endif + +#ifdef emacs #ifdef __STDC__ RX_DECL void rx_bitset_xor (int size, rx_Bitset a, rx_Bitset b) @@ -708,6 +717,7 @@ rx_bitset_xor (size, a, b) for (x = rx_bitset_numb_subsets(size) - 1; x >=0; --x) a[x] ^= b[x]; } +#endif #ifdef __STDC__ @@ -1305,6 +1315,7 @@ rx_mk_r_side_effect (rx, a) } +#if 0 #ifdef __STDC__ RX_DECL struct rexp_node * rx_mk_r_data (struct rx * rx, @@ -1324,6 +1335,7 @@ rx_mk_r_data (rx, a) } return n; } +#endif #ifdef __STDC__ RX_DECL void @@ -5744,11 +5756,13 @@ rx_compile (pattern, size, syntax, rxb) handle_close: /* See similar code for backslashed left paren above. */ - if (COMPILE_STACK_EMPTY) - if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD) - goto normal_char; - else - return REG_ERPAREN; + if (COMPILE_STACK_EMPTY) { + if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD) { + goto normal_char; + } else { + return REG_ERPAREN; + } + } /* Since we just checked for an empty stack above, this ``can't happen''. */ diff --git a/libc/misc/time/Makefile b/libc/misc/time/Makefile index 2ee2a14e0..252a67e09 100644 --- a/libc/misc/time/Makefile +++ b/libc/misc/time/Makefile @@ -1,20 +1,37 @@ -# Copyright (C) 1996 Robert de Bath -# This file is part of the Linux-8086 C library and is distributed -# under the GNU Library General Public License. +# Makefile for uCLibc +# +# Copyright (C) 2000 by Lineo, inc. +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU Library General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) any +# later version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., 59 Temple +# Place, Suite 330, Boston, MA 02111-1307 USA +# +# Derived in part from the Linux-8086 C library, the GNU C Library, and several +# other sundry sources. Files within this library are copyright by their +# respective copyright holders. TOPDIR=../ include $(TOPDIR)Rules.make - -CFLAGS+=-I$(TOPDIR)include/linux - -LIBC=../libc.a +LIBC=$(TOPDIR)libc.a OBJ=localtime.o gmtime.o asctime.o ctime.o asc_conv.o tm_conv.o mktime.o \ localtime_r.o gmtime_r.o asctime_r.o ctime_r.o -all: $(LIBC) +all: $(OBJ) $(LIBC) -$(LIBC): $(LIBC)($(OBJ)) +$(LIBC): $(OBJ) + $(AR) $(ARFLAGS) $(LIBC) $(OBJ) clean: - rm -f *.o libc.a + rm -f *.[oa] *~ core + -- cgit v1.2.3