httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <field...@kiwi.ICS.UCI.EDU>
Subject [PATCH] broken modules/Makefile (again)
Date Tue, 01 Apr 1997 03:11:17 GMT
>Yes, I think separate rule for each module is the way to go.  
>It's kinda ugly, awk doesn't let you have 's inside of "" strings,
>e.g. printf  "AUX_FLAGS='$(MOD_CFLAGS)'" 
>(I found the ugly sprintf/q work around in the awk faq).

awk isn't portable either.  The following patch will do the same,
but without as much uglyness.  I also tested it with additional
module directories (which made the @echo linking ... bogus).

If HPsUX make doesn't support $@, then it ain't make.

.....Roy

Index: Configure
===================================================================
RCS file: /export/home/cvs/apache/src/Configure,v
retrieving revision 1.85
diff -c -r1.85 Configure
*** Configure	1997/03/25 20:21:20	1.85
--- Configure	1997/04/01 03:04:57
***************
*** 571,577 ****
  cat Makefile.config >> Makefile
  sed -e "s#@@Configuration@@#$file#" "$makefile_tmpl" >>Makefile
  awk >>Makefile <$tmpfile \
!    '($3 ~ /modules\//) { printf "%s: modules/last-built ; @echo linking %s\n\n", $3, $3}'
  cat Makefile.config ../support/Makefile.tmpl > ../support/Makefile
  
  cat << EOF > modules/Makefile
--- 571,577 ----
  cat Makefile.config >> Makefile
  sed -e "s#@@Configuration@@#$file#" "$makefile_tmpl" >>Makefile
  awk >>Makefile <$tmpfile \
!    '($3 ~ /modules\//) { printf "%s: modules/last-built\n\n", $3, $3}'
  cat Makefile.config ../support/Makefile.tmpl > ../support/Makefile
  
  cat << EOF > modules/Makefile
***************
*** 593,619 ****
  
  awk >> modules/Makefile < $tmpfile '\
     BEGIN {printf "MODULES="} \
!    ($3 ~ /modules\//) {split ($3, pp, "/"); printf "%s.build ", pp[2]} \
     END {printf "\n"}'
  
  awk >> modules/Makefile < $tmpfile '\
     BEGIN {printf "CLEANERS="} \
!    ($3 ~ /modules\//) {split ($3, pp, "/"); printf "%s.clean ", pp[2]} \
     END {printf "\n"}'
  
  cat << EOF >> modules/Makefile
  
  default: \$(MODULES)
! 	@echo "done building module subdirectories"
  
  clean: \$(CLEANERS)
! 	@echo "done cleaning module subdirectories"
  
! .SUFFIXES: .build .clean
  
! \$(MODULES):
! 	(cd \$*; \$(MAKE) CC=\$(CC) AUX_CFLAGS='\$(MOD_CFLAGS)' RANLIB='\$(RANLIB)')
  
- \$(CLEANERS):
- 	(cd \$*; \$(MAKE) clean)
  EOF
--- 593,622 ----
  
  awk >> modules/Makefile < $tmpfile '\
     BEGIN {printf "MODULES="} \
!    ($3 ~ /modules\//) {split ($3, pp, "/"); printf "%s ", pp[2]} \
     END {printf "\n"}'
  
  awk >> modules/Makefile < $tmpfile '\
     BEGIN {printf "CLEANERS="} \
!    ($3 ~ /modules\//) {split ($3, pp, "/"); printf "%s_clean ", pp[2]} \
     END {printf "\n"}'
  
  cat << EOF >> modules/Makefile
  
  default: \$(MODULES)
! 	@echo "Done building module subdirectories"
  
  clean: \$(CLEANERS)
! 	@echo "Done cleaning module subdirectories"
  
! \$(MODULES): ForceMe
! 	(cd \$@; \$(MAKE) CC=\$(CC) AUX_CFLAGS='\$(MOD_CFLAGS)' RANLIB='\$(RANLIB)')
  
! ForceMe:
  
  EOF
+ 
+ awk >>modules/Makefile <$tmpfile \
+    '($3 ~ /modules\//) { split ($3, pp, "/"); \
+    printf "%s_clean:\n\t(cd %s; $(MAKE) clean)\n\n", pp[2], pp[2]}'
+ 

Mime
View raw message