diff --git a/Makefile.am b/Makefile.am index eb249792d..34e152871 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,7 +29,8 @@ include/serno.h: echo '#define SERNO "'$$revh'"' >include/serno.h ; \ echo "#define DATECODE $${datecode}UL" >>include/serno.h; \ fi \ - else \ + fi + @if [ ! -f include/serno.h ]; then \ echo '#define SERNO "unknown"' >include/serno.h; \ echo '#define DATECODE 0UL' >>include/serno.h; \ fi diff --git a/librb/Makefile.am b/librb/Makefile.am index 2cfeb8e2b..a21a3026f 100644 --- a/librb/Makefile.am +++ b/librb/Makefile.am @@ -9,4 +9,10 @@ BUILT_SOURCES = include/serno.h # NOTE: you'll want to change the below if you are unbundling include/serno.h: - @cp ../include/serno.h include/ + @if [ -f ../include/serno.h ]; then \ + cp ../include/serno.h include/; \ + else \ + echo '#define SERNO "unknown"' >include/serno.h; \ + echo '#define DATECODE 0UL' >>include/serno.h; \ + fi +