help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: too many .o files in a directory


From: Paul D. Smith
Subject: Re: too many .o files in a directory
Date: Tue, 2 May 2006 18:31:04 -0400

%% "John Stoffel" <address@hidden> writes:

  js>     Alib(A*.o): A*.o
  js>       ar cf Alib A*.o

  js> or maybe something like this:

  js>     AFlib([A-F]*.o): [A-F]*.o
  js>       ar cf AFlib [A-F]*.o

Globbing is for shells; make doesn't do globs.

Remember that globs in the shell, like:

            ar cf AFlib [A-F]*.o

are resolved _BY THE SHELL_, not by your command (ar), so this doesn't
save any space on the command line.  It still expands to all the files
and so the exec will still take just as much room.

  js> But I can't seem to make this work properly for some reason. 

You have to split up the files inside make, _before_ you send them to
the shell.  Maybe something like:

  VCS_OBS := 5NrI_d.o 5NrIB_d.o lOsn_1_d.o ... \
     .... \
     .... \

  VCS_OBS_AM := $(filter A% B% C% D% E% F% G% H% I% J% K% L% M%,$(VCS_OBS))

  VCS_OBS_NZ := $(filter-out $(VCS_OBS_AM),$(VCS_OBS))

This is pretty inefficient but it should work.

Now you can create libraries for each set.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

[Prev in Thread] Current Thread [Next in Thread]