]> git.tuebingen.mpg.de Git - osl.git/blobdiff - Makefile
fsck.c depends on errtab.h.
[osl.git] / Makefile
index f9e505514652537f3ffb80b96aa3cf532966ff7f..24775a4de7c508346da2de01dfaaad44c8de8d85 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -93,24 +93,24 @@ endif
 all: $(realname) oslfsck
 Makefile.deps: $(wildcard *.c *.h)
        $(CC) -MM -MG *.c > $@
-osl.c: errtab.h
-
+osl.c fsck.c: errtab.h
 
 -include Makefile.deps
 
 fsck.cmdline.o: fsck.cmdline.c fsck.cmdline.h
        $(CC) -c -DVERSION='"$(VERSION)"' $<
 
-%.fsck.o: %.c Makefile
+%.fsck.o: %.c Makefile fsck.cmdline.c fsck.cmdline.h
        $(CC) -c -DVERSION='"$(VERSION)"' $(CPPFLAGS) $(CFLAGS) $< -o $@
 
 %.o: %.c Makefile
        $(CC) -c $(CPPFLAGS) $(CFLAGS) $(LIBCFLAGS) $<
 
-fsck.cmdline.h fsck.cmdline.c: fsck.ggo
+fsck.cmdline.h fsck.cmdline.c: fsck.ggo Makefile
        gengetopt $$O \
                --conf-parser \
                --unamed-opts=table \
+               --no-handle-version \
                --file-name=fsck.cmdline \
                --func-name=fsck_cmdline_parser \
                --set-package="oslfsck" \
@@ -126,14 +126,15 @@ $(realname): $(objects)
 osl_errors.h: errlist
        sed -e 's/\([A-Z_]*\)   .*/     E_OSL_\1/' \
                -e '1s/^/enum osl_errors {/1' \
+               -e '1s/$$/=1/1' \
                -e '$$!s/$$/,/g' \
                -e '$$s/$$/};/1' $< > $@
 
 errtab.h: errlist
        sed -e 's/^\([A-Z_]*\)\s*\(.*\)/_S(E_OSL_\1, \2)/g' $< > $@
 
-osl.h: osl.h.in osl_errors.h
-       cat $^ > $@
+osl.h: osl.h.in osl_errors.h Makefile
+       cat osl.h.in osl_errors.h > $@
 clean:
        rm -f *.o $(realname) osl.h osl_errors.h errtab.h fsck.cmdline.h fsck.cmdline.c