|
|
1.1 ! root 1: S = ../src ! 2: LENGTH = 7 ! 3: FILES = $S/*.[ch] ! 4: NAMES = names $(LENGTH) ! 5: DUPS = dups $(LENGTH) ! 6: INC = /usr/include ! 7: ! 8: remap.h : duplist2 defines ! 9: cat header.h >$@ ! 10: defines <duplist2 >>$@ ! 11: ! 12: duplist2 : duplist exclude ! 13: comm -13 exclude duplist >$@ ! 14: ! 15: duplist : dups names ! 16: cat $(FILES) | $(NAMES) | sort | uniq | $(DUPS) | sort | uniq >$@ ! 17: ! 18: # There are two files, reserved and special, which contain the names of ! 19: # strings which must not be remapped. In general, reserved contains strings ! 20: # which are meaningful to the C preprocessor or compiler, and "special" ! 21: # contains special emacs strings that must not be remapped (they are the ! 22: # basename of an include file for example; actually this is a holdover from ! 23: # when sed or m4 was used to do the remapping, not needed with cpp remapping). ! 24: # ! 25: # Note, because "cut" is braindamaged and does not return explicit status, ! 26: # and since the status returned to make is that of the last program in the ! 27: # pipeline, we filter the final result through cat to avoid killing make. ! 28: ! 29: exclude : reserved special ! 30: cat reserved special >tempfile ! 31: grep "^#[ \t]*define" $(INC)/*.h | tr -s "\040\011#()" ":::::" | cut -f3 -d: | cat >>tempfile ! 32: grep "^#[ \t]*define" $(INC)/sys/*.h | tr -s "\040\011#()" ":::::" | cut -f3 -d: | cat >>tempfile ! 33: grep "^#[ \t]*define" $S/*.[ch] | tr -s "\040\011#()" ":::::" | cut -f3 -d: | cat >>tempfile ! 34: sort <tempfile | uniq >$@ ! 35: rm -f tempfile ! 36: ! 37: dups : dups.c ! 38: $(CC) -O -o $@ $? ! 39: ! 40: names : names.c ! 41: $(CC) -O -o $@ $? ! 42: ! 43: defines : defines.c ! 44: $(CC) -O -o $@ $?
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.