Avoid the problem of lines too long on HP
[u/mrichter/AliRoot.git] / conf / GeneralMacros
index e7b0ef16c004ae4f965d19d214d787fee80423e8..fd2a67f597980f85f767b3487f2abf00f4986c6e 100644 (file)
@@ -2,33 +2,35 @@
 
 $(SLIBRARY):
                @echo "Generating $@ for $(PACKAGE)..."
+               @[ -d $(dir $@) ] || mkdir $(dir $@)
                @rm -f $@
                 ifeq ($(PLATFORM),aix)
-                  @$(SHLD) -o $@ $(LIBS) -p 0 $^
+                  @cd $(ALICE_TARGET) ;\
+                  $(SHLD) -o $@ $(LIBS) -p 0 $(patsubst $(ALICE_TARGET)/%,%,$(filter-out dirs,$^))
                 else
-                  @$(SHLD) $(SOFLAGS) $(LDFLAGS) $^ $(SHLIB) -o $@
+                  @cd $(ALICE_TARGET) ;\
+                  $(SHLD) $(SOFLAGS) $(LDFLAGS) $(patsubst $(ALICE_TARGET)/%,%,$(filter-out dirs,$^)) $(SHLIB) -o $@
                 endif
                @chmod 555 $@
                @echo "$@ done"
 
 
-$(ALIBRARY):
+$(ALIBRARY):   
                @echo "Generating $@ for $(PACKAGE)..."
+               @[ -d $(dir $@) ] || mkdir $(dir $@)
                @rm -f $@
                @ar rv $@ $^
                @echo "$@ done"
  
-$(PROGRAM):
+$(PROGRAM):    
                @echo "Generating $@ for $(PACKAGE)..."
+               @[ -d $(dir $@) ] || mkdir $(dir $@)
                @rm -f $@
                @$(LD) $(LDFLAGS) $^ $(LIBS) -o $@
                @echo "$@ done"
  
 headers:       $(patsubst %,$(ALICE_ROOT)/include/%,$(HEADERS))
 
-$(patsubst %,$(ALICE_ROOT)/include/%,$(HEADERS)) : $(ALICE_ROOT)/include/% : %
-               @cp -p $^ $@
-
 $(DICT):
                @echo "Generating $@ for $(PACKAGE)..."
                @rootcint -f $@ -c -I$(ALICE_ROOT)/include $^