X-Git-Url: http://j8takagi.net/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2FMakefile;h=1da58bf6f8b0078f8508e0692d80ca439cd89cac;hb=68a2c524720903ba9c54ee298f7d8a8978619f70;hp=ab66853fdb49e29f4c0e5028aa996d0ce3c5bd55;hpb=b3f91f53a0a715249df3582be19d064f831619a0;p=YACASL2.git diff --git a/src/Makefile b/src/Makefile index ab66853..1da58bf 100644 --- a/src/Makefile +++ b/src/Makefile @@ -4,6 +4,7 @@ RMF ?= rm -f WHICH ?= which CTAGS ?= ctags ETAGS ?= etags +SED ?= sed INCLUDE := ../include @@ -12,9 +13,12 @@ CASL2SRC := struct.c hash.c ASSRC := assemble.c token.c label.c EXECSRC := exec.c dump.c -.PHONY: all clean +.PHONY: all version clean -all: ../casl2 ../comet2 ../dumpword ctags etags +all: version ../casl2 ../comet2 ../dumpword ctags etags + +version: + $(MAKE) -C .. version ../casl2: casl2.o $(subst .c,.o,$(COMMONSRC) $(CASL2SRC) $(ASSRC) $(EXECSRC)) $(CC) $(CFLAGS) -o $@ $^ @@ -32,15 +36,15 @@ all: ../casl2 ../comet2 ../dumpword ctags etags $(CC) -c $(CFLAGS) $< %.d: %.c - @$(CC) -MM -I $(INCLUDE) $< | sed 's/\($*\.o\):/\1 $@:/g' >$@ + @$(CC) -MM -I $(INCLUDE) $< | $(SED) 's/\($*\.o\):/\1 $@:/g' >$@ -include $(subst .c,.d,casl2.c comet2.c dumpword.c $(COMMONSRC) $(CASL2SRC) $(ASSRC) $(EXECSRC)) ctags: $(INCLUDE)/*.h *.c - @($(WHICH) $(CTAGS) && $(CTAGS) $^) >/dev/null + @$(WHICH) $(CTAGS) >/dev/null && $(CTAGS) $^ etags: $(INCLUDE)/*.h *.c - @($(WHICH) $(ETAGS) && $(ETAGS) $^) >/dev/null + @$(WHICH) $(ETAGS) >/dev/null && $(ETAGS) $^ clean: clean_cmd clean_build clean_tags