Browse Source

make sure we only create libm.a before running through subdirs, then install it

Mike Frysinger 20 years ago
parent
commit
d4fad9c64e
1 changed files with 6 additions and 3 deletions
  1. 6 3
      libm/Makefile

+ 6 - 3
libm/Makefile

@@ -89,9 +89,12 @@ else
 all: $(LIBM) subdirs
 endif
 
-$(LIBM) ar-target: $(OBJS)
-ifeq ($(strip $(UCLIBC_HAS_FLOATS)),y)
+ifneq ($(strip $(UCLIBC_HAS_FLOATS)),y)
+$(LIBM) ar-target:
+else
+ar-target: $(OBJS)
 	$(AR) $(ARFLAGS) $(LIBM) $(OBJS)
+$(LIBM): ar-target
 	$(INSTALL) -d $(TOPDIR)lib
 	$(RM) $(TOPDIR)lib/$(LIBM)
 	$(INSTALL) -m 644 $(LIBM) $(TOPDIR)lib
@@ -125,7 +128,7 @@ clean: subdirs_clean
 subdirs: $(patsubst %, _dir_%, $(DIRS))
 subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
 
-$(patsubst %, _dir_%, $(DIRS)): $(LIBM)
+$(patsubst %, _dir_%, $(DIRS)): ar-target
 	$(MAKE) -C $(patsubst _dir_%, %, $@)
 
 $(patsubst %, _dirclean_%, $(ALL_SUBDIRS)): dummy