|
From: | Palani Chinnakannan (pals) |
Subject: | Creating a header file dependency. |
Date: | Sun, 30 May 2010 22:01:41 -0700 |
Hello, We
are used to this concept of staging a set of header files from our components during build. So, each
sub-system/component specifies a list of header files that needs to be staged. They also
specify a staging directory. Now,
I am creating a dependency between the original header and the staged header so that the staging takes place only
when the original header changes. (Otherwise, a blind copy breaks the
dependency and leads to unnecessary rebuilds. So, when I do this
based on the following, I expect only the changed file to be staged. However, looks like every file gets
staged from a component even though only one file is staged. Here is my Makefile. When I do make all it exports all
file even if only one file is changed. # Default target must appear before any include lines .PHONY: all # # Customizations for this local Makefile EXPORT_HDR_PATH :=
$(CLUSTER_OS_ROOT)/BUILD/inc/common/clos_sdk EXPORT_HDRS :=
\ ../include/clos_api_socket_funcs.h
\ ../include/clos_api_cerrno.h
\ ../include/clos_api_services.h EXPORT_LIB_PATH :=
EXPORT_LIBS :=
EXPORTED_HDRS :=
$(addprefix $(EXPORT_HDR_PATH)/,$(notdir $(EXPORT_HDRS))) $(EXPORTED_HDRS): $(EXPORT_HDRS) @echo
"updating header: $? "; cp
$? $(EXPORT_HDR_PATH) install: $(EXPORTED_HDRS) all: install clean: rm
-f $(ARCH)/* distclean: clean rm
-f $(EXPORT_HDR_PATH)/*.h |
[Prev in Thread] | Current Thread | [Next in Thread] |