Mailing List Archive

cvs commit: apache-1.3 Makefile.tmpl
rse 98/04/14 01:55:39

Modified: . Makefile.tmpl
Log:
Let the user explicitly know that we are preserving his existing
configuration files and make sure these hint messages are found
by the user by doing the install-config target last.

Revision Changes Path
1.16 +32 -28 apache-1.3/Makefile.tmpl

Index: Makefile.tmpl
===================================================================
RCS file: /export/home/cvs/apache-1.3/Makefile.tmpl,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- Makefile.tmpl 1998/04/12 12:52:39 1.15
+++ Makefile.tmpl 1998/04/14 08:55:39 1.16
@@ -171,8 +171,7 @@
fi
@$(MAKE) -f $(MKF) $(MFLAGS) \
install-mktree install-programs $(install-support) \
- install-config install-include \
- install-docroot
+ install-include install-docroot install-config
-@rm -f .install.tmp
-@rm -f .install.conf
-@if [ ".$(QUIET)" != .1 ]; then \
@@ -299,11 +298,37 @@
fi
@echo "<=== [support]"

+# install the Apache C header files
+install-include:
+ @echo "===> [include: Installing Apache C header files]"
+ $(CP) $(SRC)/include/*.h $(includedir)/
+ osdir=`grep '^OSDIR' $(SRC)/Makefile.config | sed -e 's:^OSDIR=::'`; \
+ $(CP) $(SRC)/$$osdir/os.h $(includedir)/
+ @echo "<=== [include]"
+
+# create an initial document root containing the Apache manual,
+# icons and distributed CGI scripts.
+install-docroot:
+ @echo "===> [docroot: Installing initial DocumentRoot files]"
+ -(cd $(ROOT)/htdocs/ && $(TAR) cf - *) |\
+ (cd $(datadir)/htdocs/ && $(TAR) xf -)
+ -find $(datadir)/htdocs/ -type d -exec chmod a+rx {} \;
+ -find $(datadir)/htdocs/ -type f -exec chmod a+r {} \;
+ -(cd $(ROOT)/icons/ && $(TAR) cf - *) |\
+ (cd $(datadir)/icons/ && $(TAR) xf -)
+ -find $(datadir)/icons/ -type d -exec chmod a+rx {} \;
+ -find $(datadir)/icons/ -type f -exec chmod a+r {} \;
+ -(cd $(ROOT)/cgi-bin/ && $(TAR) cf - *) |\
+ (cd $(datadir)/cgi-bin/ && $(TAR) xf -)
+ -find $(datadir)/cgi-bin/ -type d -exec chmod a+rx {} \;
+ -find $(datadir)/cgi-bin/ -type f -exec chmod a+r {} \;
+ @echo "<=== [docroot]"
+
# create the initial configuration by providing default files
# and initial config files while preserving existing ones.
install-config:
@echo "===> [config: Installing Apache configuration files]"
- for conf in httpd.conf access.conf srm.conf; do \
+ -@for conf in httpd.conf access.conf srm.conf; do \
(echo "##"; \
echo "## $$conf -- Apache HTTP server configuration file"; \
echo "##"; \
@@ -322,40 +347,19 @@
-e 's;logs/access_log;$(localstatedir)/$(localstatesubdir_logs)/access_log;' \
-e 's;logs/error_log;$(localstatedir)/$(localstatesubdir_logs)/error_log;' \
>.install.tmp && \
+ echo "$(INSTALL_DATA) .install.tmp $(sysconfdir)/$$conf.default"; \
$(INSTALL_DATA) .install.tmp $(sysconfdir)/$$conf.default; \
if [ ! -f "$(sysconfdir)/$$conf" ]; then \
+ echo "$(INSTALL_DATA) .install.tmp $(sysconfdir)/$$conf"; \
$(INSTALL_DATA) .install.tmp $(sysconfdir)/$$conf; \
+ else \
+ echo "[PRESERVING EXISTING CONFIG FILE: $(sysconfdir)/$$conf]"; \
fi; \
done
$(CP) $(ROOT)/conf/mime.types $(sysconfdir)/mime.types
$(CP) $(ROOT)/conf/magic $(sysconfdir)/magic
@echo "<=== [config]"

-# install the Apache C header files
-install-include:
- @echo "===> [include: Installing Apache C header files]"
- $(CP) $(SRC)/include/*.h $(includedir)/
- osdir=`grep '^OSDIR' $(SRC)/Makefile.config | sed -e 's:^OSDIR=::'`; \
- $(CP) $(SRC)/$$osdir/os.h $(includedir)/
- @echo "<=== [include]"
-
-# create an initial document root containing the Apache manual,
-# icons and distributed CGI scripts.
-install-docroot:
- @echo "===> [docroot: Installing initial DocumentRoot files]"
- -(cd $(ROOT)/htdocs/ && $(TAR) cf - *) |\
- (cd $(datadir)/htdocs/ && $(TAR) xf -)
- -find $(datadir)/htdocs/ -type d -exec chmod a+rx {} \;
- -find $(datadir)/htdocs/ -type f -exec chmod a+r {} \;
- -(cd $(ROOT)/icons/ && $(TAR) cf - *) |\
- (cd $(datadir)/icons/ && $(TAR) xf -)
- -find $(datadir)/icons/ -type d -exec chmod a+rx {} \;
- -find $(datadir)/icons/ -type f -exec chmod a+r {} \;
- -(cd $(ROOT)/cgi-bin/ && $(TAR) cf - *) |\
- (cd $(datadir)/cgi-bin/ && $(TAR) xf -)
- -find $(datadir)/cgi-bin/ -type d -exec chmod a+rx {} \;
- -find $(datadir)/cgi-bin/ -type f -exec chmod a+r {} \;
- @echo "<=== [docroot]"

## ------------------------------------------------------------------
## Cleanup Targets
Re: cvs commit: apache-1.3 Makefile.tmpl [ In reply to ]
On 14 Apr 1998 rse@hyperreal.org wrote:

> +# install the Apache C header files
> +install-include:
> + @echo "===> [include: Installing Apache C header files]"
> + $(CP) $(SRC)/include/*.h $(includedir)/
> + osdir=`grep '^OSDIR' $(SRC)/Makefile.config | sed -e 's:^OSDIR=::'`; \
> + $(CP) $(SRC)/$$osdir/os.h $(includedir)/
> + @echo "<=== [include]"

Hang on a sec here!

I haven't looked at any of this stuff before, but this is just
plain broken. (yes, it was there before I just didn't notice...)

I run "configure" on my system.

I end up with a Makefile (by default) that installs things in
completely different places from where all the docs say, that
creates a /usr/local/var (I have never heard of any OS where this
is legit to have!), screws with my /usr/local/include directory
by installing all Apache includes in it, etc.

This is _not_ good. Part of it is just the horrible hassles of having
two "recommended" ways of installing things and having to support
both, part is just brokenness in the current setup.

Some good work has gone into this, and it has some good features,
however I am still very leery of it and the pain it can cause, both
for the user and for us trying to support it.