Error codes must not start with zero.
[osl.git] / Makefile
index 3259a3ab37cb37e929c4cbcc9d869f4f3ee23214..bcb5cea550c1f332e6f57adfa9066292992206dd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -90,7 +90,7 @@ ifeq ($(uname_s),SunOS)
        CPPFLAGS += -I/opt/csw/include
 endif
 
-all: $(realname)
+all: $(realname) oslfsck
 Makefile.deps: $(wildcard *.c *.h)
        $(CC) -MM -MG *.c > $@
 osl.c: errtab.h
@@ -101,7 +101,7 @@ osl.c: errtab.h
 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
@@ -126,6 +126,7 @@ $(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' $< > $@