Commit 4ade3108 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Cooy clean rules from the LysKOM project.

Renamed subdirs to SUBDIRS.
parent 8aea37ef
...@@ -26,7 +26,7 @@ LIBNAME = libregex$(PROFILE-LIB-SUFFIX).a ...@@ -26,7 +26,7 @@ LIBNAME = libregex$(PROFILE-LIB-SUFFIX).a
LIBOBJS = regex.o LIBOBJS = regex.o
INSTALL-HDRS = regex.h INSTALL-HDRS = regex.h
subdirs = doc test SUBDIRS = doc test
default all:: regex.o default all:: regex.o
.PHONY: default all .PHONY: default all
...@@ -46,23 +46,18 @@ binaries:; ...@@ -46,23 +46,18 @@ binaries:;
regex.o: regex.c regex.h regex.o: regex.c regex.h
$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) -c $< $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) -c $<
@CLEAN@
clean mostlyclean::
dopure:;
dorealclean:;
dodistclean:
$(RM) $(GENERIC-DISTCLEAN)
doclean:;
domostlyclean:
$(RM) $(GENERIC-MOSTLYCLEAN) $(RM) $(GENERIC-MOSTLYCLEAN)
distclean:: clean #configure: configure.in
$(RM) $(GENERIC-DIST-CLEAN) # autoconf
realclean:: distclean
rm -f configure
pure:;
extraclean:: distclean
rm -f patch* *~* *\#* *.orig *.rej *.bak core a.out
configure: configure.in
autoconf
# config.status is generated by @TOPDIR@/configure in the LysKOM distribution. # config.status is generated by @TOPDIR@/configure in the LysKOM distribution.
#config.status: configure #config.status: configure
...@@ -75,9 +70,8 @@ makeargs = $(MFLAGS) CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' CC='$(CC)' \ ...@@ -75,9 +70,8 @@ makeargs = $(MFLAGS) CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' CC='$(CC)' \
DEFS='$(DEFS)' LDFLAGS='$(LDFLAGS)' LOADLIBES='$(LOADLIBES)' DEFS='$(DEFS)' LDFLAGS='$(LDFLAGS)' LOADLIBES='$(LOADLIBES)'
default all install \ default all install \
mostlyclean clean distclean extraclean realclean \
TAGS check:: TAGS check::
for d in $(subdirs); do (cd $$d; $(MAKE) $(makeargs) $@); done for d in $(SUBDIRS); do (cd $$d; $(MAKE) $(makeargs) $@); done
.PHONY: install mostlyclean clean distclean extraclean realclean TAGS check .PHONY: install mostlyclean clean distclean extraclean realclean TAGS check
# Prevent GNU make 3 from overflowing arg limit on system V. # Prevent GNU make 3 from overflowing arg limit on system V.
...@@ -94,7 +88,7 @@ dist: TAGS configure ...@@ -94,7 +88,7 @@ dist: TAGS configure
rm -rf $(distdir) rm -rf $(distdir)
mkdir $(distdir) mkdir $(distdir)
ln $(distfiles) $(distdir) ln $(distfiles) $(distdir)
for d in $(subdirs); do (cd $$d; $(MAKE) $(distargs) dist); done for d in $(SUBDIRS); do (cd $$d; $(MAKE) $(distargs) dist); done
tar czhf $(distdir).tar.Z $(distdir) tar czhf $(distdir).tar.Z $(distdir)
rm -rf $(distdir) rm -rf $(distdir)
.PHONY: dist .PHONY: dist
...@@ -26,7 +26,7 @@ LIBNAME = libregex$(PROFILE-LIB-SUFFIX).a ...@@ -26,7 +26,7 @@ LIBNAME = libregex$(PROFILE-LIB-SUFFIX).a
LIBOBJS = regex.o LIBOBJS = regex.o
INSTALL-HDRS = regex.h INSTALL-HDRS = regex.h
subdirs = doc test SUBDIRS = doc test
default all:: regex.o default all:: regex.o
.PHONY: default all .PHONY: default all
...@@ -46,23 +46,18 @@ binaries:; ...@@ -46,23 +46,18 @@ binaries:;
regex.o: regex.c regex.h regex.o: regex.c regex.h
$(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) -c $< $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) -c $<
@CLEAN@
clean mostlyclean::
dopure:;
dorealclean:;
dodistclean:
$(RM) $(GENERIC-DISTCLEAN)
doclean:;
domostlyclean:
$(RM) $(GENERIC-MOSTLYCLEAN) $(RM) $(GENERIC-MOSTLYCLEAN)
distclean:: clean #configure: configure.in
$(RM) $(GENERIC-DIST-CLEAN) # autoconf
realclean:: distclean
rm -f configure
pure:;
extraclean:: distclean
rm -f patch* *~* *\#* *.orig *.rej *.bak core a.out
configure: configure.in
autoconf
# config.status is generated by @TOPDIR@/configure in the LysKOM distribution. # config.status is generated by @TOPDIR@/configure in the LysKOM distribution.
#config.status: configure #config.status: configure
...@@ -75,9 +70,8 @@ makeargs = $(MFLAGS) CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' CC='$(CC)' \ ...@@ -75,9 +70,8 @@ makeargs = $(MFLAGS) CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' CC='$(CC)' \
DEFS='$(DEFS)' LDFLAGS='$(LDFLAGS)' LOADLIBES='$(LOADLIBES)' DEFS='$(DEFS)' LDFLAGS='$(LDFLAGS)' LOADLIBES='$(LOADLIBES)'
default all install \ default all install \
mostlyclean clean distclean extraclean realclean \
TAGS check:: TAGS check::
for d in $(subdirs); do (cd $$d; $(MAKE) $(makeargs) $@); done for d in $(SUBDIRS); do (cd $$d; $(MAKE) $(makeargs) $@); done
.PHONY: install mostlyclean clean distclean extraclean realclean TAGS check .PHONY: install mostlyclean clean distclean extraclean realclean TAGS check
# Prevent GNU make 3 from overflowing arg limit on system V. # Prevent GNU make 3 from overflowing arg limit on system V.
...@@ -94,7 +88,7 @@ dist: TAGS configure ...@@ -94,7 +88,7 @@ dist: TAGS configure
rm -rf $(distdir) rm -rf $(distdir)
mkdir $(distdir) mkdir $(distdir)
ln $(distfiles) $(distdir) ln $(distfiles) $(distdir)
for d in $(subdirs); do (cd $$d; $(MAKE) $(distargs) dist); done for d in $(SUBDIRS); do (cd $$d; $(MAKE) $(distargs) dist); done
tar czhf $(distdir).tar.Z $(distdir) tar czhf $(distdir).tar.Z $(distdir)
rm -rf $(distdir) rm -rf $(distdir)
.PHONY: dist .PHONY: dist
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment