diff --git a/Makefile b/Makefile index 0786107d..9838cb0f 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,10 @@ CC = gcc -CFLAGS = -Os -Wall +CFLAGS = -Os -Wall -DVERSION=\"$(VERSION)\" -DWHOAMI=\"`whoami`@`hostname`\" LD = gcc LDFLAGS = LIBS = - +VERSION = 0.1 +PKG = finit-$(VERSION) #### Configurable parameters @@ -43,3 +44,11 @@ clean: finit.o: finit.c Makefile finit-mod.o: finit-mod.c Makefile + +dist: + rm -Rf $(PKG) + mkdir $(PKG) + cp Makefile README finit.c finit-mod.c finit-alt.c $(PKG) + tar cf - $(PKG) | gzip -c > $(PKG).tar.gz + rm -Rf $(PKG) + ls -l $(PKG).tar.gz diff --git a/finit-alt.c b/finit-alt.c index 94e8d2aa..39cadfe1 100644 --- a/finit-alt.c +++ b/finit-alt.c @@ -39,7 +39,6 @@ THE SOFTWARE. #include #include -#define VERSION "0.0" #ifdef DEBUG #define debug(x...) do { \ @@ -127,7 +126,7 @@ int main() char *x; sigset_t nmask, nmask2; - puts("finit " VERSION); + puts("finit-alt " VERSION " (built " __DATE__ " by " WHOAMI ")"); chdir("/"); umask(022); diff --git a/finit-mod.c b/finit-mod.c index 2de83194..a70431f7 100644 --- a/finit-mod.c +++ b/finit-mod.c @@ -108,6 +108,8 @@ int main() char *x; sigset_t nmask, nmask2; + puts("finit-mod " VERSION " (built " __DATE__ " by " WHOAMI ")"); + chdir("/"); umask(022);