Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /Makefile.in [637126] .. [8fd865] Maximize Restore

  Switch to side-by-side view

--- a/Makefile.in
+++ b/Makefile.in
@@ -94,7 +94,7 @@
 GENCAT_OBJECTS  = @GENCAT_OBJECTS@
 
 OTHER_SOURCES   = $(DISTDOC_SOURCES) mkinstalldirs install-sh $(MISC_SOURCES)
-MISC_SOURCES	= $(CONFIG_HEADERS) $(CONFIG_SOURCES) $(DEV_SCRIPTS)
+MISC_SOURCES	= $(CONFIG_HEADERS) $(CONFIG_SOURCES) $(DISTDEV_SCRIPTS)
 
 DISTDOC_SOURCES = ChangeLog COPYING FDL README
 MANPAGE_SOURCES	= catopen.man catgets.man catclose.man gencat.man
@@ -133,7 +133,13 @@
 BUILD_DLLS	= catgets$(DLLVERSION).dll
 DLLVERSION	= @DLLVERSION@
 
-DEV_SCRIPTS	= gendefs.awk
+DISTDEV_SCRIPTS	= gendefs.awk
+
+# DISTDEV_SCRIPTS may not be directly runnable...
+# EXECDEV_SCRIPTS derives from them, creating variants with appropriate
+# shebang entries, making them directly executable from a command line.
+#
+EXECDEV_SCRIPTS = gendefs
 
 # Generic rule, replacing the built-in default, to create an object file
 # from a C source file...
@@ -158,8 +164,15 @@
 %.h: repl/include/%.h
 	$(LN_S) $< $@
 
+# Generic rule to make a runnable (shebanged) script,
+# from a non-runnable awk program script.
+#
+%: %.awk
+	sed '1s,!.*,! @AWK_INTERPRETER@ -f,' $< > $@
+	chmod 755 $@
+
 all-dll = @MAKE_DLL@
-all-targets = @MAKE_TARGETS@
+all-targets = $(EXECDEV_SCRIPTS) @MAKE_TARGETS@
 
 all: $(all-targets)
 
@@ -227,7 +240,7 @@
 	  $(INSTALL_PROGRAM) $$prog ${bindir}/$(tool_prefix)$$progname; \
 	done
 
-install-scripts: $(DEV_SCRIPTS)
+install-scripts: $(EXECDEV_SCRIPTS)
 	$(mkinstalldirs) --require ${prefix} ${scriptdir}
 	for script in $^; do \
 	  prog=`IFS='\\/'; set x $$script; eval echo '$$'$$#`; \
@@ -361,4 +374,4 @@
 distclean-cross-hosted: FORCE
 	rm -rf cross-build
 
-# $RCSfile$Revision: 1.5 $: end of file
+# $RCSfile$Revision: 1.6 $: end of file