From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,fbad70a492b9b85f,start X-Google-Attributes: gidf678f,public From: Liyun Wang Subject: Makefile question Date: 1997/04/04 Message-ID: <334529E7.41C6@gsfc.nasa.gov>#1/1 X-Deja-AN: 230702266 Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Newsgroups: comp.unix.osf.misc Hi, I am writing a Makefile in which I need to "extract" file names without directory paths from a target list which contains list of files with full directory path: e.g. FLIST = /usr/local/bin/file1 /usr/local/bin/file2 /usr/local/bin/file3 ... $(FLIST): # Make macro AAA, from $@, which contains only file1, etc. How do I extract file1, file2, etc., from $@ or any of internal macros to form new marco AAA to be used in later part of my Makefile? I tried $(FLIST): AAA=`echo $@ | sed -e "s|/usr/local/bin/||"` echo $(AAA) but it did not work. If any of you could help, I would greatly appreciate it. Thanks in advance! Liyun -- ================================================================== Liyun Wang | FAX: 301-286-0264 G1 Building 26, SOHO EAF | Voice: 301-286-3126 NASA, GSFC, Code 682.3 | Liyun.Wang.1@gsfc.nasa.gov Greenbelt, MD 20771 | http://orpheus.nascom.nasa.gov/~lwang ==================================================================