summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Moore <Robert.Moore@intel.com>2012-09-05 08:22:39 -0700
committerRobert Moore <Robert.Moore@intel.com>2012-09-05 08:22:39 -0700
commite6d56d167f055e2147d2953b447f1ca54a2731d6 (patch)
treef14f26a9d2891760f3df4558be4d0c68c9ce6e27
parent3d75370ac8219b5dc3faa1bce695d849c77a3aee (diff)
downloadacpica-e6d56d167f055e2147d2953b447f1ca54a2731d6.tar.gz
Makefiles: Ensure that binary files always copied properly.
Minor rule change to ensure that the final binary output files are always copied up to the appropriate binary directory (bin32 or bin64.)
-rw-r--r--generate/unix/Makefile.config23
-rw-r--r--generate/unix/Makefile.rules1
2 files changed, 16 insertions, 8 deletions
diff --git a/generate/unix/Makefile.config b/generate/unix/Makefile.config
index 4bcaed3b9..5a42cc841 100644
--- a/generate/unix/Makefile.config
+++ b/generate/unix/Makefile.config
@@ -40,18 +40,25 @@ BINDIR = bin$(BITS)
BITSFLAG = -m$(BITS)
COMPILEOBJ = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $<
LINKPROG = $(CC) $(OBJECTS) -o $(PROG) $(LDFLAGS)
+INSTALLDIR = /usr/bin
+INSTALLPROG = install -D ../$(BINDIR)/$(PROG) $(DESTDIR)$(INSTALLDIR)/$(PROG)
-COPYPROG = \
- @mkdir -p ../$(BINDIR); \
- if [ -e "$(PROG).exe" ] ; then \
+#
+# Rename a .exe file if necessary
+#
+RENAMEPROG = \
+ @if [ -e "$(PROG).exe" ] ; then \
mv $(PROG).exe $(PROG); \
echo "Renamed $(PROG).exe to $(PROG)"; \
- fi; \
- cp --remove-destination $(PROG) ../$(BINDIR); \
- echo "Copied $(PROG) to ../$(BINDIR)";
+ fi;
-INSTALLDIR = /usr/bin
-INSTALLPROG = install -D ../$(BINDIR)/$(PROG) $(DESTDIR)$(INSTALLDIR)/$(PROG)
+#
+# Copy the final file to the local bin[32|64] directory
+#
+COPYPROG = \
+ @mkdir -p ../$(BINDIR); \
+ cp --remove-destination $(PROG) ../$(BINDIR); \
+ echo "Copied $(PROG) to $(FINAL_PROG)";
#
# Main ACPICA source directories
diff --git a/generate/unix/Makefile.rules b/generate/unix/Makefile.rules
index 184630cd5..2ec8b8bea 100644
--- a/generate/unix/Makefile.rules
+++ b/generate/unix/Makefile.rules
@@ -12,6 +12,7 @@ $(FINAL_PROG) : $(PROG)
$(PROG) : $(INTERMEDIATES) $(MISC) $(OBJECTS)
$(LINKPROG)
+ $(RENAMEPROG)
$(OBJDIR)/%.o : %.c $(HEADERS) $(ACPICA_HEADERS)
$(COMPILEOBJ)