Commit 5e8697e7 authored by Lynn Garren's avatar Lynn Garren
Browse files

get smarter about copying files into the temporary header directory tree

parent 040a4e3a
......@@ -14,13 +14,12 @@ CLEANFILES = defs.h
# copy headers into $(tempincludedir)
install-tmpHEADERS:
@echo " install headers in $(TEMPDIR)/CLHEP "
@echo " install headers in $(tempincludedir) "
@list='$(pkginclude_HEADERS)'; \
if test $(TEMPDIR); then \
if test $(tempincludedir); then \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(COPY_P) $$d$$p $(tempincludedir)/$$f"; \
$(COPY_P) $$d$$p $(tempincludedir)/$$f; \
copy-header.pl $$d$$p $(tempincludedir)/$$f; \
done; \
fi; test -z "$$fail"
#!/usr/bin/env perl
#
# copy a header into the temporary CLHEP header tree if
# a) the header is not already there
# b) the source is newer
#
if ($#ARGV != 1) {
print "mungeit requires two arguments - exit\n";
exit;
} else {
$source_header=$ARGV[0];
$dest_header=$ARGV[1];
&check_header;
}
exit;
sub check_header {
# make sure source exists
if ( ! -e $source_header ) {
print "$source_header does not exist - exit\n";
exit;
}
# copy if not already there - otherwise, check the time stamp
if ( ! -e $dest_header ) {
$cmd = "cp -p ".$source_header." ".$dest_header;
print "$cmd\n";
system($cmd);
} else {
$source_header_time = -M $source_header;
$dest_header_time = -M $dest_header;
# copy only if source is newer
if( $source_header_time < $dest_header_time ) {
$cmd = "cp -p ".$source_header." ".$dest_header;
print "$cmd\n";
system($cmd);
}
}
}
......@@ -25,7 +25,7 @@ abs_top_srcdir = @abs_top_srcdir@
COPY_P = @COPY_P@
$(top_builddir)/CLHEP: temp-package-dirs
list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
@list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
for pkg in $$list; do \
if test -d "$$pkg" ; then \
(cd $$pkg && $(MAKE) $(AM_MAKEFLAGS) TEMPDIR=$(abs_top_builddir) install-tmpHEADERS) || exit 1 ; \
......@@ -50,7 +50,7 @@ $(top_builddir)/CLHEP: temp-package-dirs
temp-package-dirs:
$(mkinstalldirs) $(abs_top_builddir)/CLHEP;
list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
@list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
for pkg in $$list; do \
$(mkinstalldirs) $(abs_top_builddir)/CLHEP/$$pkg; \
done;
......
......@@ -31,6 +31,7 @@ AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([Cast/Makefile])
AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([Cast-deps])
AC_CONFIG_FILES([Cast/copy-header.pl], [chmod +x Cast/copy-header.pl])
# Configuration inquiry program/script:
AC_CONFIG_FILES([Cast-config], [chmod +x Cast-config])
......
......@@ -13,13 +13,12 @@ CLEANFILES = defs.h
# copy headers into $(tempincludedir)
install-tmpHEADERS:
@echo " install headers in $(TEMPDIR)/CLHEP "
@echo " install headers in $(tempincludedir) "
@list='$(pkginclude_HEADERS)'; \
if test $(TEMPDIR); then \
if test $(tempincludedir); then \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(COPY_P) $$d$$p $(tempincludedir)/$$f"; \
$(COPY_P) $$d$$p $(tempincludedir)/$$f; \
copy-header.pl $$d$$p $(tempincludedir)/$$f; \
done; \
fi; test -z "$$fail"
#!/usr/bin/env perl
#
# copy a header into the temporary CLHEP header tree if
# a) the header is not already there
# b) the source is newer
#
if ($#ARGV != 1) {
print "mungeit requires two arguments - exit\n";
exit;
} else {
$source_header=$ARGV[0];
$dest_header=$ARGV[1];
&check_header;
}
exit;
sub check_header {
# make sure source exists
if ( ! -e $source_header ) {
print "$source_header does not exist - exit\n";
exit;
}
# copy if not already there - otherwise, check the time stamp
if ( ! -e $dest_header ) {
$cmd = "cp -p ".$source_header." ".$dest_header;
print "$cmd\n";
system($cmd);
} else {
$source_header_time = -M $source_header;
$dest_header_time = -M $dest_header;
# copy only if source is newer
if( $source_header_time < $dest_header_time ) {
$cmd = "cp -p ".$source_header." ".$dest_header;
print "$cmd\n";
system($cmd);
}
}
}
......@@ -21,7 +21,7 @@ abs_top_srcdir = @abs_top_srcdir@
COPY_P = @COPY_P@
$(top_builddir)/CLHEP: temp-package-dirs
list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
@list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
for pkg in $$list; do \
if test -d "$$pkg" ; then \
(cd $$pkg && $(MAKE) $(AM_MAKEFLAGS) TEMPDIR=$(abs_top_builddir) install-tmpHEADERS) || exit 1 ; \
......@@ -46,7 +46,7 @@ $(top_builddir)/CLHEP: temp-package-dirs
temp-package-dirs:
$(mkinstalldirs) $(abs_top_builddir)/CLHEP;
list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
@list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
for pkg in $$list; do \
$(mkinstalldirs) $(abs_top_builddir)/CLHEP/$$pkg; \
done;
......
......@@ -32,6 +32,7 @@ AC_CONFIG_FILES([Evaluator/Makefile])
AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([test/Makefile])
AC_CONFIG_FILES([Evaluator-deps])
AC_CONFIG_FILES([Evaluator/copy-header.pl], [chmod +x Evaluator/copy-header.pl])
# Test driver program/script:
AC_CONFIG_FILES([test/testEvaluator.sh], [chmod +x test/testEvaluator.sh])
......
......@@ -27,13 +27,12 @@ CLEANFILES = defs.h
# copy headers into $(tempincludedir)
install-tmpHEADERS:
@echo " install headers in $(TEMPDIR)/CLHEP "
@echo " install headers in $(tempincludedir) "
@list='$(pkginclude_HEADERS)'; \
if test $(TEMPDIR); then \
if test $(tempincludedir); then \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(COPY_P) $$d$$p $(tempincludedir)/$$f"; \
$(COPY_P) $$d$$p $(tempincludedir)/$$f; \
copy-header.pl $$d$$p $(tempincludedir)/$$f; \
done; \
fi; test -z "$$fail"
#!/usr/bin/env perl
#
# copy a header into the temporary CLHEP header tree if
# a) the header is not already there
# b) the source is newer
#
if ($#ARGV != 1) {
print "mungeit requires two arguments - exit\n";
exit;
} else {
$source_header=$ARGV[0];
$dest_header=$ARGV[1];
&check_header;
}
exit;
sub check_header {
# make sure source exists
if ( ! -e $source_header ) {
print "$source_header does not exist - exit\n";
exit;
}
# copy if not already there - otherwise, check the time stamp
if ( ! -e $dest_header ) {
$cmd = "cp -p ".$source_header." ".$dest_header;
print "$cmd\n";
system($cmd);
} else {
$source_header_time = -M $source_header;
$dest_header_time = -M $dest_header;
# copy only if source is newer
if( $source_header_time < $dest_header_time ) {
$cmd = "cp -p ".$source_header." ".$dest_header;
print "$cmd\n";
system($cmd);
}
}
}
......@@ -25,7 +25,7 @@ abs_top_srcdir = @abs_top_srcdir@
COPY_P = @COPY_P@
$(top_builddir)/CLHEP: temp-package-dirs
list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
@list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
for pkg in $$list; do \
if test -d "$$pkg" ; then \
(cd $$pkg && $(MAKE) $(AM_MAKEFLAGS) TEMPDIR=$(abs_top_builddir) install-tmpHEADERS) || exit 1 ; \
......@@ -50,7 +50,7 @@ $(top_builddir)/CLHEP: temp-package-dirs
temp-package-dirs:
$(mkinstalldirs) $(abs_top_builddir)/CLHEP;
list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
@list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
for pkg in $$list; do \
$(mkinstalldirs) $(abs_top_builddir)/CLHEP/$$pkg; \
done;
......
......@@ -33,6 +33,7 @@ AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([test/Makefile])
AC_CONFIG_FILES([doc/Makefile])
AC_CONFIG_FILES([Exceptions-deps])
AC_CONFIG_FILES([Exceptions/copy-header.pl], [chmod +x Exceptions/copy-header.pl])
# Configuration inquiry program/script:
AC_CONFIG_FILES([Exceptions-config], [chmod +x Exceptions-config])
......
......@@ -99,13 +99,12 @@ CLEANFILES = defs.h
# copy headers into $(tempincludedir)
install-tmpHEADERS:
@echo " install headers in $(TEMPDIR)/CLHEP "
@echo " install headers in $(tempincludedir) "
@list='$(pkginclude_HEADERS)'; \
if test $(TEMPDIR); then \
if test $(tempincludedir); then \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(COPY_P) $$d$$p $(tempincludedir)/$$f"; \
$(COPY_P) $$d$$p $(tempincludedir)/$$f; \
copy-header.pl $$d$$p $(tempincludedir)/$$f; \
done; \
fi; test -z "$$fail"
#!/usr/bin/env perl
#
# copy a header into the temporary CLHEP header tree if
# a) the header is not already there
# b) the source is newer
#
if ($#ARGV != 1) {
print "mungeit requires two arguments - exit\n";
exit;
} else {
$source_header=$ARGV[0];
$dest_header=$ARGV[1];
&check_header;
}
exit;
sub check_header {
# make sure source exists
if ( ! -e $source_header ) {
print "$source_header does not exist - exit\n";
exit;
}
# copy if not already there - otherwise, check the time stamp
if ( ! -e $dest_header ) {
$cmd = "cp -p ".$source_header." ".$dest_header;
print "$cmd\n";
system($cmd);
} else {
$source_header_time = -M $source_header;
$dest_header_time = -M $dest_header;
# copy only if source is newer
if( $source_header_time < $dest_header_time ) {
$cmd = "cp -p ".$source_header." ".$dest_header;
print "$cmd\n";
system($cmd);
}
}
}
......@@ -23,7 +23,7 @@ abs_top_srcdir = @abs_top_srcdir@
COPY_P = @COPY_P@
$(top_builddir)/CLHEP: temp-package-dirs
list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
@list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
for pkg in $$list; do \
if test -d "$$pkg" ; then \
(cd $$pkg && $(MAKE) $(AM_MAKEFLAGS) TEMPDIR=$(abs_top_builddir) install-tmpHEADERS) || exit 1 ; \
......@@ -48,7 +48,7 @@ $(top_builddir)/CLHEP: temp-package-dirs
temp-package-dirs:
$(mkinstalldirs) $(abs_top_builddir)/CLHEP;
list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
@list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
for pkg in $$list; do \
$(mkinstalldirs) $(abs_top_builddir)/CLHEP/$$pkg; \
done;
......
......@@ -33,6 +33,7 @@ AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([doc/Makefile])
AC_CONFIG_FILES([test/Makefile])
AC_CONFIG_FILES([GenericFunctions-deps])
AC_CONFIG_FILES([GenericFunctions/copy-header.pl], [chmod +x GenericFunctions/copy-header.pl])
# Test driver program/script:
AC_CONFIG_FILES([test/testGenericFunctions.sh], [chmod +x test/testGenericFunctions.sh])
......
......@@ -19,13 +19,12 @@ CLEANFILES = defs.h
# copy headers into $(tempincludedir)
install-tmpHEADERS:
@echo " install headers in $(TEMPDIR)/CLHEP "
@echo " install headers in $(tempincludedir) "
@list='$(pkginclude_HEADERS)'; \
if test $(TEMPDIR); then \
if test $(tempincludedir); then \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
f="`echo $$p | sed -e 's|^.*/||'`"; \
echo " $(COPY_P) $$d$$p $(tempincludedir)/$$f"; \
$(COPY_P) $$d$$p $(tempincludedir)/$$f; \
copy-header.pl $$d$$p $(tempincludedir)/$$f; \
done; \
fi; test -z "$$fail"
#!/usr/bin/env perl
#
# copy a header into the temporary CLHEP header tree if
# a) the header is not already there
# b) the source is newer
#
if ($#ARGV != 1) {
print "mungeit requires two arguments - exit\n";
exit;
} else {
$source_header=$ARGV[0];
$dest_header=$ARGV[1];
&check_header;
}
exit;
sub check_header {
# make sure source exists
if ( ! -e $source_header ) {
print "$source_header does not exist - exit\n";
exit;
}
# copy if not already there - otherwise, check the time stamp
if ( ! -e $dest_header ) {
$cmd = "cp -p ".$source_header." ".$dest_header;
print "$cmd\n";
system($cmd);
} else {
$source_header_time = -M $source_header;
$dest_header_time = -M $dest_header;
# copy only if source is newer
if( $source_header_time < $dest_header_time ) {
$cmd = "cp -p ".$source_header." ".$dest_header;
print "$cmd\n";
system($cmd);
}
}
}
......@@ -21,7 +21,7 @@ abs_top_srcdir = @abs_top_srcdir@
COPY_P = @COPY_P@
$(top_builddir)/CLHEP: temp-package-dirs
list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
@list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
for pkg in $$list; do \
if test -d "$$pkg" ; then \
(cd $$pkg && $(MAKE) $(AM_MAKEFLAGS) TEMPDIR=$(abs_top_builddir) install-tmpHEADERS) || exit 1 ; \
......@@ -46,7 +46,7 @@ $(top_builddir)/CLHEP: temp-package-dirs
temp-package-dirs:
$(mkinstalldirs) $(abs_top_builddir)/CLHEP;
list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
@list="`cat @PACKAGE@-deps | sed s/CLHEP-@PACKAGE@-@VERSION@// | sed s/CLHEP-// | sed s/-@VERSION@//`"; \
for pkg in $$list; do \
$(mkinstalldirs) $(abs_top_builddir)/CLHEP/$$pkg; \
done;
......
......@@ -32,6 +32,7 @@ AC_CONFIG_FILES([Geometry/Makefile])
AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([test/Makefile])
AC_CONFIG_FILES([Geometry-deps])
AC_CONFIG_FILES([Geometry/copy-header.pl], [chmod +x Geometry/copy-header.pl])
# Test driver program/script:
AC_CONFIG_FILES([test/testBasicVector3D.sh], [chmod +x test/testBasicVector3D.sh])
......
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