From 70959ae3467fdf39fb4303adfebafcbd00e4f637 Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Thu, 10 Apr 2014 12:29:11 +0200 Subject: build: add DESTDIR support This change implements support for specifying an alternative installation destination directory by setting DESTDIR when calling 'make install'. Example: make DESTDIR=/alternative-rootfs install It is particularly useful when cross-compiling and installing in a dedicated directory where for example the rootfs or a build sandbox for the target architecture is mounted. By using DESTDIR you can avoid to mess with PREFIX to include the alternative installation directory! Signed-off-by: Christian Wiese Signed-off-by: Daniel Borkmann --- trafgen/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'trafgen') diff --git a/trafgen/Makefile b/trafgen/Makefile index 8868214..e41a6da 100644 --- a/trafgen/Makefile +++ b/trafgen/Makefile @@ -31,7 +31,7 @@ trafgen-eflags = $(shell pkg-config --cflags libnl-3.0) \ trafgen-confs = trafgen_stddef.h trafgen_post_install: - $(Q)mv $(ETCDIRE)/trafgen_stddef.h $(ETCDIRE)/stddef.h + $(Q)mv $(DESTDIR)$(ETCDIRE)/trafgen_stddef.h $(DESTDIR)$(ETCDIRE)/stddef.h trafgen_clean_custom: $(Q)$(call RM,$(BUILD_DIR)/*.h $(BUILD_DIR)/*.c) -- cgit v1.2.3-54-g00ecf