Split unmangling from uudecoding, don't unmangle in place
authorproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Wed, 23 Jul 2008 21:15:34 +0000 (21:15 +0000)
committerproski <proski@0192ed92-7a03-0410-a25b-9323aeb14dbd>
Wed, 23 Jul 2008 21:15:34 +0000 (21:15 +0000)
Conversions in place should be avoided in the build system because make
doesn't know if the conversion has taken place.  Use a different name
for HAL before unmangling.  Respect the build quietness settings.

Simplify Linux 2.4 rules so that the commands for decoding and
unmangling are written only once.

git-svn-id: http://madwifi-project.org/svn/madwifi/trunk@3815 0192ed92-7a03-0410-a25b-9323aeb14dbd

ath_hal/Makefile

index d2722c057dbb6eddae63a3f1156cd865f6ff780c..9314a6996fec84f25f04eed65c23d9d1a65fcb9c 100644 (file)
@@ -79,17 +79,25 @@ endif
 quiet_cmd_uudecode = UUDECODE $@
       cmd_uudecode = $(obj)/uudecode -o $@ $<
 
-$(obj)/$(TARGET).hal.o: $(HAL)/public/$(TARGET).hal.o.uu $(obj)/uudecode
+$(obj)/$(TARGET)._hal.o: $(HAL)/public/$(TARGET).hal.o.uu $(obj)/uudecode
 ifdef LINUX24
-       $(Q)$(obj)/uudecode -o $@ $<
+       $(cmd_uudecode)
 else
        $(call if_changed,uudecode)
 endif
+
 # Replace as many hashed names as possible with meaningful
 # ones in the symbol table of the binary kernel module for HAL.
-       $(filter-out -O binary -S,$(OBJCOPY)) \
-               $$(cat $(TOP)/scripts/hal_unmangle.objcopy) \
-               $(obj)/$(TARGET).hal.o
+quiet_cmd_unmangle = UNMANGLE $@
+      cmd_unmangle = $(filter-out -O binary -S,$(OBJCOPY)) \
+               $$(cat $(TOP)/scripts/hal_unmangle.objcopy) $< $@
+
+$(obj)/$(TARGET).hal.o: $(obj)/$(TARGET)._hal.o
+ifdef LINUX24
+       $(cmd_unmangle)
+else
+       $(call if_changed,unmangle)
+endif
 
 .PHONY: install
 install: