summaryrefslogtreecommitdiffstats
path: root/usr.sbin/crunch
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-01-17 14:21:21 +0000
committerbrian <brian@FreeBSD.org>1998-01-17 14:21:21 +0000
commitc73933598abd6a1d2341f4c5a98889ac0553c51f (patch)
tree66f3159bc05072bb04cd61207f7cb83f55c20642 /usr.sbin/crunch
parenta9f58b314583656d13806eceb2110a8ba618ef98 (diff)
downloadFreeBSD-src-c73933598abd6a1d2341f4c5a98889ac0553c51f.zip
FreeBSD-src-c73933598abd6a1d2341f4c5a98889ac0553c51f.tar.gz
Remove the necessity of -ldes and -lalias etc from release/Makefile.
When building a release, RELEASE_CRUNCH is defined for a `make' of the objects required by the crunch of each program. The object list is still obtained in the same way, so you must make sure that all objects are built (empty if necessary) by this make. ppp/Makefile provides an example. Reviewed by: jkh
Diffstat (limited to 'usr.sbin/crunch')
-rw-r--r--usr.sbin/crunch/crunchgen/crunchgen.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/crunch/crunchgen/crunchgen.c b/usr.sbin/crunch/crunchgen/crunchgen.c
index ae0a78f..946cbd1 100644
--- a/usr.sbin/crunch/crunchgen/crunchgen.c
+++ b/usr.sbin/crunch/crunchgen/crunchgen.c
@@ -748,6 +748,9 @@ void top_makefile_rules(FILE *outmk)
fprintf(outmk, "SUBMAKE_TARGETS=");
for(p = progs; p != NULL; p = p->next)
fprintf(outmk, " %s_make", p->ident);
+ fprintf(outmk, "\nSUBCLEAN_TARGETS=");
+ for(p = progs; p != NULL; p = p->next)
+ fprintf(outmk, " %s_clean", p->ident);
fprintf(outmk, "\n\n");
fprintf(outmk, "%s: %s.o $(CRUNCHED_OBJS)\n",
@@ -757,8 +760,10 @@ void top_makefile_rules(FILE *outmk)
fprintf(outmk, "\tstrip %s\n", execfname);
fprintf(outmk, "all: objs exe\nobjs: $(SUBMAKE_TARGETS)\n");
fprintf(outmk, "exe: %s\n", execfname);
+ fprintf(outmk, "realclean: clean subclean\n");
fprintf(outmk, "clean:\n\trm -f %s *.lo *.o *_stub.c\n",
execfname);
+ fprintf(outmk, "subclean: $(SUBCLEAN_TARGETS)\n");
}
@@ -773,8 +778,10 @@ void prog_makefile_rules(FILE *outmk, prog_t *p)
fprintf(outmk, "%s_OBJS=", p->ident);
output_strlst(outmk, p->objs);
fprintf(outmk, "%s_make:\n", p->ident);
- fprintf(outmk, "\t(cd $(%s_SRCDIR) && make depend && make $(%s_OBJS))\n\n",
+ fprintf(outmk, "\t(cd $(%s_SRCDIR) && make depend && make $(%s_OBJS))\n",
p->ident, p->ident);
+ fprintf(outmk, "%s_clean:\n", p->ident);
+ fprintf(outmk, "\t(cd $(%s_SRCDIR) && make clean)\n\n", p->ident);
}
else
fprintf(outmk, "%s_make:\n\t@echo \"** cannot make objs for %s\"\n\n",
OpenPOWER on IntegriCloud