Author: dcoakley
Date: 2011-02-22 03:54:12 -0500 (Tue, 22 Feb 2011)
New Revision: 3486
Modified:
trunk/osprey/common/targ_info/Makefile.gbase
Log:
Use pattern rules for make recipes that produce multiple targets.
This is the documented way to ensure that GNU make handles this kind of
target correctly for a parallel make.
The previous rule for the generated files targ_si.[ch] was incorrect
and could cause a build failure when using make with the '-j' option,
because make would try to build targ_si.h and targ_si.c by invoking the
generator two times in parallel.
Approved by: Jian-Xin Lai
Modified: trunk/osprey/common/targ_info/Makefile.gbase
===================================================================
--- trunk/osprey/common/targ_info/Makefile.gbase 2011-02-22 00:34:59 UTC
(rev 3485)
+++ trunk/osprey/common/targ_info/Makefile.gbase 2011-02-22 08:54:12 UTC
(rev 3486)
@@ -1,6 +1,6 @@
# -*- Makefile -*-
#
-# Copyright (C) 2009-2010 Advanced Micro Devices, Inc. All Rights Reserved.
+# Copyright (C) 2009-2011 Advanced Micro Devices, Inc. All Rights Reserved.
#
# Copyright (C) 2007. Pathscale, LLC. All Rights Reserved.
#
@@ -305,8 +305,7 @@
## topcode.[ch] ##
ifeq ($(COPYSOURCEDIR), FALSE)
-topcode.c: topcode.h
-topcode.h: isa_gen
+topcod%.c topcod%.h: isa_gen
$(run) ./isa_gen
else
topcode.c: $(COPYSOURCEDIR)/topcode.c
@@ -328,8 +327,7 @@
## targ_isa_enums.[ch] ##
ifeq ($(COPYSOURCEDIR), FALSE)
-targ_isa_enums.c: targ_isa_enums.h
-targ_isa_enums.h: isa_enums_gen
+tar%_isa_enums.c tar%_isa_enums.h: isa_enums_gen
$(run) ./isa_enums_gen
else
targ_isa_enums.c: $(COPYSOURCEDIR)/targ_isa_enums.c
@@ -351,8 +349,7 @@
## targ_isa_lits.[ch] ##
ifeq ($(COPYSOURCEDIR), FALSE)
-targ_isa_lits.c: targ_isa_lits.h
-targ_isa_lits.h: isa_lits_gen
+tar%_isa_lits.c tar%_isa_lits.h: isa_lits_gen
$(run) ./isa_lits_gen
else
targ_isa_lits.c: $(COPYSOURCEDIR)/targ_isa_lits.c
@@ -374,8 +371,7 @@
## targ_isa_registers.[ch] ##
ifeq ($(COPYSOURCEDIR), FALSE)
-targ_isa_registers.c: targ_isa_registers.h
-targ_isa_registers.h: isa_registers_gen
+tar%_isa_registers.c tar%_isa_registers.h: isa_registers_gen
$(run) ./isa_registers_gen
else
targ_isa_registers.c: $(COPYSOURCEDIR)/targ_isa_registers.c
@@ -399,8 +395,7 @@
## targ_isa_hazards.[ch] ##
ifeq ($(COPYSOURCEDIR), FALSE)
-targ_isa_hazards.c: targ_isa_hazards.h
-targ_isa_hazards.h: isa_hazards_gen
+tar%_isa_hazards.c tar%_isa_hazards.h: isa_hazards_gen
$(run) ./isa_hazards_gen
else
targ_isa_hazards.c: $(COPYSOURCEDIR)/targ_isa_hazards.c
@@ -424,8 +419,7 @@
## targ_isa_subset.[ch] ##
ifeq ($(COPYSOURCEDIR), FALSE)
-targ_isa_subset.c: targ_isa_subset.h
-targ_isa_subset.h: isa_subset_gen
+tar%_isa_subset.c tar%_isa_subset.h: isa_subset_gen
$(run) ./isa_subset_gen
else
targ_isa_subset.c: $(COPYSOURCEDIR)/targ_isa_subset.c
@@ -448,8 +442,7 @@
## targ_isa_properties.[ch] ##
ifeq ($(COPYSOURCEDIR), FALSE)
-targ_isa_properties.c: targ_isa_properties.h
-targ_isa_properties.h: isa_properties_gen
+tar%_isa_properties.c tar%_isa_properties.h: isa_properties_gen
$(run) ./isa_properties_gen
else
targ_isa_properties.c: $(COPYSOURCEDIR)/targ_isa_properties.c
@@ -472,8 +465,7 @@
## targ_isa_operands.[ch] ##
ifeq ($(COPYSOURCEDIR), FALSE)
-targ_isa_operands.c: targ_isa_operands.h
-targ_isa_operands.h: isa_operands_gen
+tar%_isa_operands.c tar%_isa_operands.h: isa_operands_gen
$(run) ./isa_operands_gen
else
targ_isa_operands.c: $(COPYSOURCEDIR)/targ_isa_operands.c
@@ -505,8 +497,7 @@
## targ_isa_pack.[ch] ##
ifeq ($(COPYSOURCEDIR), FALSE)
-targ_isa_pack.c: targ_isa_pack.h
-targ_isa_pack.h: isa_pack_gen
+tar%_isa_pack.c tar%_isa_pack.h: isa_pack_gen
$(run) ./isa_pack_gen
else
targ_isa_pack.c: $(COPYSOURCEDIR)/targ_isa_pack.c
@@ -530,8 +521,7 @@
## targ_isa_decode.[ch] ##
ifeq ($(COPYSOURCEDIR), FALSE)
-targ_isa_decode.c: targ_isa_decode.h
-targ_isa_decode.h: isa_decode_gen
+tar%_isa_decode.c tar%_isa_decode.h: isa_decode_gen
$(run) ./isa_decode_gen
else
targ_isa_decode.c: $(COPYSOURCEDIR)/targ_isa_decode.c
@@ -555,8 +545,7 @@
## targ_isa_pseudo.[ch] ##
ifeq ($(COPYSOURCEDIR), FALSE)
-targ_isa_pseudo.c: targ_isa_pseudo.h
-targ_isa_pseudo.h: isa_pseudo_gen
+tar%_isa_pseudo.c tar%_isa_pseudo.h: isa_pseudo_gen
$(run) ./isa_pseudo_gen
else
targ_isa_pseudo.c: $(COPYSOURCEDIR)/targ_isa_pseudo.c
@@ -583,8 +572,7 @@
## targ_isa_print.[ch] ##
ifeq ($(COPYSOURCEDIR), FALSE)
-targ_isa_print.c: targ_isa_print.h
-targ_isa_print.h: isa_print_gen
+tar%_isa_print.c tar%_isa_print.h: isa_print_gen
$(run) ./isa_print_gen
else
targ_isa_print.c: $(COPYSOURCEDIR)/targ_isa_print.c
@@ -609,8 +597,7 @@
## targ_abi_properties.[ch] ##
ifeq ($(COPYSOURCEDIR), FALSE)
-targ_abi_properties.c: targ_abi_properties.h
-targ_abi_properties.h: abi_properties_gen
+tar%_abi_properties.c tar%_abi_properties.h: abi_properties_gen
$(run) ./abi_properties_gen
else
targ_abi_properties.c: $(COPYSOURCEDIR)/targ_abi_properties.c
@@ -634,8 +621,7 @@
## targ_isa_bundle.[ch] ##
ifeq ($(COPYSOURCEDIR), FALSE)
-targ_isa_bundle.c: targ_isa_bundle.h
-targ_isa_bundle.h: isa_bundle_gen
+tar%_isa_bundle.c tar%_isa_bundle.h: isa_bundle_gen
$(run) ./isa_bundle_gen
else
targ_isa_bundle.c: $(COPYSOURCEDIR)/targ_isa_bundle.c
@@ -659,8 +645,7 @@
## targ_proc.[ch] ##
ifeq ($(COPYSOURCEDIR), FALSE)
-targ_proc.c: targ_proc.h
-targ_proc.h: proc_gen
+tar%_proc.c tar%_proc.h: proc_gen
$(run) ./proc_gen
else
targ_proc.c: $(COPYSOURCEDIR)/targ_proc.c
@@ -681,8 +666,7 @@
## targ_proc_properties.[ch] ##
ifeq ($(COPYSOURCEDIR), FALSE)
-targ_proc_properties.c: targ_proc_properties.h
-targ_proc_properties.h: proc_properties_gen
+tar%_proc_properties.c tar%_proc_properties.h: proc_properties_gen
$(run) ./proc_properties_gen
else
targ_proc_properties.c: $(COPYSOURCEDIR)/targ_proc_properties.c
@@ -772,7 +756,7 @@
$(cxx) $(CXXLDFLAGS) $^ -o $@
ifeq ($(COPYSOURCEDIR), FALSE)
-targ_si.c targ_si.h: targ_si_gen
+tar%_si.c tar%_si.h: targ_si_gen
$(run) ./targ_si_gen
else
targ_si.c: $(COPYSOURCEDIR)/targ_si.c
------------------------------------------------------------------------------
Index, Search & Analyze Logs and other IT data in Real-Time with Splunk
Collect, index and harness all the fast moving IT data generated by your
applications, servers and devices whether physical, virtual or in the cloud.
Deliver compliance at lower cost and gain new business insights.
Free Software Download: http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Open64-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open64-devel