Author: dcoakley
Date: 2010-09-17 11:52:00 -0400 (Fri, 17 Sep 2010)
New Revision: 3343
Modified:
trunk/Makefile.in
trunk/osprey/libhugetlbfs/Makefile.gbase
trunk/osprey/targdir_lib/Makefile.in
Log:
Avoid bash-specific redirection operators in make rules.
For the top-level clean action, clean both 'lib' and 'lib2' targets if
they are in use. Do not clean GNU3 components if not building them.
For libhugetlbfs, ensure that make does not try to build the 'version'
file in the source tree using an implicit rule for creating executables.
Approved by: Suneel Jain
Modified: trunk/Makefile.in
===================================================================
--- trunk/Makefile.in 2010-09-14 01:02:22 UTC (rev 3342)
+++ trunk/Makefile.in 2010-09-17 15:52:00 UTC (rev 3343)
@@ -163,8 +163,10 @@
# Use all to build compiler (build) and libraries (lib)
# If BUILD_MULTILIB is YES, build a second library as well.
ALL_TARGETS = build lib
+CLEAN_LIB = clean-lib
ifeq ($(BUILD_MULTILIB), YES)
ALL_TARGETS += lib2
+CLEAN_LIB += clean-lib2
endif
all: $(ALL_TARGETS)
@@ -352,27 +354,19 @@
library lib library2 lib2 : build
library lib clean-library clean-lib library2 lib2 clean-library2 clean-lib2:
- +...@for d in $(LOCAL_LIB_BUILD_DIR); do \
- echo $(MAKE) -C $$d $(LOCAL_LIB_ACTION) $(LOCAL_LIB_ARGS); \
- $(MAKE) -C $$d $(LOCAL_LIB_ACTION) $(LOCAL_LIB_ARGS); \
- retval=$$?; \
- if [ $$retval != 0 ]; then \
- if grep -q k <<<'$(MAKEFLAGS)'; then \
- exit=$$retval; \
- else \
- exit $$retval; \
- fi; \
- fi; \
- done; \
- exit $$exit
+ @echo "$(MAKE) -C $(LOCAL_LIB_BUILD_DIR) $(LOCAL_LIB_ACTION)
$(LOCAL_LIB_ARGS)"; \
+ $(MAKE) -C $(LOCAL_LIB_BUILD_DIR) $(LOCAL_LIB_ACTION) $(LOCAL_LIB_ARGS)
clobber: clean
rm -rf $(CROSSDIR) $(BOOTDIR)
-clean: clean-lib
+
+clean: $(CLEAN_LIB)
$(MAKE) -C $(NATIVE_BUILD_DIR)/driver clobber
- $(MAKE) -C $(NATIVE_BUILD_DIR)/gccfe clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/wgen clobber
+ifeq ($(BUILD_GNU3), YES)
+ $(MAKE) -C $(NATIVE_BUILD_DIR)/gccfe clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/g++fe clobber
+endif
$(MAKE) -C $(NATIVE_BUILD_DIR)/be clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/cg clobber
$(MAKE) -C $(NATIVE_BUILD_DIR)/wopt clobber
Modified: trunk/osprey/libhugetlbfs/Makefile.gbase
===================================================================
--- trunk/osprey/libhugetlbfs/Makefile.gbase 2010-09-14 01:02:22 UTC (rev
3342)
+++ trunk/osprey/libhugetlbfs/Makefile.gbase 2010-09-17 15:52:00 UTC (rev
3343)
@@ -39,7 +39,7 @@
INSTALL = install
-LDFLAGS += --no-undefined-version
-Wl,--version-script=$(BUILD_BASE)/version.lds
+LDFLAGS += -Wl,--no-undefined-version
-Wl,--version-script=$(BUILD_BASE)/version.lds
CFLAGS ?= -O2 -g -DOPEN64_MOD -DM_PAGE
CFLAGS += -Wall -fPIC
CPPFLAGS += -D__LIBHUGETLBFS__ -I.
@@ -155,7 +155,7 @@
make $(VERSION)
make libs
-.PHONY: tests libs ldscripts
+.PHONY: tests libs ldscripts always
ldscripts: elf.xBD elf_1G.xBD
@@ -170,12 +170,18 @@
libs: $(foreach file,$(INSTALL_OBJ_LIBS),$(OBJDIRS:%=%/$(file)))
# <Version handling> MOD
-$(VERSION): $(BUILD_BASE)/version
+$(VERSION): version always
@$(VECHO) VERSION
- cp $(BUILD_BASE)/version version
$(BUILD_BASE)/localversion version $(SOURCE)
# </Version handling>
+version: $(BUILD_BASE)/version
+ @cp $(BUILD_BASE)/version version
+
+# Avoid implicit rule for source version file.
+$(BUILD_BASE)/version:
+ ;
+
snapshot: $(VERSION)
.SECONDARY:
Modified: trunk/osprey/targdir_lib/Makefile.in
===================================================================
--- trunk/osprey/targdir_lib/Makefile.in 2010-09-14 01:02:22 UTC (rev
3342)
+++ trunk/osprey/targdir_lib/Makefile.in 2010-09-17 15:52:00 UTC (rev
3343)
@@ -1,15 +1,17 @@
-default clean clobber:
- +...@for d in @LIBLIST@; do \
- echo "MAKE $@ in $(PWD)/$$d"; \
- $(MAKE) $(if $V,,--no-print-directory) -C $$d $@; \
- retval=$$?; \
- if [ $$retval != 0 ]; then \
- if grep -q k <<<'$(MAKEFLAGS)'; then \
- exit=$$retval; \
- else \
- exit $$retval; \
- fi; \
- fi; \
- done; \
- exit $$exit
+SUBDIRS = @LIBLIST@
+
+default: ACTION = default
+
+clean: ACTION = clean
+
+clobber: ACTION = clobber
+
+default clean clobber: $(SUBDIRS)
+
+$(SUBDIRS):
+ @echo "MAKE $(ACTION) in $(PWD)/$@"; \
+ $(MAKE) $(if $V,,--no-print-directory) -C $@ $(ACTION)
+
+.PHONY: default clean clobber @LIBLIST@
+
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Open64-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open64-devel